mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/WikiEditor
synced 2024-11-27 17:50:44 +00:00
fix for bug34431 - Disable the old toolbar if the new toolbar is enabled
This commit is contained in:
parent
23cc687a9b
commit
0609dffdf3
Notes:
Benny Situ
2012-02-17 22:13:11 +00:00
|
@ -213,6 +213,22 @@ class WikiEditorHooks {
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* EditPageBeforeEditToolbar hook
|
||||
*
|
||||
* Disable the old toolbar if the new one is enabled
|
||||
*
|
||||
* @param $toolbar html
|
||||
* @return bool
|
||||
*/
|
||||
public static function EditPageBeforeEditToolbar( &$toolbar ) {
|
||||
if ( self::isEnabled( 'toolbar' ) ) {
|
||||
$toolbar = '';
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* GetPreferences hook
|
||||
*
|
||||
|
|
|
@ -62,6 +62,7 @@ $wgHooks['EditPage::showEditForm:initial'][] = 'WikiEditorHooks::editPageShowEdi
|
|||
$wgHooks['GetPreferences'][] = 'WikiEditorHooks::getPreferences';
|
||||
$wgHooks['ResourceLoaderGetConfigVars'][] = 'WikiEditorHooks::resourceLoaderGetConfigVars';
|
||||
$wgHooks['MakeGlobalVariablesScript'][] = 'WikiEditorHooks::makeGlobalVariablesScript';
|
||||
$wgHooks['EditPageBeforeEditToolbar'][] = 'WikiEditorHooks::EditPageBeforeEditToolbar';
|
||||
|
||||
$wikiEditorTpl = array(
|
||||
'localBasePath' => dirname( __FILE__ ) . '/modules',
|
||||
|
|
Loading…
Reference in a new issue