X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiQueryAllCategories.php;h=0711c9029236b5d346997e895bad465994fa459a;hb=ac17fbac94f2ba72b3ac64fff2dd188dd76faaf3;hp=4ecc4b7af5f8781fad7a8649de65cc8e3004a7a3;hpb=d964c0ed629bcc9620e2a6e2d9b02741d3eaba25;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiQueryAllCategories.php b/includes/api/ApiQueryAllCategories.php index 4ecc4b7af5..0711c90292 100644 --- a/includes/api/ApiQueryAllCategories.php +++ b/includes/api/ApiQueryAllCategories.php @@ -135,8 +135,8 @@ class ApiQueryAllCategories extends ApiQueryGeneratorBase { $item['files'] = intval( $row->cat_files ); $item['subcats'] = intval( $row->cat_subcats ); } - if ( isset( $prop['hidden'] ) && $row->cat_hidden ) { - $item['hidden'] = ''; + if ( isset( $prop['hidden'] ) ) { + $item['hidden'] = (bool)$row->cat_hidden; } $fit = $result->addValue( array( 'query', $this->getModuleName() ), null, $item ); if ( !$fit ) { @@ -186,7 +186,8 @@ class ApiQueryAllCategories extends ApiQueryGeneratorBase { 'prop' => array( ApiBase::PARAM_TYPE => array( 'size', 'hidden' ), ApiBase::PARAM_DFLT => '', - ApiBase::PARAM_ISMULTI => true + ApiBase::PARAM_ISMULTI => true, + ApiBase::PARAM_HELP_MSG_PER_VALUE => array(), ), ); }