https://www.mediawiki.org/wiki/Special:Code/MediaWiki/104215

Revision: 104215
Author:   aaron
Date:     2011-11-25 02:08:03 +0000 (Fri, 25 Nov 2011)
Log Message:
-----------
Fixed doFlaggedRevsRevTimestamp() in updater, broken in r99755 and also had the 
wrong directory

Modified Paths:
--------------
    trunk/extensions/FlaggedRevs/backend/schema/FlaggedRevsUpdater.hooks.php

Modified: 
trunk/extensions/FlaggedRevs/backend/schema/FlaggedRevsUpdater.hooks.php
===================================================================
--- trunk/extensions/FlaggedRevs/backend/schema/FlaggedRevsUpdater.hooks.php    
2011-11-25 01:34:39 UTC (rev 104214)
+++ trunk/extensions/FlaggedRevs/backend/schema/FlaggedRevsUpdater.hooks.php    
2011-11-25 02:08:03 UTC (rev 104215)
@@ -90,14 +90,17 @@
                        $du->output( "...fr_rev_timestamp already exists.\n" );
                        return;
                }
-               include_once( dirname( __FILE__ ) . 
"/../maintenance/populateRevTimestamp.inc" );
-               if ( !function_exists( 'populate_fr_rev_timestamp' ) ) {
-                       $du->output( "...populateRevTimestamp.inc missing! 
Aborting fr_rev_timestamp update.\n" );
-                       return; // sanity
+               $scriptDir = dirname( __FILE__ ) . 
"/../../maintenance/populateRevTimestamp.php";
+               if ( !file_exists( $scriptDir ) ) {
+                       $du->output( "...populateRevTimestamp.php missing! 
Aborting fr_rev_timestamp update.\n" );
+                       return; // sanity; all or nothing
                }
                $du->output( "Adding fr_rev_timestamp and redoing flaggedrevs 
table indexes... " );
+               // Change the schema
                $du->getDB()->sourceFile( $patch );
-               populate_fr_rev_timestamp( 0 );
+               // Populate columns
+               $task = $du->maintenance->runChild( 'PopulateFRRevTimestamp', 
$scriptDir );
+               $task->execute();
                $du->output( "done.\n" );
        }
 }


_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to