MediaWiki
1.23.12
|
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. More... | |
static | buildTagFilterSelector ( $selected='', $fullForm=false, Title $title=null) |
Build a text box to select a change tag. More... | |
static | formatSummaryRow ( $tags, $page) |
Creates HTML for the given tags. More... | |
static | listDefinedTags () |
Basically lists defined tags which count even if they aren't applied to anything. More... | |
static | modifyDisplayQuery (&$tables, &$fields, &$conds, &$join_conds, &$options, $filter_tag=false) |
Applies all tags-related changes to a query. More... | |
static | tagDescription ( $tag) |
Get a short description for a tag. More... | |
static | tagUsageStatistics () |
Returns a map of any tags used on the wiki to number of edits tagged with them, ordered descending by the hitcount. More... | |
Definition at line 23 of file ChangeTags.php.
|
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 90 of file ChangeTags.php.
References $dbr, $params, array(), as, DB_MASTER, DB_SLAVE, and wfGetDB().
|
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 250 of file ChangeTags.php.
References $html, $title, array(), Xml\element(), global, Html\hidden(), Xml\input(), Html\rawElement(), Xml\tags(), text, and wfMessage().
Referenced by SpecialNewpages\form(), SpecialRecentChanges\getExtraOptions(), HistoryAction\onView(), and LogEventsList\showOptions().
|
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 34 of file ChangeTags.php.
References $wgLang, array(), as, Sanitizer\escapeClass(), global, Xml\tags(), and wfMessage().
Referenced by SpecialUndelete\diffHeader(), SpecialUndelete\formatRevisionRow(), SpecialNewpages\formatRow(), ContribsPager\formatRow(), HistoryPager\historyLine(), ChangesList\insertTags(), LogEventsList\logLine(), and DifferenceEngine\showDiffPage().
|
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 302 of file ChangeTags.php.
References $dbr, $res, $wgMemc, array(), as, DB_SLAVE, global, wfGetDB(), wfMemcKey(), and wfRunHooks().
Referenced by SpecialTags\execute(), ApiQueryTags\execute(), and ApiFeedContributions\getAllowedParams().
|
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 202 of file ChangeTags.php.
References $tables, array(), DB_SLAVE, global, and wfGetDB().
Referenced by SpecialRecentChangesLinked\doMainQuery(), SpecialWatchlist\doMainQuery(), SpecialRecentChanges\doMainQuery(), ChangesListSpecialPage\doMainQuery(), LogPager\getQueryInfo(), HistoryPager\getQueryInfo(), NewPagesPager\getQueryInfo(), and PageArchive\listRevisions().
|
static |
Get a short description for a tag.
string | $tag | tag |
Definition at line 71 of file ChangeTags.php.
References wfMessage().
Referenced by ApiQueryTags\doTag(), and SpecialTags\doTagRow().
|
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 335 of file ChangeTags.php.
References $dbr, $out, $res, array(), as, DB_SLAVE, and wfGetDB().
Referenced by SpecialTags\execute().