X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiQueryCategories.php;h=c4428d575a1a845cec7f59d65b5199b7f31c533a;hb=f23ff352ac8b883e958d3a7f506f991571d18d88;hp=63d0f6da13fde644673a2522cd1b4399b4e0a621;hpb=57eaa2bf04ce1b48bd89c10defe4de5b7d31f047;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiQueryCategories.php b/includes/api/ApiQueryCategories.php index 63d0f6da13..c4428d575a 100644 --- a/includes/api/ApiQueryCategories.php +++ b/includes/api/ApiQueryCategories.php @@ -74,7 +74,7 @@ class ApiQueryCategories extends ApiQueryGeneratorBase { foreach ( $params['categories'] as $cat ) { $title = Title::newFromText( $cat ); if ( !$title || $title->getNamespace() != NS_CATEGORY ) { - $this->setWarning( "\"$cat\" is not a category" ); + $this->addWarning( [ 'apiwarn-invalidcategory', wfEscapeWikiText( $cat ) ] ); } else { $cats[] = $title->getDBkey(); } @@ -96,7 +96,7 @@ class ApiQueryCategories extends ApiQueryGeneratorBase { } if ( isset( $show['hidden'] ) && isset( $show['!hidden'] ) ) { - $this->dieUsageMsg( 'show' ); + $this->dieWithError( 'apierror-show' ); } if ( isset( $show['hidden'] ) || isset( $show['!hidden'] ) || isset( $prop['hidden'] ) ) { $this->addOption( 'STRAIGHT_JOIN' ); @@ -227,6 +227,6 @@ class ApiQueryCategories extends ApiQueryGeneratorBase { } public function getHelpUrls() { - return 'https://www.mediawiki.org/wiki/API:Categories'; + return 'https://www.mediawiki.org/wiki/Special:MyLanguage/API:Categories'; } }