3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License along
14 * with this program; if not, write to the Free Software Foundation, Inc.,
15 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 * http://www.gnu.org/copyleft/gpl.html
19 * @ingroup Change tagging
23 * Generic list for change tagging.
25 abstract class ChangeTagsList
extends RevisionListBase
{
26 function __construct( IContextSource
$context, Title
$title, array $ids ) {
27 parent
::__construct( $context, $title );
32 * Creates a ChangeTags*List of the requested type.
34 * @param string $typeName 'revision' or 'logentry'
35 * @param IContextSource $context
38 * @return ChangeTagsList An instance of the requested subclass
39 * @throws Exception If you give an unknown $typeName
41 public static function factory( $typeName, IContextSource
$context,
42 Title
$title, array $ids ) {
44 switch ( $typeName ) {
46 $className = 'ChangeTagsRevisionList';
49 $className = 'ChangeTagsLogList';
52 throw new Exception( "Class $className requested, but does not exist" );
54 return new $className( $context, $title, $ids );
58 * Reload the list data from the master DB.
60 function reloadFromMaster() {
61 $dbw = wfGetDB( DB_MASTER
);
62 $this->res
= $this->doQuery( $dbw );
66 * Add/remove change tags from all the items in the list.
68 * @param array $tagsToAdd
69 * @param array $tagsToRemove
70 * @param array $params
71 * @param string $reason
75 abstract function updateChangeTagsOnAll( $tagsToAdd, $tagsToRemove, $params,