X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiQueryCategories.php;h=f2498cae20cf224807c7dd4ea3ede18713384f1b;hb=7492975a28a451688950786a6b06b722d861d0ee;hp=63d0f6da13fde644673a2522cd1b4399b4e0a621;hpb=58cb1f824ac75c3b58ba19d1e88c1b38f9dc1fab;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiQueryCategories.php b/includes/api/ApiQueryCategories.php index 63d0f6da13..f2498cae20 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' );