Had a bash at cleaning up the horrendous-looking deletion log on the edit page:
[lhc/web/wiklou.git] / maintenance / rebuildInterwiki.inc
index d719fd4..d85612b 100644 (file)
@@ -4,16 +4,14 @@
  * Wikimedia specific!
  *
  * @todo document
- * @package MediaWiki
- * @subpackage Maintenance
+ * @addtogroup Maintenance
  */
 
 /** */
 
 /**
  * @todo document
- * @package MediaWiki
- * @subpackage Maintenance
+ * @addtogroup Maintenance
  */
 class Site {
        var $suffix, $lateral, $url;
@@ -59,6 +57,7 @@ function getRebuildInterwikiSQL() {
                'sep11wiki' => 'sep11.wikipedia.org',
                'metawiki' => 'meta.wikimedia.org',
                'commonswiki' => 'commons.wikimedia.org',
+               'specieswiki' => 'species.wikimedia.org',
        );
 
        # Extra interwiki links that can't be in the intermap for some reason
@@ -108,6 +107,7 @@ function getRebuildInterwikiSQL() {
        $iwArray = array();
 
        foreach ( $lines as $line ) {
+               $matches = array();
                if ( preg_match( '/^\|\s*(.*?)\s*\|\|\s*(https?:\/\/.*?)\s*$/', $line, $matches ) ) {
                        $prefix = strtolower( $matches[1] );
                        $url = $matches[2];
@@ -252,7 +252,7 @@ function makeLink( $entry, &$first, $source ) {
        } else {
                $sql .= ",\n";
        }
-       $dbr =& wfGetDB( DB_SLAVE );
+       $dbr = wfGetDB( DB_SLAVE );
        $sql .= "(" . $dbr->makeList( $entry ) . ")";
        return $sql;
 }