Cscott has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/84436


Change subject: Don't break core's parserTests if VisualEditor is installed.
......................................................................

Don't break core's parserTests if VisualEditor is installed.

VisualEditor's hook changes the edit section link, which changes the output
of certain parser tests so that they no longer match the expected text.
Disable the `onDoEditSectionLink` hook when we're running maintenance
scripts (which include the parserTests) to avoid the spurious failures.

Change-Id: Ic958d88f443ac37ba304d3256e2bb5ea2fde820d
---
M VisualEditor.hooks.php
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/36/84436/1

diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php
index 17f9016..23dddbc 100644
--- a/VisualEditor.hooks.php
+++ b/VisualEditor.hooks.php
@@ -170,7 +170,9 @@
         */
        public static function onDoEditSectionLink( $skin, $title, $section, 
$tooltip, &$result, $lang ) {
                // Only do this if the user has VE enabled
+               // (and we're not in parserTests or other maintenance scripts)
                if (
+                       defined( 'RUN_MAINTENANCE_IF_MAIN' ) ||
                        !$skin->getUser()->getOption( 'visualeditor-enable' ) ||
                        $skin->getUser()->getOption( 
'visualeditor-betatempdisable' )
                ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/84436
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic958d88f443ac37ba304d3256e2bb5ea2fde820d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Cscott <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to