mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-23 10:19:35 +00:00
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:
parent
14501243b4
commit
1dbe1127e5
|
@ -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 ) {
|
||||
|
|
Loading…
Reference in a new issue