dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "ApiSandbox: Support 'all' specifiers"
[lhc/web/wiklou.git]
/
includes
/
api
/
ApiQueryTags.php
diff --git
a/includes/api/ApiQueryTags.php
b/includes/api/ApiQueryTags.php
index
bd2f080
..
43eb7e8
100644
(file)
--- a/
includes/api/ApiQueryTags.php
+++ b/
includes/api/ApiQueryTags.php
@@
-50,11
+50,11
@@
class ApiQueryTags extends ApiQueryBase {
$limit = $params['limit'];
$result = $this->getResult();
$limit = $params['limit'];
$result = $this->getResult();
- $
extensionDefinedTags = array_fill_keys( ChangeTags::listExtension
DefinedTags(), 0 );
+ $
softwareDefinedTags = array_fill_keys( ChangeTags::listSoftware
DefinedTags(), 0 );
$explicitlyDefinedTags = array_fill_keys( ChangeTags::listExplicitlyDefinedTags(), 0 );
$explicitlyDefinedTags = array_fill_keys( ChangeTags::listExplicitlyDefinedTags(), 0 );
- $
extensionActivatedTags = array_fill_keys( ChangeTags::listExtension
ActivatedTags(), 0 );
+ $
softwareActivatedTags = array_fill_keys( ChangeTags::listSoftware
ActivatedTags(), 0 );
- $definedTags = array_merge( $
extension
DefinedTags, $explicitlyDefinedTags );
+ $definedTags = array_merge( $
software
DefinedTags, $explicitlyDefinedTags );
# Fetch defined tags that aren't past the continuation
if ( $params['continue'] !== null ) {
# Fetch defined tags that aren't past the continuation
if ( $params['continue'] !== null ) {
@@
-93,7
+93,7
@@
class ApiQueryTags extends ApiQueryBase {
$tag['name'] = $tagName;
if ( $fld_displayname ) {
$tag['name'] = $tagName;
if ( $fld_displayname ) {
- $tag['displayname'] = ChangeTags::tagDescription( $tagName );
+ $tag['displayname'] = ChangeTags::tagDescription( $tagName
, $this
);
}
if ( $fld_description ) {
}
if ( $fld_description ) {
@@
-105,16
+105,17
@@
class ApiQueryTags extends ApiQueryBase {
$tag['hitcount'] = $hitcount;
}
$tag['hitcount'] = $hitcount;
}
- $is
Extension = isset( $extension
DefinedTags[$tagName] );
+ $is
Software = isset( $software
DefinedTags[$tagName] );
$isExplicit = isset( $explicitlyDefinedTags[$tagName] );
if ( $fld_defined ) {
$isExplicit = isset( $explicitlyDefinedTags[$tagName] );
if ( $fld_defined ) {
- $tag['defined'] = $is
Extension
|| $isExplicit;
+ $tag['defined'] = $is
Software
|| $isExplicit;
}
if ( $fld_source ) {
$tag['source'] = [];
}
if ( $fld_source ) {
$tag['source'] = [];
- if ( $isExtension ) {
+ if ( $isSoftware ) {
+ // TODO: Can we change this to 'software'?
$tag['source'][] = 'extension';
}
if ( $isExplicit ) {
$tag['source'][] = 'extension';
}
if ( $isExplicit ) {
@@
-123,7
+124,7
@@
class ApiQueryTags extends ApiQueryBase {
}
if ( $fld_active ) {
}
if ( $fld_active ) {
- $tag['active'] = $isExplicit || isset( $
extension
ActivatedTags[$tagName] );
+ $tag['active'] = $isExplicit || isset( $
software
ActivatedTags[$tagName] );
}
$fit = $result->addValue( [ 'query', $this->getModuleName() ], null, $tag );
}
$fit = $result->addValue( [ 'query', $this->getModuleName() ], null, $tag );