Merge "Remove usage of EditPageBeforeEditToolbar"

This commit is contained in:
jenkins-bot 2020-01-26 01:04:49 +00:00 committed by Gerrit Code Review
commit 787867b1fe
2 changed files with 0 additions and 22 deletions

View file

@ -27,9 +27,6 @@
"GetPreferences": [ "GetPreferences": [
"WikiEditorHooks::getPreferences" "WikiEditorHooks::getPreferences"
], ],
"EditPageBeforeEditToolbar": [
"WikiEditorHooks::EditPageBeforeEditToolbar"
],
"EditPage::showEditForm:fields": [ "EditPage::showEditForm:fields": [
"WikiEditorHooks::editPageShowEditFormFields" "WikiEditorHooks::editPageShowEditFormFields"
], ],

View file

@ -163,25 +163,6 @@ class WikiEditorHooks {
} }
} }
/**
* EditPageBeforeEditToolbar hook
*
* Disable the old toolbar if the new one is enabled
*
* @param string &$toolbar
* @return bool
*/
public static function EditPageBeforeEditToolbar( &$toolbar ) {
global $wgUser;
if ( $wgUser->getOption( 'usebetatoolbar' ) ) {
$toolbar = '';
// Return false to signify that the toolbar has been over-written, so
// the old toolbar code shouldn't be added to the page.
return false;
}
return true;
}
/** /**
* GetPreferences hook * GetPreferences hook
* *