mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeEditor
synced 2024-11-23 14:56:43 +00:00
Remove "return true" legacy behavior from hook handler functions
Change-Id: Ie33721116c5ae665f45ed0a8baeace031cfeca89
This commit is contained in:
parent
ef09440a94
commit
92c432ab83
|
@ -31,20 +31,18 @@ class CodeEditorHooks {
|
|||
/**
|
||||
* @param User $user
|
||||
* @param array &$defaultPreferences
|
||||
* @return true
|
||||
*/
|
||||
public static function getPreferences( User $user, &$defaultPreferences ) {
|
||||
$defaultPreferences['usecodeeditor'] = [
|
||||
'type' => 'api',
|
||||
'default' => '1',
|
||||
];
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param EditPage $editpage
|
||||
* @param OutputPage $output
|
||||
* @return true
|
||||
* @throws ErrorPageError
|
||||
*/
|
||||
public static function editPageShowEditFormInitial( EditPage $editpage, OutputPage $output ) {
|
||||
$title = $editpage->getContextTitle();
|
||||
|
@ -58,6 +56,5 @@ class CodeEditorHooks {
|
|||
} elseif ( !ExtensionRegistry::getInstance()->isLoaded( "WikiEditor" ) ) {
|
||||
throw new ErrorPageError( "codeeditor-error-title", "codeeditor-error-message" );
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue