// Some last includes
require_once "$IP/includes/Setup.php";
-// Much much faster startup than creating a title object
-$wgTitle = null;
-
// Do the work
try {
$maintenance->execute();
}
function execute() {
- global $IP, $wgTitle;
+ global $IP;
$siteName = isset( $this->mArgs[0] ) ? $this->mArgs[0] : "Don't care"; // Will not be set if used with --env-checks
$adminName = isset( $this->mArgs[1] ) ? $this->mArgs[1] : null;
- $wgTitle = Title::newFromText( 'Installer script' );
$dbpassfile = $this->getOption( 'dbpassfile', false );
if ( $dbpassfile !== false ) {
}
public function execute() {
- global $wgTitle;
-
$this->db = wfGetDB( DB_MASTER );
- $wgTitle = Title::newFromText( 'Namespace title conflict cleanup script' );
$fix = $this->hasOption( 'fix' );
$suffix = $this->getOption( 'suffix', '' );
}
public function execute() {
- global $wgTitle;
- $wgTitle = Title::newFromText( 'Orphan revision cleanup script' );
$this->checkOrphans( $this->hasOption( 'fix' ) );
$this->checkSeparation( $this->hasOption( 'fix' ) );
# Does not work yet, do not use
public function execute() {
global $wgUseFileCache, $wgReadOnly, $wgContentNamespaces, $wgRequestTime;
- global $wgTitle, $wgOut;
+ global $wgOut;
if ( !$wgUseFileCache ) {
$this->error( "Nothing to do -- \$wgUseFileCache is disabled.", true );
}
$rebuilt = false;
$wgRequestTime = microtime( true ); # bug 22852
- $wgTitle = Title::makeTitleSafe( $row->page_namespace, $row->page_title );
- if ( null == $wgTitle ) {
+ $title = Title::makeTitleSafe( $row->page_namespace, $row->page_title );
+ if ( null == $title ) {
$this->output( "Page {$row->page_id} has bad title\n" );
continue; // broken title?
}
$context = new RequestContext;
- $context->setTitle( $wgTitle );
- $article = Article::newFromTitle( $wgTitle, $context );
+ $context->setTitle( $title );
+ $article = Article::newFromTitle( $title, $context );
$context->setWikiPage( $article->getPage() );
$wgOut = $context->getOutput(); // set display title
// If the article is cacheable, then load it
if ( $article->isFileCacheable() ) {
- $cache = HTMLFileCache::newFromTitle( $wgTitle, 'view' );
+ $cache = HTMLFileCache::newFromTitle( $title, 'view' );
if ( $cache->isCacheGood() ) {
if ( $overwrite ) {
$rebuilt = true;
$blockEnd += $this->mBatchSize;
}
$this->output( "Done!\n" );
-
- // Remove these to be safe
- if ( isset( $wgTitle ) ) {
- unset( $wgTitle );
- }
}
}
}
public function execute() {
- global $wgTitle;
-
// Shouldn't be needed for Postgres
$this->db = wfGetDB( DB_MASTER );
if ( $this->db->getType() == 'postgres' ) {
}
}
- $wgTitle = Title::newFromText( "Rebuild text index script" );
-
if ( $this->db->getType() == 'mysql' ) {
$this->dropMysqlTextIndex();
$this->populateSearchIndex();
}
public function execute() {
- global $wgTitle;
-
if ( wfReadOnly() ) {
$this->error( "Unable to run jobs; the wiki is in read-only mode.", 1 ); // die
}
$maxJobs = $this->getOption( 'maxjobs', false );
$maxTime = $this->getOption( 'maxtime', false );
$startTime = time();
- $wgTitle = Title::newFromText( 'RunJobs.php' );
$group = JobQueueGroup::singleton();
// Handle any required periodic queue maintenance
}
function execute() {
- global $wgVersion, $wgTitle, $wgLang, $wgAllowSchemaUpdates;
+ global $wgVersion, $wgLang, $wgAllowSchemaUpdates;
if ( !$wgAllowSchemaUpdates && !( $this->hasOption( 'force' ) || $this->hasOption( 'schema' ) || $this->hasOption( 'noschema' ) ) ) {
$this->error( "Do not run update.php on this wiki. If you're seeing this you should\n"
}
$wgLang = Language::factory( 'en' );
- $wgTitle = Title::newFromText( "MediaWiki database updater" );
define( 'MW_UPDATER', true );