From 536f98c7600397143c5f233a34c429111b97ec00 Mon Sep 17 00:00:00 2001 From: Max Semenik Date: Fri, 3 Apr 2015 01:33:38 -0700 Subject: [PATCH] Kill Dwimmerlaik Seriously, the ops team spent some time trying to find that page during an outage, while in fact it's an obscure Tolkien reference - better be clear. Also, set the other dummy titles to something very clearly explaining what's going on and where. Change-Id: I6f33a2ea5030f22a258830a33f7bcefa7f0acd85 --- api.php | 2 +- includes/MediaWiki.php | 4 +++- includes/cache/MessageCache.php | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/api.php b/api.php index 7788a36c2f..dbd377dea1 100644 --- a/api.php +++ b/api.php @@ -59,7 +59,7 @@ if ( !$wgEnableAPI ) { // Set a dummy $wgTitle, because $wgTitle == null breaks various things // In a perfect world this wouldn't be necessary -$wgTitle = Title::makeTitle( NS_MAIN, 'API' ); +$wgTitle = Title::makeTitle( NS_SPECIAL, 'Badtitle/dummy title for API calls set in api.php' ); // RequestContext will read from $wgTitle, but it will also whine about it. // In a perfect world this wouldn't be necessary either. diff --git a/includes/MediaWiki.php b/includes/MediaWiki.php index c4af16d6af..a67c728d26 100644 --- a/includes/MediaWiki.php +++ b/includes/MediaWiki.php @@ -462,7 +462,9 @@ class MediaWiki { // Send Ajax requests to the Ajax dispatcher. if ( $this->config->get( 'UseAjax' ) && $request->getVal( 'action' ) === 'ajax' ) { // Set a dummy title, because $wgTitle == null might break things - $title = Title::makeTitle( NS_MAIN, 'AJAX' ); + $title = Title::makeTitle( NS_SPECIAL, 'Badtitle/performing an AJAX call in ' + . __METHOD__ + ); $this->context->setTitle( $title ); $wgTitle = $title; diff --git a/includes/cache/MessageCache.php b/includes/cache/MessageCache.php index 82919c7409..a55e25a343 100644 --- a/includes/cache/MessageCache.php +++ b/includes/cache/MessageCache.php @@ -1049,7 +1049,7 @@ class MessageCache { if ( !$title ) { # It's not uncommon having a null $wgTitle in scripts. See r80898 # Create a ghost title in such case - $title = Title::newFromText( 'Dwimmerlaik' ); + $title = Title::makeTitle( NS_SPECIAL, 'Badtitle/title not set in ' . __METHOD__ ); } $this->mInParser = true; -- 2.20.1