mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-27 12:16:51 +00:00
Merge "Disable VE on redirect pages"
This commit is contained in:
commit
78c426d2eb
|
@ -23,6 +23,8 @@ class VisualEditorHooks {
|
||||||
public static function onBeforePageDisplay( &$output, &$skin ) {
|
public static function onBeforePageDisplay( &$output, &$skin ) {
|
||||||
global $wgVisualEditorNamespaces;
|
global $wgVisualEditorNamespaces;
|
||||||
if (
|
if (
|
||||||
|
// Disable on redirect pages until redirects are editable
|
||||||
|
!$skin->getTitle()->isRedirect() &&
|
||||||
// User has the 'visualeditor-enable' preference set
|
// User has the 'visualeditor-enable' preference set
|
||||||
$skin->getUser()->getOption( 'visualeditor-enable' ) &&
|
$skin->getUser()->getOption( 'visualeditor-enable' ) &&
|
||||||
in_array( $skin->getSkinName(), self::$supportedSkins ) &&
|
in_array( $skin->getSkinName(), self::$supportedSkins ) &&
|
||||||
|
|
Loading…
Reference in a new issue