mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-23 22:13:34 +00:00
Preserve veaction, vesection on special redirects to wiki pages
Bug: 50877 Change-Id: I61fcc9109105ea25f30f89ec18d8fa0d13dcde82
This commit is contained in:
parent
e288385569
commit
a50e5c6fd6
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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';
|
||||
|
|
Loading…
Reference in a new issue