2 // Define this so scripts can easily find doMaintenance.php
3 define( 'DO_MAINTENANCE', dirname(__FILE__
) . '/doMaintenance.php' );
5 // Make sure we're on PHP5 or better
6 if( version_compare( PHP_VERSION
, '5.0.0' ) < 0 ) {
7 echo( "Sorry! This version of MediaWiki requires PHP 5; you are running " .
8 PHP_VERSION
. ".\n\n" .
9 "If you are sure you already have PHP 5 installed, it may be installed\n" .
10 "in a different path from PHP 4. Check with your system administrator.\n" );
15 * Abstract maintenance class for quickly writing and churning out
16 * maintenance scripts with minimal effort. All that _must_ be defined
17 * is the execute() method. See docs/maintenance.txt for more info
18 * and a quick demo of how to use it.
20 * This program is free software; you can redistribute it and/or modify
21 * it under the terms of the GNU General Public License as published by
22 * the Free Software Foundation; either version 2 of the License, or
23 * (at your option) any later version.
25 * This program is distributed in the hope that it will be useful,
26 * but WITHOUT ANY WARRANTY; without even the implied warranty of
27 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 * GNU General Public License for more details.
30 * You should have received a copy of the GNU General Public License along
31 * with this program; if not, write to the Free Software Foundation, Inc.,
32 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
33 * http://www.gnu.org/copyleft/gpl.html
35 * @author Chad Horohoe <chad@anyonecanedit.org>
37 * @ingroup Maintenance
39 abstract class Maintenance
{
42 * Constants for DB access type
43 * @see Maintenance::getDbType()
49 // This is the desired params
50 private $mParams = array();
52 // Array of desired args
53 private $mArgList = array();
55 // This is the list of options that were actually passed
56 private $mOptions = array();
58 // This is the list of arguments that were actually passed
59 protected $mArgs = array();
61 // Name of the script currently running
64 // Special vars for params that are always used
65 private $mQuiet = false;
66 private $mDbUser, $mDbPass;
68 // A description of the script, children should change this
69 protected $mDescription = '';
71 // Have we already loaded our user input?
72 private $mInputLoaded = false;
74 // Batch size. If a script supports this, they should set
75 // a default with setBatchSize()
76 protected $mBatchSize = null;
79 * List of all the core maintenance scripts. This is added
80 * to scripts added by extensions in $wgMaintenanceScripts
81 * and returned by getMaintenanceScripts()
83 protected static $mCoreScripts = null;
86 * Default constructor. Children should call this if implementing
87 * their own constructors
89 public function __construct() {
90 $this->addDefaultParams();
94 * Do the actual work. All child classes will need to implement this
96 abstract public function execute();
99 * Add a parameter to the script. Will be displayed on --help
100 * with the associated description
102 * @param $name String The name of the param (help, version, etc)
103 * @param $description String The description of the param to show on --help
104 * @param $required boolean Is the param required?
105 * @param $withArg Boolean Is an argument required with this option?
107 protected function addOption( $name, $description, $required = false, $withArg = false ) {
108 $this->mParams
[ $name ] = array( 'desc' => $description, 'require' => $required, 'withArg' => $withArg );
112 * Checks to see if a particular param exists.
113 * @param $name String The name of the param
116 protected function hasOption( $name ) {
117 return isset( $this->mOptions
[ $name ] );
121 * Get an option, or return the default
122 * @param $name String The name of the param
123 * @param $default mixed Anything you want, default null
126 protected function getOption( $name, $default = null ) {
127 if( $this->hasOption($name) ) {
128 return $this->mOptions
[$name];
130 // Set it so we don't have to provide the default again
131 $this->mOptions
[$name] = $default;
132 return $this->mOptions
[$name];
137 * Add some args that are needed. Used in formatting help
139 protected function addArgs( $args ) {
140 $this->mArgList
= array_merge( $this->mArgList
, $args );
144 * Does a given argument exist?
145 * @param $argId int The integer value (from zero) for the arg
148 protected function hasArg( $argId = 0 ) {
149 return isset( $this->mArgs
[ $argId ] ) ;
154 * @param $argId int The integer value (from zero) for the arg
155 * @param $default mixed The default if it doesn't exist
158 protected function getArg( $argId = 0, $default = null ) {
159 return $this->hasArg($argId) ?
$this->mArgs
[$argId] : $default;
163 * Set the batch size.
164 * @param $s int The number of operations to do in a batch
166 protected function setBatchSize( $s = 0 ) {
167 $this->mBatchSize
= $s;
171 * Get the script's name
174 public function getName() {
179 * Return input from stdin.
180 * @param $length int The number of bytes to read. If null,
181 * just return the handle
184 protected function getStdin( $len = null ) {
185 $f = fopen( 'php://stdin', 'rt' );
189 $input = fgets( $f, $len );
191 return rtrim( $input );
195 * Throw some output to the user. Scripts can call this with no fears,
196 * as we handle all --quiet stuff here
197 * @param $out String The text to show to the user
199 protected function output( $out ) {
200 if( $this->mQuiet
) {
203 $f = fopen( 'php://stdout', 'w' );
209 * Throw an error to the user. Doesn't respect --quiet, so don't use
210 * this for non-error output
211 * @param $err String The error to display
212 * @param $die boolean If true, go ahead and die out.
214 protected function error( $err, $die = false ) {
215 $f = fopen( 'php://stderr', 'w' );
222 * Does the script need normal DB access? By default, we give Maintenance
223 * scripts admin rights to the DB (when available). Sometimes, a script needs
224 * normal access for a reason and sometimes they want no access. Subclasses
225 * should override and return one of the following values, as needed:
226 * Maintenance::DB_NONE - For no DB access at all
227 * Maintenance::DB_STD - For normal DB access
228 * Maintenance::DB_ADMIN - For admin DB access, default
231 protected function getDbType() {
232 return Maintenance
:: DB_ADMIN
;
236 * Add the default parameters to the scripts
238 private function addDefaultParams() {
239 $this->addOption( 'help', "Display this help message" );
240 $this->addOption( 'quiet', "Whether to supress non-error output" );
241 $this->addOption( 'conf', "Location of LocalSettings.php, if not default", false, true );
242 $this->addOption( 'wiki', "For specifying the wiki ID", false, true );
243 $this->addOption( 'globals', "Output globals at the end of processing for debugging" );
244 // If we support a DB, show the options
245 if( $this->getDbType() > 0 ) {
246 $this->addOption( 'dbuser', "The DB user to use for this script", false, true );
247 $this->addOption( 'dbpass', "The password to use for this script", false, true );
249 // If we support $mBatchSize, show the option
250 if( $this->mBatchSize
) {
251 $this->addOption( 'batch-size', 'Run this many operations ' .
252 'per batch, default: ' . $this->mBatchSize
, false, true );
257 * Spawn a child maintenance script. Pass all of the current arguments
259 * @param $maintClass String A name of a child maintenance class
260 * @param $classFile String Full path of where the child is
261 * @return Maintenance child
263 protected function spawnChild( $maintClass, $classFile = null ) {
264 // If we haven't already specified, kill setup procedures
265 // for child scripts, we've already got a sane environment
266 if( !defined( 'MW_NO_SETUP' ) ) {
267 define( 'MW_NO_SETUP', true );
270 // Make sure the class is loaded first
271 if( !class_exists( $maintClass ) ) {
273 require_once( $classFile );
275 if( !class_exists( $maintClass ) ) {
276 $this->error( "Cannot spawn child: $maintClass\n" );
280 $child = new $maintClass();
281 $child->loadParamsAndArgs( $this->mSelf
, $this->mOptions
, $this->mArgs
);
286 * Do some sanity checking and basic setup
288 public function setup() {
289 global $IP, $wgCommandLineMode, $wgUseNormalUser, $wgRequestTime;
291 # Abort if called from a web server
292 if ( isset( $_SERVER ) && array_key_exists( 'REQUEST_METHOD', $_SERVER ) ) {
293 $this->error( "This script must be run from the command line\n", true );
296 # Make sure we can handle script parameters
297 if( !ini_get( 'register_argc_argv' ) ) {
298 $this->error( "Cannot get command line arguments, register_argc_argv is set to false", true );
301 if( version_compare( phpversion(), '5.2.4' ) >= 0 ) {
302 // Send PHP warnings and errors to stderr instead of stdout.
303 // This aids in diagnosing problems, while keeping messages
304 // out of redirected output.
305 if( ini_get( 'display_errors' ) ) {
306 ini_set( 'display_errors', 'stderr' );
309 // Don't touch the setting on earlier versions of PHP,
310 // as setting it would disable output if you'd wanted it.
312 // Note that exceptions are also sent to stderr when
313 // command-line mode is on, regardless of PHP version.
316 # Set the memory limit
317 ini_set( 'memory_limit', -1 );
319 $wgRequestTime = microtime(true);
321 # Define us as being in Mediawiki
322 define( 'MEDIAWIKI', true );
324 # Setup $IP, using MW_INSTALL_PATH if it exists
325 $IP = strval( getenv('MW_INSTALL_PATH') ) !== ''
326 ?
getenv('MW_INSTALL_PATH')
327 : realpath( dirname( __FILE__
) . '/..' );
329 $wgCommandLineMode = true;
330 # Turn off output buffering if it's on
333 if (!isset( $wgUseNormalUser ) ) {
334 $wgUseNormalUser = false;
337 $this->loadParamsAndArgs();
339 $this->validateParamsAndArgs();
343 * Clear all params and arguments.
345 public function clearParamsAndArgs() {
346 $this->mOptions
= array();
347 $this->mArgs
= array();
348 $this->mInputLoaded
= false;
352 * Process command line arguments
353 * $mOptions becomes an array with keys set to the option names
354 * $mArgs becomes a zero-based array containing the non-option arguments
356 * @param $self String The name of the script, if any
357 * @param $opts Array An array of options, in form of key=>value
358 * @param $args Array An array of command line arguments
360 public function loadParamsAndArgs( $self = null, $opts = null, $args = null ) {
361 # If we were given opts or args, set those and return early
363 $this->mSelf
= $self;
364 $this->mInputLoaded
= true;
367 $this->mOptions
= $opts;
368 $this->mInputLoaded
= true;
371 $this->mArgs
= $args;
372 $this->mInputLoaded
= true;
375 # If we've already loaded input (either by user values or from $argv)
376 # skip on loading it again. The array_shift() will corrupt values if
377 # it's run again and again
378 if( $this->mInputLoaded
) {
379 $this->loadSpecialVars();
384 $this->mSelf
= array_shift( $argv );
390 for( $arg = reset( $argv ); $arg !== false; $arg = next( $argv ) ) {
391 if ( $arg == '--' ) {
392 # End of options, remainder should be considered arguments
393 $arg = next( $argv );
394 while( $arg !== false ) {
396 $arg = next( $argv );
399 } elseif ( substr( $arg, 0, 2 ) == '--' ) {
401 $option = substr( $arg, 2 );
402 if ( isset( $this->mParams
[$option] ) && $this->mParams
[$option]['withArg'] ) {
403 $param = next( $argv );
404 if ( $param === false ) {
405 $this->error( "$arg needs a value after it\n", true );
407 $options[$option] = $param;
409 $bits = explode( '=', $option, 2 );
410 if( count( $bits ) > 1 ) {
416 $options[$option] = $param;
418 } elseif ( substr( $arg, 0, 1 ) == '-' ) {
420 for ( $p=1; $p<strlen( $arg ); $p++
) {
422 if ( $this->mParams
[$option]['withArg'] ) {
423 $param = next( $argv );
424 if ( $param === false ) {
425 $this->error( "$arg needs a value after it\n", true );
427 $options[$option] = $param;
429 $options[$option] = 1;
437 $this->mOptions
= $options;
438 $this->mArgs
= $args;
439 $this->loadSpecialVars();
440 $this->mInputLoaded
= true;
444 * Run some validation checks on the params, etc
446 private function validateParamsAndArgs() {
447 # Check to make sure we've got all the required ones
448 foreach( $this->mParams
as $opt => $info ) {
449 if( $info['require'] && !$this->hasOption($opt) ) {
450 $this->error( "Param $opt required.\n", true );
454 # Also make sure we've got enough arguments
455 if ( count( $this->mArgs
) < count( $this->mArgList
) ) {
456 $this->error( "Not enough arguments passed", true );
461 * Handle the special variables that are global to all scripts
463 private function loadSpecialVars() {
464 if( $this->hasOption( 'dbuser' ) )
465 $this->mDbUser
= $this->getOption( 'dbuser' );
466 if( $this->hasOption( 'dbpass' ) )
467 $this->mDbPass
= $this->getOption( 'dbpass' );
468 if( $this->hasOption( 'quiet' ) )
469 $this->mQuiet
= true;
470 if( $this->hasOption( 'batch-size' ) )
471 $this->mBatchSize
= $this->getOption( 'batch-size' );
475 * Maybe show the help.
476 * @param $force boolean Whether to force the help to show, default false
478 private function maybeHelp( $force = false ) {
479 if( $this->hasOption('help') ||
in_array( 'help', $this->mArgs
) ||
$force ) {
480 $this->mQuiet
= false;
481 if( $this->mDescription
) {
482 $this->output( "\n" . $this->mDescription
. "\n" );
484 $this->output( "\nUsage: php " . $this->mSelf
);
485 if( $this->mParams
) {
486 $this->output( " [--" . implode( array_keys( $this->mParams
), "|--" ) . "]" );
488 if( $this->mArgList
) {
489 $this->output( " <" . implode( $this->mArgList
, "> <" ) . ">" );
491 $this->output( "\n" );
492 foreach( $this->mParams
as $par => $info ) {
493 $this->output( "\t$par : " . $info['desc'] . "\n" );
500 * Handle some last-minute setup here.
502 private function finalSetup() {
503 global $wgCommandLineMode, $wgUseNormalUser, $wgShowSQLErrors;
504 global $wgTitle, $wgProfiling, $IP, $wgDBadminuser, $wgDBadminpassword;
505 global $wgDBuser, $wgDBpassword, $wgDBservers, $wgLBFactoryConf;
507 # Turn off output buffering again, it might have been turned on in the settings files
508 if( ob_get_level() ) {
512 $wgCommandLineMode = true;
514 # If these were passed, use them
516 $wgDBadminuser = $this->mDbUser
;
518 $wgDBadminpass = $this->mDbPass
;
520 if ( empty( $wgUseNormalUser ) && isset( $wgDBadminuser ) ) {
521 $wgDBuser = $wgDBadminuser;
522 $wgDBpassword = $wgDBadminpassword;
525 foreach ( $wgDBservers as $i => $server ) {
526 $wgDBservers[$i]['user'] = $wgDBuser;
527 $wgDBservers[$i]['password'] = $wgDBpassword;
530 if( isset( $wgLBFactoryConf['serverTemplate'] ) ) {
531 $wgLBFactoryConf['serverTemplate']['user'] = $wgDBuser;
532 $wgLBFactoryConf['serverTemplate']['password'] = $wgDBpassword;
536 if ( defined( 'MW_CMDLINE_CALLBACK' ) ) {
537 $fn = MW_CMDLINE_CALLBACK
;
541 $wgShowSQLErrors = true;
542 @set_time_limit
( 0 );
544 $wgProfiling = false; // only for Profiler.php mode; avoids OOM errors
548 * Potentially debug globals. Originally a feature only
551 public function globals() {
552 if( $this->hasOption( 'globals' ) ) {
558 * Do setup specific to WMF
560 public function loadWikimediaSettings() {
561 global $IP, $wgNoDBParam, $wgUseNormalUser, $wgConf;
563 if ( empty( $wgNoDBParam ) ) {
564 # Check if we were passed a db name
565 if ( isset( $this->mOptions
['wiki'] ) ) {
566 $db = $this->mOptions
['wiki'];
568 $db = array_shift( $this->mArgs
);
570 list( $site, $lang ) = $wgConf->siteFromDB( $db );
572 # If not, work out the language and site the old way
573 if ( is_null( $site ) ||
is_null( $lang ) ) {
579 if ( isset( $this->mArgs
[0] ) ) {
580 $site = array_shift( $this->mArgs
);
590 # This is for the IRC scripts, which now run as the apache user
591 # The apache user doesn't have access to the wikiadmin_pass command
592 if ( $_ENV['USER'] == 'apache' ) {
593 #if ( posix_geteuid() == 48 ) {
594 $wgUseNormalUser = true;
597 putenv( 'wikilang=' . $lang );
600 ini_set( 'include_path', ".:$IP:$IP/includes:$IP/languages:$IP/maintenance" );
602 if ( $lang == 'test' && $site == 'wikipedia' ) {
603 define( 'TESTWIKI', 1 );
608 * Generic setup for most installs. Returns the location of LocalSettings
611 public function loadSettings() {
612 global $wgWikiFarm, $wgCommandLineMode, $IP, $DP;
615 if ( isset( $this->mOptions
['conf'] ) ) {
616 $settingsFile = $this->mOptions
['conf'];
618 $settingsFile = "$IP/LocalSettings.php";
620 if ( isset( $this->mOptions
['wiki'] ) ) {
621 $bits = explode( '-', $this->mOptions
['wiki'] );
622 if ( count( $bits ) == 1 ) {
625 define( 'MW_DB', $bits[0] );
626 define( 'MW_PREFIX', $bits[1] );
629 if ( ! is_readable( $settingsFile ) ) {
630 $this->error( "A copy of your installation's LocalSettings.php\n" .
631 "must exist and be readable in the source directory.\n", true );
633 $wgCommandLineMode = true;
636 return $settingsFile;
640 * Support function for cleaning up redundant text records
641 * @param $delete boolean Whether or not to actually delete the records
642 * @author Rob Church <robchur@gmail.com>
644 protected function purgeRedundantText( $delete = true ) {
645 # Data should come off the master, wrapped in a transaction
646 $dbw = wfGetDB( DB_MASTER
);
649 $tbl_arc = $dbw->tableName( 'archive' );
650 $tbl_rev = $dbw->tableName( 'revision' );
651 $tbl_txt = $dbw->tableName( 'text' );
653 # Get "active" text records from the revisions table
654 $this->output( "Searching for active text records in revisions table..." );
655 $res = $dbw->query( "SELECT DISTINCT rev_text_id FROM $tbl_rev" );
656 while( $row = $dbw->fetchObject( $res ) ) {
657 $cur[] = $row->rev_text_id
;
659 $this->output( "done.\n" );
661 # Get "active" text records from the archive table
662 $this->output( "Searching for active text records in archive table..." );
663 $res = $dbw->query( "SELECT DISTINCT ar_text_id FROM $tbl_arc" );
664 while( $row = $dbw->fetchObject( $res ) ) {
665 $cur[] = $row->ar_text_id
;
667 $this->output( "done.\n" );
669 # Get the IDs of all text records not in these sets
670 $this->output( "Searching for inactive text records..." );
671 $set = implode( ', ', $cur );
672 $res = $dbw->query( "SELECT old_id FROM $tbl_txt WHERE old_id NOT IN ( $set )" );
674 while( $row = $dbw->fetchObject( $res ) ) {
675 $old[] = $row->old_id
;
677 $this->output( "done.\n" );
679 # Inform the user of what we're going to do
680 $count = count( $old );
681 $this->output( "$count inactive items found.\n" );
683 # Delete as appropriate
684 if( $delete && $count ) {
685 $this->output( "Deleting..." );
686 $set = implode( ', ', $old );
687 $dbw->query( "DELETE FROM $tbl_txt WHERE old_id IN ( $set )" );
688 $this->output( "done.\n" );
696 * Get the maintenance directory.
698 protected function getDir() {
699 return dirname( __FILE__
);
703 * Get the list of available maintenance scripts. Note
704 * that if you call this _before_ calling doMaintenance
705 * you won't have any extensions in it yet
708 public static function getMaintenanceScripts() {
709 global $wgMaintenanceScripts;
710 return $wgMaintenanceScripts + self
::getCoreScripts();
714 * Return all of the core maintenance scripts
715 * @todo Don't make this list, maybe just scan all the files in /maintenance?
718 private static function getCoreScripts() {
719 if( !self
::$mCoreScripts ) {
720 $d = dirname( __FILE__
) . DIRECTORY_SEPARATOR
;
721 self
::$mCoreScripts = array(
723 'AddWiki' => $d . 'addwiki.php',
724 'AttachLatest' => $d . 'attachLatest.php',
725 'BenchmarkPurge' => $d . 'benchmarkPurge.php',
726 'ChangePassword' => $d . 'changePassword.php',
727 'CheckAutoLoader' => $d . 'checkAutoLoader.php',
728 'CheckBadRedirects' => $d . 'checkBadRedirects.php',
729 'CheckImages' => $d . 'checkImages.php',
730 'CheckSyntax' => $d . 'checkSyntax.php',
731 'CheckUsernames' => $d . 'checkUsernames.php',
732 'CleanupSpam' => $d . 'cleanupSpam.php',
733 'ClearInterwikiCache' => $d . 'clear_interwiki_cache.php',
734 'clear_stats' => $d . 'clear_stats.php',
735 'ConvertLinks' => $d . 'convertLinks.php',
736 'ConvertUserOptions' => $d . 'convertUserOptions.php',
737 'CreateAndPromote' => $d . 'createAndPromote.php',
738 'DeleteArchivedFiles' => $d . 'deleteArchivedFiles.php',
739 'DeleteArchivedRevisions' => $d . 'deleteArchivedRevisions.php',
740 'DeleteBatch' => $d . 'deleteBatch.php',
741 'DeleteDefaultMessages' => $d . 'deleteDefaultMessages.php',
742 'DeleteImageCache' => $d . 'deleteImageMemcached.php',
743 'DeleteOldRevisions' => $d . 'deleteOldRevisions.php',
744 'DeleteOrphanedRevisions' => $d . 'deleteOrphanedRevisions.php',
745 'DeleteRevision' => $d . 'deleteRevision.php',
746 'DumpLinks' => $d . 'dumpLinks.php',
747 'DumpSisterSites' => $d . 'dumpSisterSites.php',
748 'UploadDumper' => $d . 'dumpUploads.php',
749 'EditCLI' => $d . 'edit.php',
750 'EvalPrompt' => $d . 'eval.php',
751 'FetchText' => $d . 'fetchText.php',
752 'FindHooks' => $d . 'findhooks.php',
753 'FixSlaveDesync' => $d . 'fixSlaveDesync.php',
754 'FixTimestamps' => $d . 'fixTimestamps.php',
755 'FixUserRegistration' => $d . 'fixUserRegistration.php',
756 'GenerateSitemap' => $d . 'generateSitemap.php',
757 'GetLagTimes' => $d . 'getLagTimes.php',
758 'GetSlaveServer' => $d . 'getSlaveServer.php',
759 'InitEditCount' => $d . 'initEditCount.php',
760 'InitStats' => $d . 'initStats.php',
761 'mcTest' => $d . 'mctest.php',
762 'MoveBatch' => $d . 'moveBatch.php',
763 'nextJobDb' => $d . 'nextJobDB.php',
764 'NukeNS' => $d . 'nukeNS.php',
765 'NukePage' => $d . 'nukePage.php',
766 'Orphans' => $d . 'orphans.php',
767 'PopulateCategory' => $d . 'populateCategory.php',
768 'PopulateLogSearch' => $d . 'populateLogSearch.php',
769 'PopulateParentId' => $d . 'populateParentId.php',
770 'Protect' => $d . 'protect.php',
771 'PurgeList' => $d . 'purgeList.php',
772 'PurgeOldText' => $d . 'purgeOldText.php',
773 'ReassignEdits' => $d . 'reassignEdits.php',
774 'RebuildAll' => $d . 'rebuildall.php',
775 'RebuildFileCache' => $d . 'rebuildFileCache.php',
776 'RebuildLocalisationCache' => $d . 'rebuildLocalisationCache.php',
777 'RebuildMessages' => $d . 'rebuildmessages.php',
778 'RebuildRecentchanges' => $d . 'rebuildrecentchanges.php',
779 'RebuildTextIndex' => $d . 'rebuildtextindex.php',
780 'RefreshImageCount' => $d . 'refreshImageCount.php',
781 'RefreshLinks' => $d . 'refreshLinks.php',
782 'RemoveUnusedAccounts' => $d . 'removeUnusedAccounts.php',
783 'RenameDbPrefix' => $d . 'renameDbPrefix.php',
784 'RenameWiki' => $d . 'renamewiki.php',
785 'DumpRenderer' => $d . 'renderDump.php',
786 'RunJobs' => $d . 'runJobs.php',
787 'ShowJobs' => $d . 'showJobs.php',
788 'ShowStats' => $d . 'showStats.php',
789 'MwSql' => $d . 'sql.php',
790 'CacheStats' => $d . 'stats.php',
791 'Undelete' => $d . 'undelete.php',
792 'UpdateArticleCount' => $d . 'updateArticleCount.php',
793 'UpdateRestrictions' => $d . 'updateRestrictions.php',
794 'UpdateSearchIndex' => $d . 'updateSearchIndex.php',
795 'UpdateSpecialPages' => $d . 'updateSpecialPages.php',
796 'WaitForSlave' => $d . 'waitForSlave.php',
799 'AllTrans' => $d . 'language/alltrans.php',
802 return self
::$mCoreScripts;