Merge "Preserve veaction, vesection on special redirects to wiki pages"

This commit is contained in:
jenkins-bot 2014-05-23 23:38:56 +00:00 committed by Gerrit Code Review
commit 40315e5bf6
2 changed files with 13 additions and 0 deletions

View file

@ -665,4 +665,15 @@ class VisualEditorHooks {
public static function onParserTestGlobals( array &$settings ) { public static function onParserTestGlobals( array &$settings ) {
$settings['wgVisualEditorInParserTests'] = true; $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['GetPreferences'][] = 'VisualEditorHooks::onGetPreferences';
$wgHooks['ListDefinedTags'][] = 'VisualEditorHooks::onListDefinedTags'; $wgHooks['ListDefinedTags'][] = 'VisualEditorHooks::onListDefinedTags';
$wgHooks['MakeGlobalVariablesScript'][] = 'VisualEditorHooks::onMakeGlobalVariablesScript'; $wgHooks['MakeGlobalVariablesScript'][] = 'VisualEditorHooks::onMakeGlobalVariablesScript';
$wgHooks['RedirectSpecialArticleRedirectParams'][] =
'VisualEditorHooks::onRedirectSpecialArticleRedirectParams';
$wgHooks['ResourceLoaderGetConfigVars'][] = 'VisualEditorHooks::onResourceLoaderGetConfigVars'; $wgHooks['ResourceLoaderGetConfigVars'][] = 'VisualEditorHooks::onResourceLoaderGetConfigVars';
$wgHooks['ResourceLoaderRegisterModules'][] = 'VisualEditorHooks::onResourceLoaderRegisterModules'; $wgHooks['ResourceLoaderRegisterModules'][] = 'VisualEditorHooks::onResourceLoaderRegisterModules';
$wgHooks['ResourceLoaderTestModules'][] = 'VisualEditorHooks::onResourceLoaderTestModules'; $wgHooks['ResourceLoaderTestModules'][] = 'VisualEditorHooks::onResourceLoaderTestModules';