MediaWiki
REL1_22
|
Static Public Member Functions | |
static | addTags ($tags, $rc_id=null, $rev_id=null, $log_id=null, $params=null) |
Add tags to a change given its rc_id, rev_id and/or log_id. | |
static | buildTagFilterSelector ($selected= '', $fullForm=false, Title $title=null) |
Build a text box to select a change tag. | |
static | formatSummaryRow ($tags, $page) |
Creates HTML for the given tags. | |
static | listDefinedTags () |
Basically lists defined tags which count even if they aren't applied to anything. | |
static | modifyDisplayQuery (&$tables, &$fields, &$conds, &$join_conds, &$options, $filter_tag=false) |
Applies all tags-related changes to a query. | |
static | tagDescription ($tag) |
Get a short description for a tag. | |
static | tagUsageStatistics () |
Returns a map of any tags used on the wiki to number of edits tagged with them, ordered descending by the hitcount. |
Definition at line 23 of file ChangeTags.php.
static ChangeTags::addTags | ( | $ | tags, |
$ | rc_id = null , |
||
$ | rev_id = null , |
||
$ | log_id = null , |
||
$ | params = null |
||
) | [static] |
Add tags to a change given its rc_id, rev_id and/or log_id.
string | array | $tags | Tags to add to the change |
$rc_id | int: rc_id of the change to add the tags to | |
$rev_id | int: rev_id of the change to add the tags to | |
$log_id | int: log_id of the change to add the tags to | |
string | $params | params to put in the ct_params field of table 'change_tag' |
MWException |
MWException | when $rc_id, $rev_id and $log_id are all null |
Definition at line 93 of file ChangeTags.php.
static ChangeTags::buildTagFilterSelector | ( | $ | selected = '' , |
$ | fullForm = false , |
||
Title $ | title = null |
||
) | [static] |
Build a text box to select a change tag.
string | $selected | tag to select by default |
$fullForm | Boolean:
| |
$title | Title object to send the form to. Used when, and only when $fullForm is true. |
Definition at line 227 of file ChangeTags.php.
References $html, $title, array(), Xml\element(), global, Html\hidden(), Xml\input(), Html\rawElement(), tags(), text, and wfMessage().
Referenced by SpecialNewpages\form(), SpecialRecentChanges\getExtraOptions(), and HistoryAction\onView().
static ChangeTags::formatSummaryRow | ( | $ | tags, |
$ | page | ||
) | [static] |
Creates HTML for the given tags.
string | $tags | Comma-separated list of tags |
string | $page | A label for the type of action which is being displayed, for example: 'history', 'contributions' or 'newpages' |
Definition at line 37 of file ChangeTags.php.
References $wgLang, array(), as, Sanitizer\escapeClass(), global, tags(), and wfMessage().
static ChangeTags::listDefinedTags | ( | ) | [static] |
Basically lists defined tags which count even if they aren't applied to anything.
Tags on items in table 'change_tag' which are not (or no longer) in table 'valid_tag' are not included.
Tries memcached first.
Definition at line 258 of file ChangeTags.php.
References $dbr, $key, $res, $wgMemc, array(), as, global, wfGetDB(), wfMemcKey(), and wfRunHooks().
Referenced by SpecialTags\execute(), ApiQueryTags\execute(), and ApiFeedContributions\getAllowedParams().
static ChangeTags::modifyDisplayQuery | ( | &$ | tables, |
&$ | fields, | ||
&$ | conds, | ||
&$ | join_conds, | ||
&$ | options, | ||
$ | filter_tag = false |
||
) | [static] |
Applies all tags-related changes to a query.
Handles selecting tags, and filtering. Needs $tables to be set up properly, so we can figure out which join conditions to use.
string | array | $tables | Table names, see DatabaseBase::select |
string | array | $fields | Fields used in query, see DatabaseBase::select |
string | array | $conds | conditions used in query, see DatabaseBase::select |
$join_conds | Array: join conditions, see DatabaseBase::select | |
array | $options | options, see Database::select |
bool | string | $filter_tag | Tag to select on |
MWException | When unable to determine appropriate JOIN condition for tagging |
Definition at line 177 of file ChangeTags.php.
References $options, array(), and global.
Referenced by SpecialRecentchangeslinked\doMainQuery(), SpecialRecentChanges\doMainQuery(), SpecialWatchlist\execute(), LogPager\getQueryInfo(), and HistoryPager\getQueryInfo().
static ChangeTags::tagDescription | ( | $ | tag | ) | [static] |
Get a short description for a tag.
string | $tag | tag |
Definition at line 74 of file ChangeTags.php.
References wfMessage().
Referenced by ApiQueryTags\doTag(), and SpecialTags\doTagRow().
static ChangeTags::tagUsageStatistics | ( | ) | [static] |
Returns a map of any tags used on the wiki to number of edits tagged with them, ordered descending by the hitcount.
Definition at line 291 of file ChangeTags.php.
References $dbr, $out, $res, array(), as, and wfGetDB().
Referenced by SpecialTags\execute().