Checking images for syntax errors can yield funky results:)
[lhc/web/wiklou.git] / maintenance / FiveUpgrade.inc
index 9f994d2..be0112e 100644 (file)
@@ -77,8 +77,7 @@ class FiveUpgrade {
        }
        
        /**
-        * Close out the connections when we're done...
-        * Is this needed?
+        * Commit transactions and close the connections when we're done...
         */
        function close() {
                foreach( $this->loadBalancers as $lb ) {
@@ -98,9 +97,9 @@ class FiveUpgrade {
                global $wgDBtype;
 
                $timeout = 3600 * 24;
-               $db =& $this->newConnection();
+               $db = $this->newConnection();
                $db->bufferResults( false );
-        if ($wgDBtype == 'mysql') {
+               if ($wgDBtype == 'mysql') {
                        $db->query( "SET net_read_timeout=$timeout" );
                        $db->query( "SET net_write_timeout=$timeout" );
                }
@@ -527,7 +526,7 @@ class FiveUpgrade {
                } else {
                        global $IP;
                        $this->log( 'adding iw_trans...' );
-                       dbsource( $IP . '/maintenance/archives/patch-interwiki-trans.sql', $this->dbw );
+                       $this->dbw->sourceFile( $IP . '/maintenance/archives/patch-interwiki-trans.sql' );
                        $this->log( 'added iw_trans.' );
                }
 
@@ -889,17 +888,17 @@ END;
                $add = array();
                while( $row = $this->dbr->fetchObject( $result ) ) {
                        $add[] = array(
-                               'wl_user'      =>                        $row->wl_user,
-                               'wl_namespace' => Namespace::getSubject( $row->wl_namespace ),
-                               'wl_title'     =>           $this->conv( $row->wl_title ),
-                               'wl_notificationtimestamp' =>            '0' );
+                               'wl_user'      =>                          $row->wl_user,
+                               'wl_namespace' => MWNamespace::getSubject( $row->wl_namespace ),
+                               'wl_title'     =>             $this->conv( $row->wl_title ),
+                               'wl_notificationtimestamp' =>              '0' );
                        $this->addChunk( $add );
 
                        $add[] = array(
-                               'wl_user'      =>                        $row->wl_user,
-                               'wl_namespace' =>    Namespace::getTalk( $row->wl_namespace ),
-                               'wl_title'     =>           $this->conv( $row->wl_title ),
-                               'wl_notificationtimestamp' =>            '0' );
+                               'wl_user'      =>                          $row->wl_user,
+                               'wl_namespace' =>    MWNamespace::getTalk( $row->wl_namespace ),
+                               'wl_title'     =>             $this->conv( $row->wl_title ),
+                               'wl_notificationtimestamp' =>              '0' );
                        $this->addChunk( $add );
                }
                $this->lastChunk( $add );