X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialApiHelp.php;h=c725d106e1e6ab876d55f55fe301c52c44938c9e;hb=3857d06f1cb97d6833c348a0dff2731e629bd802;hp=b43911f56d94e4046b80db1f22bece791b010aa5;hpb=31d239f9d9e2516fc725d9b743ece0dfe72c23a2;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialApiHelp.php b/includes/specials/SpecialApiHelp.php index b43911f56d..c725d106e1 100644 --- a/includes/specials/SpecialApiHelp.php +++ b/includes/specials/SpecialApiHelp.php @@ -39,13 +39,13 @@ class SpecialApiHelp extends UnlistedSpecialPage { // These come from transclusions $request = $this->getRequest(); - $options = array( + $options = [ 'action' => 'help', 'nolead' => true, 'submodules' => $request->getCheck( 'submodules' ), 'recursivesubmodules' => $request->getCheck( 'recursivesubmodules' ), 'title' => $request->getVal( 'title', $this->getPageTitle( '$1' )->getPrefixedText() ), - ); + ]; // These are for linking from wikitext, since url parameters are a pain // to do. @@ -77,8 +77,8 @@ class SpecialApiHelp extends UnlistedSpecialPage { $main = new ApiMain( $this->getContext(), false ); try { $module = $main->getModuleFromPath( $moduleName ); - } catch ( UsageException $ex ) { - $this->getOutput()->addHTML( Html::rawElement( 'span', array( 'class' => 'error' ), + } catch ( ApiUsageException $ex ) { + $this->getOutput()->addHTML( Html::rawElement( 'span', [ 'class' => 'error' ], $this->msg( 'apihelp-no-such-module', $moduleName )->inContentLanguage()->parse() ) ); return;