Index: trunk/phase3/includes/api/ApiEditPage.php |
— | — | @@ -60,7 +60,7 @@ |
61 | 61 | $this->dieUsageMsg(array('invalidtitle', $params['title'])); |
62 | 62 | // Some functions depend on $wgTitle == $ep->mTitle |
63 | 63 | global $wgTitle; |
64 | | - $titleObj = $wgTitle; |
| 64 | + $wgTitle = $titleObj; |
65 | 65 | |
66 | 66 | if($params['createonly'] && $titleObj->exists()) |
67 | 67 | $this->dieUsageMsg(array('createonly-exists')); |
Index: trunk/phase3/api.php |
— | — | @@ -74,7 +74,7 @@ |
75 | 75 | |
76 | 76 | // Set a dummy $wgTitle, because $wgTitle == null breaks various things |
77 | 77 | // In a perfect world this wouldn't be necessary |
78 | | -$wgTitle = Title::newFromTitle('API'); |
| 78 | +$wgTitle = Title::newFromText('API'); |
79 | 79 | |
80 | 80 | /* Construct an ApiMain with the arguments passed via the URL. What we get back |
81 | 81 | * is some form of an ApiMain, possibly even one that produces an error message, |