* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
*
+ * @file
* @ingroup Maintenance
*/
-
+
require_once( dirname( __FILE__ ) . '/Maintenance.php' );
class UpdateSearchIndex extends Maintenance {
}
}
$lockTime = $this->getOption( 'l', 20 );
-
+
$this->doUpdateSearchIndex( $start, $end, $lockTime );
if ( is_writable( dirname( realpath( $posFile ) ) ) ) {
$file = fopen( $posFile, 'w' );
fwrite( $file, $end );
fclose( $file );
} else {
- $this->output( "*** Couldn't write to the $posFile!\n" );
+ $this->error( "*** Couldn't write to the $posFile!\n" );
}
} else {
- $this->output( "*** Couldn't write to the $posFile!\n" );
+ $this->error( "*** Couldn't write to the $posFile!\n" );
}
}
-
+
private function doUpdateSearchIndex( $start, $end, $maxLockTime ) {
global $wgDisableSearchUpdate;
}
$maintClass = "UpdateSearchIndex";
-require_once( DO_MAINTENANCE );
+require_once( RUN_MAINTENANCE_IF_MAIN );