[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Fix logic for redirecting unsupported browsers to old editor
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/348781 ) Change subject: Fix logic for redirecting unsupported browsers to old editor .. Fix logic for redirecting unsupported browsers to old editor Browsers that support JavaScript, but that get served a no-JS experience by MediaWiki (for example, IE 6), would always get redirected to an URL with =1 - even when it was unnecessary because we're not in single-tab mode, and even when the form was previously submitted, causing the loss of user input. Follow-up to 188ec0f5d23c0daa55bdea1a019a6b9232fe411e. Bug: T163226 Change-Id: I212baa0f4305559fa6f6abdfa230b76c122d4909 --- M VisualEditor.hooks.php 1 file changed, 7 insertions(+), 7 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified Jforrester: Looks good to me, but someone else must approve diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php index 7982548..3ffe821 100644 --- a/VisualEditor.hooks.php +++ b/VisualEditor.hooks.php @@ -173,14 +173,14 @@ $titleMsg = $title->exists() ? 'editing' : 'creating'; $out->setPageTitle( wfMessage( $titleMsg, $title->getPrefixedText() ) ); $out->addWikiMsg( 'visualeditor-toload', wfExpandUrl( $url ) ); + $out->addScript( Html::inlineScript( + "(window.NORLQ=window.NORLQ||[]).push(" . + "function(){" . + "location.href=\"$url\";" . + "}" . + ");" + ) ); } - $out->addScript( Html::inlineScript( - "(window.NORLQ=window.NORLQ||[]).push(" . - "function(){" . - "location.href=\"$url\";" . - "}" . - ");" - ) ); return $ret; } -- To view, visit https://gerrit.wikimedia.org/r/348781 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I212baa0f4305559fa6f6abdfa230b76c122d4909 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Bartosz DziewońskiGerrit-Reviewer: Esanders Gerrit-Reviewer: Jforrester Gerrit-Reviewer: Krinkle Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Fix logic for redirecting unsupported browsers to old editor
Bartosz Dziewoński has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/348781 ) Change subject: Fix logic for redirecting unsupported browsers to old editor .. Fix logic for redirecting unsupported browsers to old editor Browsers that support JavaScript, but that get served a no-JS experience by MediaWiki (for example, IE 6), would always get redirected to an URL with =1 - even when it was unnecessary because we're not in single-tab mode, and even when the form was previously submitted, causing the loss of user input. Follow-up to 188ec0f5d23c0daa55bdea1a019a6b9232fe411e. Bug: T163226 Change-Id: I212baa0f4305559fa6f6abdfa230b76c122d4909 --- M VisualEditor.hooks.php 1 file changed, 7 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/81/348781/1 diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php index 7982548..3ffe821 100644 --- a/VisualEditor.hooks.php +++ b/VisualEditor.hooks.php @@ -173,14 +173,14 @@ $titleMsg = $title->exists() ? 'editing' : 'creating'; $out->setPageTitle( wfMessage( $titleMsg, $title->getPrefixedText() ) ); $out->addWikiMsg( 'visualeditor-toload', wfExpandUrl( $url ) ); + $out->addScript( Html::inlineScript( + "(window.NORLQ=window.NORLQ||[]).push(" . + "function(){" . + "location.href=\"$url\";" . + "}" . + ");" + ) ); } - $out->addScript( Html::inlineScript( - "(window.NORLQ=window.NORLQ||[]).push(" . - "function(){" . - "location.href=\"$url\";" . - "}" . - ");" - ) ); return $ret; } -- To view, visit https://gerrit.wikimedia.org/r/348781 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I212baa0f4305559fa6f6abdfa230b76c122d4909 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits