Make {{PAGENAME}} in edit notices work by setting $wgTitle

This is TERRIBLY DIRTY and I am ashamed

Change-Id: Ief6f7b81de966d5f87e802c4385ae041f98bde6d
This commit is contained in:
Catrope 2012-12-11 17:50:11 -08:00
parent 14501243b4
commit 1dbe1127e5

View file

@ -173,6 +173,9 @@ class ApiVisualEditor extends ApiBase {
if ( $params['paction'] === 'parse' ) {
$parsed = $this->getHTML( $page, $parserParams );
// Dirty hack to provide the correct context for edit notices
global $wgTitle; // FIXME NOOOOOOOOES
$wgTitle = $page;
$notices = $page->getEditNotices();
if ( count( $wgVisualEditorEditNotices ) ) {
foreach ( $wgVisualEditorEditNotices as $key ) {