[ Index ]

PHP Cross Reference of MediaWiki-1.24.0

title

Body

[close]

/includes/ -> ChangeTags.php (summary)

(no description)

File Size: 357 lines (10 kb)
Included or required:0 times
Referenced: 1 time
Includes or requires: 0 files

Defines 1 class

ChangeTags:: (7 methods):
  formatSummaryRow()
  tagDescription()
  addTags()
  modifyDisplayQuery()
  buildTagFilterSelector()
  listDefinedTags()
  tagUsageStatistics()


Class: ChangeTags  - X-Ref

Recent changes tagging.

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
http://www.gnu.org/copyleft/gpl.html

formatSummaryRow( $tags, $page )   X-Ref
Creates HTML for the given tags

param: string $tags Comma-separated list of tags
param: string $page A label for the type of action which is being displayed,
return: array Array with two items: (html, classes)

tagDescription( $tag )   X-Ref
Get a short description for a tag

param: string $tag Tag
return: string Short description of the tag from "mediawiki:tag-$tag" if this message exists,

addTags( $tags, $rc_id = null, $rev_id = null,$log_id = null, $params = null)   X-Ref
Add tags to a change given its rc_id, rev_id and/or log_id

param: string|array $tags Tags to add to the change
param: int|null $rc_id The rc_id of the change to add the tags to
param: int|null $rev_id The rev_id of the change to add the tags to
param: int|null $log_id The log_id of the change to add the tags to
param: string $params Params to put in the ct_params field of table 'change_tag'
return: bool False if no changes are made, otherwise true

modifyDisplayQuery( &$tables, &$fields, &$conds,&$join_conds, &$options, $filter_tag = false )   X-Ref
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.

param: string|array $tables Table names, see DatabaseBase::select
param: string|array $fields Fields used in query, see DatabaseBase::select
param: string|array $conds Conditions used in query, see DatabaseBase::select
param: array $join_conds Join conditions, see DatabaseBase::select
param: array $options Options, see Database::select
param: bool|string $filter_tag Tag to select on

buildTagFilterSelector( $selected = '',$fullForm = false, Title $title = null)   X-Ref
Build a text box to select a change tag

param: string $selected Tag to select by default
param: bool $fullForm
param: Title $title Title object to send the form to.
return: string|array

listDefinedTags()   X-Ref
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.

return: string[] Array of strings: tags

tagUsageStatistics()   X-Ref
Returns a map of any tags used on the wiki to number of edits
tagged with them, ordered descending by the hitcount.

return: array Array of string => int



Generated: Fri Nov 28 14:03:12 2014 Cross-referenced by PHPXref 0.7.1