Remove "return true" legacy behavior from hook handler functions

Change-Id: Ie33721116c5ae665f45ed0a8baeace031cfeca89
This commit is contained in:
Derick Alangi 2019-02-02 10:05:09 +01:00
parent ef09440a94
commit 92c432ab83

View file

@ -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;
}
}