Expose $wgMaxArticleSize in siteinfo query api
[mediawiki.git] / includes / changetags / ChangeTagsRevisionItem.php
blob2a98e20f96f1ea4658caedab468987d2447bfacb
1 <?php
2 /**
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
18 * @file
19 * @ingroup Change tagging
22 /**
23 * Item class for a live revision table row with its associated change tags.
24 * @since 1.25
26 class ChangeTagsRevisionItem extends RevisionItem {
27 /**
28 * @return string Comma-separated list of tags
30 public function getTags() {
31 return $this->row->ts_tags;
34 /**
35 * @return string A HTML <li> element representing this revision, showing
36 * change tags and everything
38 public function getHTML() {
39 $difflink = $this->list->msg( 'parentheses' )
40 ->rawParams( $this->getDiffLink() )->escaped();
41 $revlink = $this->getRevisionLink();
42 $userlink = Linker::revUserLink( $this->revision );
43 $comment = Linker::revComment( $this->revision );
44 if ( $this->isDeleted() ) {
45 $revlink = "<span class=\"history-deleted\">$revlink</span>";
48 $content = "$difflink $revlink $userlink $comment";
49 $attribs = [];
50 $tags = $this->getTags();
51 if ( $tags ) {
52 list( $tagSummary, $classes ) = ChangeTags::formatSummaryRow(
53 $tags,
54 'edittags',
55 $this->list->getContext()
57 $content .= " $tagSummary";
58 $attribs['class'] = implode( ' ', $classes );
60 return Xml::tags( 'li', $attribs, $content );