Kill Dwimmerlaik
authorMax Semenik <maxsem.wiki@gmail.com>
Fri, 3 Apr 2015 08:33:38 +0000 (01:33 -0700)
committerMax Semenik <maxsem.wiki@gmail.com>
Fri, 3 Apr 2015 21:05:37 +0000 (14:05 -0700)
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
includes/MediaWiki.php
includes/cache/MessageCache.php

diff --git a/api.php b/api.php
index 7788a36..dbd377d 100644 (file)
--- 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.
index c4af16d..a67c728 100644 (file)
@@ -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;
 
index 82919c7..a55e25a 100644 (file)
@@ -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;