Go to the documentation of this file.
44 parent::__construct(
$query, $moduleName,
'tg' );
50 $prop = array_flip(
$params[
'prop'] );
52 $this->fld_displayname = isset( $prop[
'displayname'] );
53 $this->fld_description = isset( $prop[
'description'] );
54 $this->fld_hitcount = isset( $prop[
'hitcount'] );
56 $this->limit =
$params[
'limit'];
62 $this->
addFieldsIf(
array(
'hitcount' =>
'COUNT(*)' ), $this->fld_hitcount );
64 $this->
addOption(
'LIMIT', $this->limit + 1 );
76 $ok = $this->
doTag( $row->ct_tag, $this->fld_hitcount ? $row->hitcount : 0 );
87 $this->result->setIndexedTagName_internal(
array(
'query', $this->
getModuleName() ),
'tag' );
90 private function doTag( $tagName, $hitcount ) {
92 static $doneTags =
array();
94 if ( in_array( $tagName, $doneTags ) ) {
98 if ( ++
$count > $this->limit ) {
105 $tag[
'name'] = $tagName;
107 if ( $this->fld_displayname ) {
111 if ( $this->fld_description ) {
112 $msg =
wfMessage(
"tag-$tagName-description" );
113 $tag[
'description'] = $msg->exists() ? $msg->text() :
'';
116 if ( $this->fld_hitcount ) {
117 $tag[
'hitcount'] = $hitcount;
120 $doneTags[] = $tagName;
122 $fit = $this->result->addValue(
array(
'query', $this->
getModuleName() ),
null, $tag );
161 'continue' =>
'When more results are available, use this to continue',
162 'limit' =>
'The maximum number of tags to list',
164 'Which properties to get',
165 ' name - Adds name of tag',
166 ' displayname - Adds system message for the tag',
167 ' description - Adds description of the tag',
168 ' hitcount - Adds the amount of revisions that have this tag',
178 'displayname' =>
array(
179 'displayname' =>
'string'
181 'description' =>
array(
182 'description' =>
'string'
185 'hitcount' =>
'integer'
191 return 'List change tags.';
196 'api.php?action=query&list=tags&tgprop=displayname|description|hitcount'
201 return 'https://www.mediawiki.org/wiki/API:Tags';
addFields( $value)
Add a set of fields to select to the internal array.
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
getResult()
Get the result object.
select( $method, $extraQuery=array())
Execute a SELECT query based on the values in the internal arrays.
addOption( $name, $value=null)
Add an option such as LIMIT or USE INDEX.
addFieldsIf( $value, $condition)
Same as addFields(), but add the fields only if a condition is met.
This class represents the result of the API operations.
This is a base class for all Query modules.
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses after processing after in associative array form externallinks including delete and has completed for all link tables default is conds Array Extra conditions for the No matching items in log is displayed if loglist is empty msgKey Array If you want a nice box with a set this to the key of the message First element is the message additional optional elements are parameters for the key that are processed with wfMessage() -> params() ->parseAsBlock() - offset Set to overwrite offset parameter in $wgRequest set to '' to unset offset - wrap String Wrap the message in html(usually something like "<
addTables( $tables, $alias=null)
Add a set of tables to the internal array.
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
addWhereRange( $field, $dir, $start, $end, $sort=true)
Add a WHERE clause corresponding to a range, and an ORDER BY clause to sort in the right direction.
extractRequestParams( $parseLimit=true)
Using getAllowedParams(), this function makes an array of the values provided by the user,...
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
getModuleName()
Get the name of the module being executed by this instance.
setContinueEnumParameter( $paramName, $paramValue)
Set a query-continue value.
return true to allow those checks to and false if checking is done use this to change the tables headers temp or archived zone change it to an object instance and return false override the list derivative used the name of the old file when set the default code will be skipped add a value to it if you want to add a cookie that have to vary cache options can modify $query