mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/WikiEditor
synced 2024-11-13 18:36:57 +00:00
Merge "Remove usage of EditPageBeforeEditToolbar"
This commit is contained in:
commit
787867b1fe
|
@ -27,9 +27,6 @@
|
|||
"GetPreferences": [
|
||||
"WikiEditorHooks::getPreferences"
|
||||
],
|
||||
"EditPageBeforeEditToolbar": [
|
||||
"WikiEditorHooks::EditPageBeforeEditToolbar"
|
||||
],
|
||||
"EditPage::showEditForm:fields": [
|
||||
"WikiEditorHooks::editPageShowEditFormFields"
|
||||
],
|
||||
|
|
|
@ -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
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue