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