API performance fixes: avoid unstubbing $wgContLang and $wgUser
[lhc/web/wiklou.git] / api.php
diff --git a/api.php b/api.php
index 852a808..10baa13 100644 (file)
--- a/api.php
+++ b/api.php
@@ -104,7 +104,7 @@ define( 'MW_API', true );
 
 // Set a dummy $wgTitle, because $wgTitle == null breaks various things
 // In a perfect world this wouldn't be necessary
-$wgTitle = Title::newFromText( 'API' );
+$wgTitle = Title::makeTitle( NS_MAIN, 'API' );
 
 /* Construct an ApiMain with the arguments passed via the URL. What we get back
  * is some form of an ApiMain, possibly even one that produces an error message,