[MediaWiki-commits] [Gerrit] Preserve veaction, vesection on special redirects to wiki pages - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Preserve veaction, vesection on special redirects to wiki pages .. Preserve veaction, vesection on special redirects to wiki pages Bug: 50877 Change-Id: I61fcc9109105ea25f30f89ec18d8fa0d13dcde82 --- M VisualEditor.hooks.php M VisualEditor.php 2 files changed, 13 insertions(+), 0 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php index df50dd8..a79b6e4 100644 --- a/VisualEditor.hooks.php +++ b/VisualEditor.hooks.php @@ -665,4 +665,15 @@ public static function onParserTestGlobals( array $settings ) { $settings['wgVisualEditorInParserTests'] = true; } + + /** +* @param Array $redirectParams Parameters preserved on special page redirects +* to wiki pages +* @return bool Always true +*/ + public static function onRedirectSpecialArticleRedirectParams( $redirectParams ) { + array_push( $redirectParams, 'veaction', 'vesection' ); + + return true; + } } diff --git a/VisualEditor.php b/VisualEditor.php index ab37eb8..4d2e549 100644 --- a/VisualEditor.php +++ b/VisualEditor.php @@ -60,6 +60,8 @@ $wgHooks['GetPreferences'][] = 'VisualEditorHooks::onGetPreferences'; $wgHooks['ListDefinedTags'][] = 'VisualEditorHooks::onListDefinedTags'; $wgHooks['MakeGlobalVariablesScript'][] = 'VisualEditorHooks::onMakeGlobalVariablesScript'; +$wgHooks['RedirectSpecialArticleRedirectParams'][] = + 'VisualEditorHooks::onRedirectSpecialArticleRedirectParams'; $wgHooks['ResourceLoaderGetConfigVars'][] = 'VisualEditorHooks::onResourceLoaderGetConfigVars'; $wgHooks['ResourceLoaderRegisterModules'][] = 'VisualEditorHooks::onResourceLoaderRegisterModules'; $wgHooks['ResourceLoaderTestModules'][] = 'VisualEditorHooks::onResourceLoaderTestModules'; -- To view, visit https://gerrit.wikimedia.org/r/134788 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I61fcc9109105ea25f30f89ec18d8fa0d13dcde82 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Mattflaschen mflasc...@wikimedia.org Gerrit-Reviewer: Catrope roan.katt...@gmail.com Gerrit-Reviewer: Jforrester jforres...@wikimedia.org Gerrit-Reviewer: Krinkle krinklem...@gmail.com Gerrit-Reviewer: Mattflaschen mflasc...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Preserve veaction, vesection on special redirects to wiki pages - change (mediawiki...VisualEditor)
Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/134788 Change subject: Preserve veaction, vesection on special redirects to wiki pages .. Preserve veaction, vesection on special redirects to wiki pages Bug: 50877 Change-Id: I61fcc9109105ea25f30f89ec18d8fa0d13dcde82 --- M VisualEditor.hooks.php M VisualEditor.php 2 files changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/88/134788/1 diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php index df50dd8..a79b6e4 100644 --- a/VisualEditor.hooks.php +++ b/VisualEditor.hooks.php @@ -665,4 +665,15 @@ public static function onParserTestGlobals( array $settings ) { $settings['wgVisualEditorInParserTests'] = true; } + + /** +* @param Array $redirectParams Parameters preserved on special page redirects +* to wiki pages +* @return bool Always true +*/ + public static function onRedirectSpecialArticleRedirectParams( $redirectParams ) { + array_push( $redirectParams, 'veaction', 'vesection' ); + + return true; + } } diff --git a/VisualEditor.php b/VisualEditor.php index ab37eb8..8a7390f 100644 --- a/VisualEditor.php +++ b/VisualEditor.php @@ -60,6 +60,7 @@ $wgHooks['GetPreferences'][] = 'VisualEditorHooks::onGetPreferences'; $wgHooks['ListDefinedTags'][] = 'VisualEditorHooks::onListDefinedTags'; $wgHooks['MakeGlobalVariablesScript'][] = 'VisualEditorHooks::onMakeGlobalVariablesScript'; +$wgHooks['RedirectSpecialArticleRedirectParams'][] = 'VisualEditorHooks::onRedirectSpecialArticleRedirectParams'; $wgHooks['ResourceLoaderGetConfigVars'][] = 'VisualEditorHooks::onResourceLoaderGetConfigVars'; $wgHooks['ResourceLoaderRegisterModules'][] = 'VisualEditorHooks::onResourceLoaderRegisterModules'; $wgHooks['ResourceLoaderTestModules'][] = 'VisualEditorHooks::onResourceLoaderTestModules'; -- To view, visit https://gerrit.wikimedia.org/r/134788 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I61fcc9109105ea25f30f89ec18d8fa0d13dcde82 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Mattflaschen mflasc...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits