X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiQueryTags.php;h=45f73b206a3d26e46f730be507a375e7993b0484;hb=2ec08fa5f0ba0d80aaa2f160cb323b0b784219f3;hp=0e3307bea9b85e998961e394df5fc53e2090fa6c;hpb=0b818f54c66243326405bbb033ea10c16dbf36f0;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiQueryTags.php b/includes/api/ApiQueryTags.php index 0e3307bea9..45f73b206a 100644 --- a/includes/api/ApiQueryTags.php +++ b/includes/api/ApiQueryTags.php @@ -108,8 +108,8 @@ class ApiQueryTags extends ApiQueryBase { $isExtension = isset( $extensionDefinedTags[$tagName] ); $isExplicit = isset( $explicitlyDefinedTags[$tagName] ); - if ( $fld_defined && ( $isExtension || $isExplicit ) ) { - $tag['defined'] = ''; + if ( $fld_defined ) { + $tag['defined'] = $isExtension || $isExplicit; } if ( $fld_source ) { @@ -122,10 +122,8 @@ class ApiQueryTags extends ApiQueryBase { } } - if ( $fld_active && - ( $isExplicit || isset( $extensionActivatedTags[$tagName] ) ) - ) { - $tag['active'] = ''; + if ( $fld_active ) { + $tag['active'] = $isExplicit || isset( $extensionActivatedTags[$tagName] ); } $fit = $result->addValue( array( 'query', $this->getModuleName() ), null, $tag ); @@ -135,7 +133,7 @@ class ApiQueryTags extends ApiQueryBase { } } - $result->setIndexedTagName_internal( array( 'query', $this->getModuleName() ), 'tag' ); + $result->addIndexedTagName( array( 'query', $this->getModuleName() ), 'tag' ); } public function getCacheMode( $params ) {