Use WikiPage instead of Article to call updateCategoryCounts()
[lhc/web/wiklou.git] / maintenance / rebuildrecentchanges.php
index f627892..5cacac6 100644 (file)
@@ -43,8 +43,7 @@ class RebuildRecentchanges extends Maintenance {
         * Rebuild pass 1
         * DOCUMENT ME!
         */
-       function rebuildRecentChangesTablePass1()
-       {
+       private function rebuildRecentChangesTablePass1() {
                $dbw = wfGetDB( DB_MASTER );
 
                $dbw->delete( 'recentchanges', '*' );
@@ -133,14 +132,16 @@ class RebuildRecentchanges extends Maintenance {
                        } else {
                                # Grab the entry's text size
                                $size = $dbw->selectField( 'revision', 'rev_len', array( 'rev_id' => $obj->rc_this_oldid ) );
-                               $size = !is_null( $size ) ? intval( $size ) : 'NULL';
 
                                $dbw->update( 'recentchanges',
                                        array(
-                                               'rc_old_len' => $lastSize,
-                                               'rc_new_len' => $size,
+                                               'rc_last_oldid' => $lastOldId,
+                                               'rc_new'        => $new,
+                                               'rc_type'       => $new,
+                                               'rc_old_len'    => $lastSize,
+                                               'rc_new_len'    => $size,
                                        ), array(
-                                               'rc_cur_id' => $lastCurId,
+                                               'rc_cur_id'     => $lastCurId,
                                                'rc_this_oldid' => $obj->rc_this_oldid,
                                        ),
                                        __METHOD__
@@ -292,4 +293,4 @@ class RebuildRecentchanges extends Maintenance {
 }
 
 $maintClass = "RebuildRecentchanges";
-require_once( DO_MAINTENANCE );
+require_once( RUN_MAINTENANCE_IF_MAIN );