00001 <?php 00014 // Standard boilerplate to define $IP 00015 if ( getenv( 'MW_INSTALL_PATH' ) !== false ) { 00016 $IP = getenv( 'MW_INSTALL_PATH' ); 00017 } else { 00018 $dir = __DIR__; 00019 $IP = "$dir/../../.."; 00020 } 00021 require_once "$IP/maintenance/Maintenance.php"; 00022 00023 class CreateMessageIndex extends Maintenance { 00024 public function __construct() { 00025 parent::__construct(); 00026 $this->mDescription = 'Creates or updates a message index.'; 00027 } 00028 00029 public function execute() { 00030 MessageGroups::clearCache(); 00031 MessageIndex::singleton()->rebuild(); 00032 } 00033 } 00034 00035 $maintClass = 'CreateMessageIndex'; 00036 require_once DO_MAINTENANCE;