mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-24 10:48:42 +00:00
Don't use RequestContext::getMain() if a context is available
Change-Id: I2b16cf8f437ccda7cb0feb137710394e4a90d3b5
This commit is contained in:
parent
3b277a7a28
commit
4b1a3eb059
|
@ -140,7 +140,7 @@ class VisualEditorHooks {
|
||||||
* @returns boolean true
|
* @returns boolean true
|
||||||
*/
|
*/
|
||||||
public static function onEditPageShowEditFormFields( EditPage $editPage, OutputPage $output ) {
|
public static function onEditPageShowEditFormFields( EditPage $editPage, OutputPage $output ) {
|
||||||
$request = RequestContext::getMain()->getRequest();
|
$request = $output->getRequest();
|
||||||
if ( $request->getBool( 'veswitched' ) ) {
|
if ( $request->getBool( 'veswitched' ) ) {
|
||||||
$output->addHTML( Xml::input( 'veswitched', false, '1', array( 'type' => 'hidden' ) ) );
|
$output->addHTML( Xml::input( 'veswitched', false, '1', array( 'type' => 'hidden' ) ) );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue