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

This commit is contained in:
jenkins-bot 2012-12-12 01:56:16 +00:00 committed by Gerrit Code Review
commit a8a26ee7a3

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 ) {