Preserve veaction, vesection on special redirects to wiki pages

Bug: 50877
Change-Id: I61fcc9109105ea25f30f89ec18d8fa0d13dcde82
This commit is contained in:
Matthew Flaschen 2014-05-22 03:04:41 -04:00
parent e288385569
commit a50e5c6fd6
2 changed files with 13 additions and 0 deletions

View file

@ -665,4 +665,15 @@ class VisualEditorHooks {
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;
}
}

View file

@ -60,6 +60,8 @@ $wgHooks['GetBetaFeaturePreferences'][] = 'VisualEditorHooks::onGetBetaPreferenc
$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';