Set context title when rendering edit notices and checkboxes

Bug: 59608
Bug: 63600
Change-Id: Ia2fdb3b3d383415feaf122d235d0c9a9e0ba0900
This commit is contained in:
Roan Kattouw 2014-04-18 17:13:17 -07:00 committed by Krenair
parent f28f5e3996
commit ddb8d826e3

View file

@ -315,6 +315,7 @@ class ApiVisualEditor extends ApiBase {
// Dirty hack to provide the correct context for edit notices
global $wgTitle; // FIXME NOOOOOOOOES
$wgTitle = $page;
RequestContext::getMain()->setTitle( $page );
$notices = $page->getEditNotices();
if ( $user->isAnon() ) {
$notices[] = $this->msg( 'anoneditwarning' )->parseAsBlock();