Merge "Make api nearmatch search work same as 'go' feature"
[lhc/web/wiklou.git] / includes / api / ApiQueryTags.php
index aa91216..45f73b2 100644 (file)
@@ -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 );