X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FpopulateRecentChangesSource.php;h=25a51d72133d368cea727614ab4d1b80b5acef62;hb=f74244cd13961298e871ab5c9407b4d327c765b1;hp=0e8e50125276480f17b2ec2a014a403716ecc34e;hpb=584775e59d553b3447f615422e1b929506470f97;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/populateRecentChangesSource.php b/maintenance/populateRecentChangesSource.php index 0e8e501252..25a51d7213 100644 --- a/maintenance/populateRecentChangesSource.php +++ b/maintenance/populateRecentChangesSource.php @@ -21,7 +21,7 @@ * @ingroup Maintenance */ -require_once dirname( __FILE__ ) . '/Maintenance.php'; +require_once __DIR__ . '/Maintenance.php'; /** * Maintenance script to populate the rc_source field. @@ -32,7 +32,8 @@ require_once dirname( __FILE__ ) . '/Maintenance.php'; class PopulateRecentChangesSource extends LoggedUpdateMaintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Populates rc_source field of the recentchanges table with the data in rc_type."; + $this->mDescription = + "Populates rc_source field of the recentchanges table with the data in rc_type."; $this->setBatchSize( 100 ); } @@ -45,6 +46,7 @@ class PopulateRecentChangesSource extends LoggedUpdateMaintenance { $start = $dbw->selectField( 'recentchanges', 'MIN(rc_id)', false, __METHOD__ ); if ( !$start ) { $this->output( "Nothing to do.\n" ); + return true; } $end = $dbw->selectField( 'recentchanges', 'MAX(rc_id)', false, __METHOD__ );