MessageIndexRebuildJob.php

Go to the documentation of this file.
00001 <?php
00016 class MessageIndexRebuildJob extends Job {
00017 
00021     public static function newJob() {
00022         $job = new self( Title::newMainPage() );
00023 
00024         return $job;
00025     }
00026 
00027     function __construct( $title, $params = array(), $id = 0 ) {
00028         parent::__construct( __CLASS__, $title, $params, $id );
00029     }
00030 
00031     function run() {
00032         MessageIndex::singleton()->rebuild();
00033 
00034         return true;
00035     }
00036 
00043     public function insert() {
00044         global $wgTranslateDelayedMessageIndexRebuild;
00045         if ( $wgTranslateDelayedMessageIndexRebuild ) {
00046             return parent::insert();
00047         } else {
00048             $this->run();
00049 
00050             return true;
00051         }
00052     }
00053 }
Generated on Tue Oct 29 00:00:26 2013 for MediaWiki Translate Extension by  doxygen 1.6.3