r85030 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r85029‎ | r85030 | r85031 >
Date:18:40, 30 March 2011
Author:reedy
Status:ok
Tags:
Comment:
Move duplicated Site class into own class in Maintenance.php, include in 2 users
Modified paths:
  • /trunk/phase3/maintenance/Site.php (added) (history)
  • /trunk/phase3/maintenance/dumpInterwiki.php (modified) (history)
  • /trunk/phase3/maintenance/rebuildInterwiki.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/rebuildInterwiki.php
@@ -24,25 +24,8 @@
2525 * @ingroup Wikimedia
2626 */
2727
28 -/**
29 - * @todo document
30 - * @ingroup Maintenance
31 - */
32 -class Site {
33 - var $suffix, $lateral, $url;
 28+require_once( dirname( __FILE__ ) . '/Site.php' );
3429
35 - function __construct( $s, $l, $u ) {
36 - $this->suffix = $s;
37 - $this->lateral = $l;
38 - $this->url = $u;
39 - }
40 -
41 - function getURL( $lang ) {
42 - $xlang = str_replace( '_', '-', $lang );
43 - return "http://$xlang.{$this->url}/wiki/\$1";
44 - }
45 -}
46 -
4730 require_once( dirname( __FILE__ ) . '/Maintenance.php' );
4831
4932 class RebuildInterwiki extends Maintenance {
Index: trunk/phase3/maintenance/Site.php
@@ -0,0 +1,19 @@
 2+<?php
 3+/**
 4+ * @todo document
 5+ * @ingroup Maintenance
 6+ */
 7+class Site {
 8+ var $suffix, $lateral, $url;
 9+
 10+ function __construct( $s, $l, $u ) {
 11+ $this->suffix = $s;
 12+ $this->lateral = $l;
 13+ $this->url = $u;
 14+ }
 15+
 16+ function getURL( $lang ) {
 17+ $xlang = str_replace( '_', '-', $lang );
 18+ return "http://$xlang.{$this->url}/wiki/\$1";
 19+ }
 20+}
\ No newline at end of file
Property changes on: trunk/phase3/maintenance/Site.php
___________________________________________________________________
Added: svn:eol-style
121 + native
Added: svn:keywords
222 + Author Date Id Revision
Index: trunk/phase3/maintenance/dumpInterwiki.php
@@ -24,25 +24,8 @@
2525 * @ingroup Wikimedia
2626 */
2727
28 -/**
29 - * @todo document
30 - * @ingroup Maintenance
31 - */
32 -class Site {
33 - var $suffix, $lateral, $url;
 28+require_once( dirname( __FILE__ ) . '/Site.php' );
3429
35 - function __construct( $s, $l, $u ) {
36 - $this->suffix = $s;
37 - $this->lateral = $l;
38 - $this->url = $u;
39 - }
40 -
41 - function getURL( $lang ) {
42 - $xlang = str_replace( '_', '-', $lang );
43 - return "http://$xlang.{$this->url}/wiki/\$1";
44 - }
45 -}
46 -
4730 require_once( dirname( __FILE__ ) . '/Maintenance.php' );
4831
4932 class DumpInterwiki extends Maintenance {

Status & tagging log