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