Debian Codegraph @

includes/actions/pagers/HistoryPager.php

raw symbols SCIP
1 <?php
2 /**
3 * Page history pager
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 * http://www.gnu.org/copyleft/gpl.html
19 *
20 * @file
21 * @ingroup Actions
22 */
23
24 namespace MediaWiki\Pager;
25
26 use ChangesList;
27 use ChangeTags;
28 use HistoryAction;
29 use HtmlArmor;
30 use MapCacheLRU;
31 use MediaWiki\Cache\LinkBatchFactory;
32 use MediaWiki\ChangeTags\ChangeTagsStore;
33 use MediaWiki\CommentFormatter\CommentFormatter;
34 use MediaWiki\HookContainer\HookContainer;
35 use MediaWiki\HookContainer\HookRunner;
36 use MediaWiki\Html\Html;
37 use MediaWiki\Html\ListToggle;
38 use MediaWiki\Linker\Linker;
39 use MediaWiki\MainConfigNames;
40 use MediaWiki\MediaWikiServices;
41 use MediaWiki\Parser\Sanitizer;
42 use MediaWiki\Revision\RevisionRecord;
43 use MediaWiki\Revision\RevisionStore;
44 use MediaWiki\SpecialPage\SpecialPage;
45 use MediaWiki\Watchlist\WatchlistManager;
46 use stdClass;
47 use Wikimedia\Rdbms\IDBAccessObject;
48
49 /**
50 * @ingroup Pager
51 * @ingroup Actions
52 */
53 #[\AllowDynamicProperties]
54 class HistoryPager extends ReverseChronologicalPager {
55
56 /** @inheritDoc */
57 public $mGroupByDate = true;
58
59 public HistoryAction $historyPage;
60 public string $buttons;
61 public array $conds;
62
63 /** @var int */
64 protected $oldIdChecked;
65
66 /** @var bool */
67 protected $preventClickjacking = false;
68 /**
69 * @var array
70 */
71 protected $parentLens;
72
73 /** @var bool Whether to show the tag editing UI */
74 protected $showTagEditUI;
75
76 protected MapCacheLRU $tagsCache;
77
78 /** @var string */
79 private $tagFilter;
80
81 /** @var bool */
82 private $tagInvert;
83
84 /** @var string|null|false */
85 private $notificationTimestamp;
86
87 private RevisionStore $revisionStore;
88 private WatchlistManager $watchlistManager;
89 private LinkBatchFactory $linkBatchFactory;
90 private CommentFormatter $commentFormatter;
91 private HookRunner $hookRunner;
92 private ChangeTagsStore $changeTagsStore;
93
94 /**
95 * @var RevisionRecord[] Revisions, with the key being their result offset
96 */
97 private $revisions = [];
98
99 /**
100 * @var string[] Formatted comments, with the key being their result offset as for $revisions
101 */
102 private $formattedComments = [];
103
104 /**
105 * @param HistoryAction $historyPage
106 * @param int $year
107 * @param int $month
108 * @param int $day
109 * @param string $tagFilter
110 * @param bool $tagInvert
111 * @param array $conds
112 * @param LinkBatchFactory|null $linkBatchFactory
113 * @param WatchlistManager|null $watchlistManager
114 * @param CommentFormatter|null $commentFormatter
115 * @param HookContainer|null $hookContainer
116 * @param ChangeTagsStore|null $changeTagsStore
117 */
118 public function __construct(
119 HistoryAction $historyPage,
120 $year = 0,
121 $month = 0,
122 $day = 0,
123 $tagFilter = '',
124 $tagInvert = false,
125 array $conds = [],
126 ?LinkBatchFactory $linkBatchFactory = null,
127 ?WatchlistManager $watchlistManager = null,
128 ?CommentFormatter $commentFormatter = null,
129 ?HookContainer $hookContainer = null,
130 ?ChangeTagsStore $changeTagsStore = null
131 ) {
132 parent::__construct( $historyPage->getContext() );
133 $this->historyPage = $historyPage;
134 $this->tagFilter = $tagFilter;
135 $this->tagInvert = $tagInvert;
136 $this->getDateCond( $year, $month, $day );
137 $this->conds = $conds;
138 $this->showTagEditUI = ChangeTags::showTagEditingUI( $this->getAuthority() );
139 $this->tagsCache = new MapCacheLRU( 50 );
140 $services = MediaWikiServices::getInstance();
141 $this->revisionStore = $services->getRevisionStore();
142 $this->linkBatchFactory = $linkBatchFactory ?? $services->getLinkBatchFactory();
143 $this->watchlistManager = $watchlistManager
144 ?? $services->getWatchlistManager();
145 $this->commentFormatter = $commentFormatter ?? $services->getCommentFormatter();
146 $this->hookRunner = new HookRunner( $hookContainer ?? $services->getHookContainer() );
147 $this->notificationTimestamp = $this->getConfig()->get( MainConfigNames::ShowUpdatedMarker )
148 ? $this->watchlistManager->getTitleNotificationTimestamp( $this->getUser(), $this->getTitle() )
149 : false;
150 $this->changeTagsStore = $changeTagsStore ?? $services->getChangeTagsStore();
151 }
152
153 // For hook compatibility…
154 public function getArticle() {
155 return $this->historyPage->getArticle();
156 }
157
158 protected function getSqlComment() {
159 if ( $this->conds ) {
160 return 'history page filtered'; // potentially slow, see CR r58153
161 } else {
162 return 'history page unfiltered';
163 }
164 }
165
166 public function getQueryInfo() {
167 $queryBuilder = $this->revisionStore->newSelectQueryBuilder( $this->mDb )
168 ->joinComment()
169 ->joinUser()
170 ->useIndex( [ 'revision' => 'rev_page_timestamp' ] )
171 ->where( [ 'rev_page' => $this->getWikiPage()->getId() ] )
172 ->andWhere( $this->conds );
173
174 $queryInfo = $queryBuilder->getQueryInfo( 'join_conds' );
175 $this->changeTagsStore->modifyDisplayQuery(
176 $queryInfo['tables'],
177 $queryInfo['fields'],
178 $queryInfo['conds'],
179 $queryInfo['join_conds'],
180 $queryInfo['options'],
181 $this->tagFilter,
182 $this->tagInvert
183 );
184
185 $this->hookRunner->onPageHistoryPager__getQueryInfo( $this, $queryInfo );
186
187 return $queryInfo;
188 }
189
190 public function getIndexField() {
191 return [ [ 'rev_timestamp', 'rev_id' ] ];
192 }
193
194 protected function doBatchLookups() {
195 if ( !$this->hookRunner->onPageHistoryPager__doBatchLookups( $this, $this->mResult ) ) {
196 return;
197 }
198
199 # Do a link batch query
200 $batch = $this->linkBatchFactory->newLinkBatch();
201 $revIds = [];
202 $title = $this->getTitle();
203 foreach ( $this->mResult as $row ) {
204 if ( $row->rev_parent_id ) {
205 $revIds[] = (int)$row->rev_parent_id;
206 }
207 if ( $row->user_name !== null ) {
208 $batch->add( NS_USER, $row->user_name );
209 $batch->add( NS_USER_TALK, $row->user_name );
210 } else { # for anons or usernames of imported revisions
211 $batch->add( NS_USER, $row->rev_user_text );
212 $batch->add( NS_USER_TALK, $row->rev_user_text );
213 }
214 $this->revisions[] = $this->revisionStore->newRevisionFromRow(
215 $row,
216 IDBAccessObject::READ_NORMAL,
217 $title
218 );
219 }
220 $this->parentLens = $this->revisionStore->getRevisionSizes( $revIds );
221 $batch->execute();
222
223 # The keys of $this->formattedComments will be the same as the keys of $this->revisions
224 $this->formattedComments = $this->commentFormatter->createRevisionBatch()
225 ->revisions( $this->revisions )
226 ->authority( $this->getAuthority() )
227 ->samePage( false )
228 ->hideIfDeleted( true )
229 ->useParentheses( false )
230 ->execute();
231
232 $this->mResult->seek( 0 );
233 }
234
235 /**
236 * Returns message when query returns no revisions
237 * @return string escaped message
238 */
239 protected function getEmptyBody() {
240 return $this->msg( 'history-empty' )->escaped();
241 }
242
243 /**
244 * Creates begin of history list with a submit button
245 *
246 * @return string HTML output
247 */
248 protected function getStartBody() {
249 $this->oldIdChecked = 0;
250 $s = '';
251 // Button container stored in $this->buttons for re-use in getEndBody()
252 $this->buttons = '';
253 if ( $this->getNumRows() > 0 ) {
254 $this->getOutput()->wrapWikiMsg( "<div class='mw-history-legend'>\n$1\n</div>", 'histlegend' );
255 // Main form for comparing revisions
256 $s = Html::openElement( 'form', [
257 'action' => wfScript(),
258 'id' => 'mw-history-compare'
259 ] ) . "\n";
260 $s .= Html::hidden( 'title', $this->getTitle()->getPrefixedDBkey() ) . "\n";
261
262 $this->buttons .= Html::openElement(
263 'div', [ 'class' => 'mw-history-compareselectedversions' ] );
264 $className = 'historysubmit mw-history-compareselectedversions-button cdx-button';
265 $attrs = [ 'class' => $className ]
266 + Linker::tooltipAndAccesskeyAttribs( 'compareselectedversions' );
267 $this->buttons .= $this->submitButton( $this->msg( 'compareselectedversions' )->text(),
268 $attrs
269 ) . "\n";
270
271 $actionButtons = '';
272 if ( $this->getAuthority()->isAllowed( 'deleterevision' ) ) {
273 $actionButtons .= $this->getRevisionButton(
274 'Revisiondelete', 'showhideselectedversions', 'mw-history-revisiondelete-button' );
275 }
276 if ( $this->showTagEditUI ) {
277 $actionButtons .= $this->getRevisionButton(
278 'EditTags', 'history-edit-tags', 'mw-history-editchangetags-button' );
279 }
280 if ( $actionButtons ) {
281 // Prepend a mini-form for changing visibility and editing tags.
282 // Checkboxes and buttons are associated with it using the <input form="…"> attribute.
283 //
284 // This makes the submitted parameters cleaner (on supporting browsers - all except IE 11):
285 // the 'mw-history-compare' form submission will omit the `ids[…]` parameters, and the
286 // 'mw-history-revisionactions' form submission will omit the `diff` and `oldid` parameters.
287 $s = Html::rawElement( 'form', [
288 'action' => wfScript(),
289 'id' => 'mw-history-revisionactions',
290 ] ) . "\n" . $s;
291 $s .= Html::hidden( 'type', 'revision', [ 'form' => 'mw-history-revisionactions' ] ) . "\n";
292
293 $this->buttons .= Html::rawElement( 'div', [ 'class' =>
294 'mw-history-revisionactions' ], $actionButtons );
295 }
296
297 if ( $this->getAuthority()->isAllowed( 'deleterevision' ) || $this->showTagEditUI ) {
298 $this->buttons .= ( new ListToggle( $this->getOutput() ) )->getHTML();
299 }
300
301 $this->buttons .= '</div>';
302
303 $s .= $this->buttons;
304 }
305
306 $s .= '<section id="pagehistory" class="mw-pager-body">';
307
308 return $s;
309 }
310
311 private function getRevisionButton( $name, $msg, $class ) {
312 $this->preventClickjacking = true;
313 $element = Html::element(
314 'button',
315 [
316 'type' => 'submit',
317 'name' => 'title',
318 'value' => SpecialPage::getTitleFor( $name )->getPrefixedDBkey(),
319 'class' => [ 'cdx-button', $class, 'historysubmit' ],
320 'form' => 'mw-history-revisionactions',
321 ],
322 $this->msg( $msg )->text()
323 ) . "\n";
324 return $element;
325 }
326
327 protected function getEndBody() {
328 if ( $this->getNumRows() == 0 ) {
329 return '';
330 }
331 $s = '';
332 if ( $this->getNumRows() > 2 ) {
333 $s .= $this->buttons;
334 }
335 $s .= '</section>'; // closes section#pagehistory
336 $s .= '</form>';
337 return $s;
338 }
339
340 /**
341 * Creates a submit button
342 *
343 * @param string $message Text of the submit button, will be escaped
344 * @param array $attributes
345 * @return string HTML output for the submit button
346 */
347 private function submitButton( $message, $attributes = [] ) {
348 # Disable submit button if history has 1 revision only
349 if ( $this->getNumRows() > 1 ) {
350 return Html::submitButton( $message, $attributes );
351 } else {
352 return '';
353 }
354 }
355
356 /**
357 * Returns a row from the history printout.
358 *
359 * @param stdClass $row The database row corresponding to the current line.
360 * @return string HTML output for the row
361 */
362 public function formatRow( $row ) {
363 $resultOffset = $this->getResultOffset();
364 $numRows = min( $this->mResult->numRows(), $this->mLimit );
365
366 $firstInList = $resultOffset === ( $this->mIsBackwards ? $numRows - 1 : 0 );
367 // Next in the list, previous in chronological order.
368 $nextResultOffset = $resultOffset + ( $this->mIsBackwards ? -1 : 1 );
369
370 $revRecord = $this->revisions[$resultOffset];
371 // This may only be null if the current line is the last one in the list.
372 $previousRevRecord = $this->revisions[$nextResultOffset] ?? null;
373
374 $latest = $revRecord->getId() === $this->getWikiPage()->getLatest();
375 $curlink = $this->curLink( $revRecord );
376 if ( $previousRevRecord ) {
377 // Display a link to compare to the previous revision
378 $lastlink = $this->lastLink( $revRecord, $previousRevRecord );
379 } elseif ( $this->mIsBackwards && $this->mOffset !== '' ) {
380 // When paging "backwards", we don't have the extra result for the next revision that would
381 // appear in the list, and we don't know whether this is the oldest revision or not.
382 // However, if an offset has been specified, then the user probably reached this page by
383 // navigating from the "next" page, therefore the next revision probably exists.
384 // Display a link using &oldid=prev (this skips some checks but that's fine).
385 $lastlink = $this->lastLink( $revRecord, null );
386 } else {
387 // Do not display a link, because this is the oldest revision of the page
388 $lastlink = Html::element( 'span', [
389 'class' => 'mw-history-histlinks-previous',
390 ], $this->historyPage->message['last'] );
391 }
392 $curLastlinks = Html::rawElement( 'span', [], $curlink ) .
393 Html::rawElement( 'span', [], $lastlink );
394 $histLinks = Html::rawElement(
395 'span',
396 [ 'class' => 'mw-history-histlinks mw-changeslist-links' ],
397 $curLastlinks
398 );
399
400 $diffButtons = $this->diffButtons( $revRecord, $firstInList );
401 $s = $histLinks . $diffButtons;
402
403 $link = $this->revLink( $revRecord );
404 $classes = [];
405
406 $del = '';
407 $canRevDelete = $this->getAuthority()->isAllowed( 'deleterevision' );
408 // Show checkboxes for each revision, to allow for revision deletion and
409 // change tags
410 if ( $canRevDelete || $this->showTagEditUI ) {
411 $this->preventClickjacking = true;
412 // If revision was hidden from sysops and we don't need the checkbox
413 // for anything else, disable it
414 if ( !$this->showTagEditUI
415 && !$revRecord->userCan( RevisionRecord::DELETED_RESTRICTED, $this->getAuthority() )
416 ) {
417 $del = Html::check( 'deleterevisions', false, [ 'disabled' => 'disabled' ] );
418 // Otherwise, enable the checkbox…
419 } else {
420 $del = Html::check(
421 'ids[' . $revRecord->getId() . ']', false,
422 [ 'form' => 'mw-history-revisionactions' ]
423 );
424 }
425 // User can only view deleted revisions…
426 } elseif ( $revRecord->getVisibility() && $this->getAuthority()->isAllowed( 'deletedhistory' ) ) {
427 // If revision was hidden from sysops, disable the link
428 if ( !$revRecord->userCan( RevisionRecord::DELETED_RESTRICTED, $this->getAuthority() ) ) {
429 $del = Linker::revDeleteLinkDisabled( false );
430 // Otherwise, show the link…
431 } else {
432 $query = [
433 'type' => 'revision',
434 'target' => $this->getTitle()->getPrefixedDBkey(),
435 'ids' => $revRecord->getId()
436 ];
437 $del .= Linker::revDeleteLink(
438 $query,
439 $revRecord->isDeleted( RevisionRecord::DELETED_RESTRICTED ),
440 false
441 );
442 }
443 }
444 if ( $del ) {
445 $s .= " $del ";
446 }
447
448 $lang = $this->getLanguage();
449 $s .= ' ' . Html::rawElement( 'bdi', [ 'dir' => $lang->getDir() ], $link );
450 $s .= " <span class='history-user'>" .
451 Linker::revUserTools( $revRecord, true, false ) . "</span>";
452
453 if ( $revRecord->isMinor() ) {
454 $s .= ' ' . ChangesList::flag( 'minor', $this->getContext() );
455 }
456
457 # Sometimes rev_len isn't populated
458 if ( $revRecord->getSize() !== null ) {
459 # Size is always public data
460 $prevSize = $this->parentLens[$row->rev_parent_id] ?? 0;
461 $sDiff = ChangesList::showCharacterDifference( $prevSize, $revRecord->getSize() );
462 $fSize = Linker::formatRevisionSize( $revRecord->getSize() );
463 $s .= ' <span class="mw-changeslist-separator"></span> ' . "$fSize $sDiff";
464 }
465
466 # Include separator between character difference and following text
467 $s .= ' <span class="mw-changeslist-separator"></span> ';
468
469 # Text following the character difference is added just before running hooks
470 $comment = $this->formattedComments[$resultOffset];
471
472 if ( $comment === '' ) {
473 $defaultComment = $this->historyPage->message['changeslist-nocomment'];
474 $comment = "<span class=\"comment mw-comment-none\">$defaultComment</span>";
475 }
476 $s .= $comment;
477
478 if ( $this->notificationTimestamp && $row->rev_timestamp >= $this->notificationTimestamp ) {
479 $s .= ' <span class="updatedmarker">' . $this->historyPage->message['updatedmarker'] . '</span>';
480 $classes[] = 'mw-history-line-updated';
481 }
482
483 $pagerTools = new PagerTools(
484 $revRecord,
485 $previousRevRecord,
486 $latest && $previousRevRecord,
487 $this->hookRunner,
488 $this->getTitle(),
489 $this->getContext(),
490 $this->getLinkRenderer()
491 );
492 if ( $pagerTools->shouldPreventClickjacking() ) {
493 $this->preventClickjacking = true;
494 }
495 $s .= $pagerTools->toHTML();
496
497 # Tags
498 [ $tagSummary, $newClasses ] = $this->tagsCache->getWithSetCallback(
499 $this->tagsCache->makeKey(
500 $row->ts_tags ?? '',
501 $this->getUser()->getName(),
502 $lang->getCode()
503 ),
504 fn () => ChangeTags::formatSummaryRow(
505 $row->ts_tags,
506 'history',
507 $this->getContext()
508 )
509 );
510 $classes = array_merge( $classes, $newClasses );
511 if ( $tagSummary !== '' ) {
512 $s .= " $tagSummary";
513 }
514
515 $attribs = [ 'data-mw-revid' => $revRecord->getId() ];
516
517 $this->hookRunner->onPageHistoryLineEnding( $this, $row, $s, $classes, $attribs );
518 $attribs = array_filter( $attribs,
519 [ Sanitizer::class, 'isReservedDataAttribute' ],
520 ARRAY_FILTER_USE_KEY
521 );
522
523 if ( $classes ) {
524 $attribs['class'] = implode( ' ', $classes );
525 }
526
527 return Html::rawElement( 'li', $attribs, $s ) . "\n";
528 }
529
530 /**
531 * Create a link to view this revision of the page
532 *
533 * @param RevisionRecord $rev
534 * @return string
535 */
536 private function revLink( RevisionRecord $rev ) {
537 return ChangesList::revDateLink( $rev, $this->getAuthority(), $this->getLanguage(),
538 $this->getTitle() );
539 }
540
541 /**
542 * Create a diff-to-current link for this revision for this page
543 *
544 * @param RevisionRecord $rev
545 * @return string
546 */
547 private function curLink( RevisionRecord $rev ) {
548 $cur = $this->historyPage->message['cur'];
549 $latest = $this->getWikiPage()->getLatest();
550 if ( $latest === $rev->getId()
551 || !$rev->userCan( RevisionRecord::DELETED_TEXT, $this->getAuthority() )
552 ) {
553 return Html::element( 'span', [
554 'class' => 'mw-history-histlinks-current',
555 ], $cur );
556 } else {
557 return $this->getLinkRenderer()->makeKnownLink(
558 $this->getTitle(),
559 new HtmlArmor( $cur ),
560 [
561 'class' => 'mw-history-histlinks-current',
562 'title' => $this->historyPage->message['tooltip-cur']
563 ],
564 [
565 'diff' => $latest,
566 'oldid' => $rev->getId()
567 ]
568 );
569 }
570 }
571
572 /**
573 * Create a diff-to-previous link for this revision for this page.
574 *
575 * @param RevisionRecord $prevRev The revision being displayed
576 * @param RevisionRecord|null $nextRev The next revision in list (that is the previous one in
577 * chronological order) or null if it is unknown, but a link should be created anyway.
578 * @return string
579 */
580 private function lastLink( RevisionRecord $prevRev, ?RevisionRecord $nextRev ) {
581 $last = $this->historyPage->message['last'];
582
583 if ( !$prevRev->userCan( RevisionRecord::DELETED_TEXT, $this->getAuthority() ) ||
584 ( $nextRev && !$nextRev->userCan( RevisionRecord::DELETED_TEXT, $this->getAuthority() ) )
585 ) {
586 return Html::element( 'span', [
587 'class' => 'mw-history-histlinks-previous',
588 ], $last );
589 }
590
591 return $this->getLinkRenderer()->makeKnownLink(
592 $this->getTitle(),
593 new HtmlArmor( $last ),
594 [
595 'class' => 'mw-history-histlinks-previous',
596 'title' => $this->historyPage->message['tooltip-last']
597 ],
598 [
599 'diff' => 'prev', // T243569
600 'oldid' => $prevRev->getId()
601 ]
602 );
603 }
604
605 /**
606 * Create radio buttons for page history
607 *
608 * @param RevisionRecord $rev
609 * @param bool $firstInList Is this version the first one?
610 *
611 * @return string HTML output for the radio buttons
612 */
613 private function diffButtons( RevisionRecord $rev, $firstInList ) {
614 if ( $this->getNumRows() > 1 ) {
615 $id = $rev->getId();
616 $radio = [ 'type' => 'radio', 'value' => $id ];
617 /** @todo Move title texts to javascript */
618 if ( $firstInList ) {
619 $first = Html::element( 'input',
620 array_merge( $radio, [
621 // Disable the hidden radio because it can still
622 // be selected with arrow keys on Firefox
623 'disabled' => '',
624 'name' => 'oldid',
625 'id' => 'mw-oldid-null' ] )
626 );
627 $checkmark = [ 'checked' => 'checked' ];
628 } else {
629 # Check visibility of old revisions
630 if ( !$rev->userCan( RevisionRecord::DELETED_TEXT, $this->getAuthority() ) ) {
631 $radio['disabled'] = 'disabled';
632 $checkmark = []; // We will check the next possible one
633 } elseif ( !$this->oldIdChecked ) {
634 $checkmark = [ 'checked' => 'checked' ];
635 $this->oldIdChecked = $id;
636 } else {
637 $checkmark = [];
638 }
639 $first = Html::element( 'input',
640 array_merge( $radio, $checkmark, [
641 'name' => 'oldid',
642 'id' => "mw-oldid-$id" ] ) );
643 $checkmark = [];
644 }
645 $second = Html::element( 'input',
646 array_merge( $radio, $checkmark, [
647 'name' => 'diff',
648 'id' => "mw-diff-$id" ] ) );
649
650 return $first . $second;
651 } else {
652 return '';
653 }
654 }
655
656 /**
657 * Returns whether to show the "navigation bar"
658 *
659 * @return bool
660 */
661 protected function isNavigationBarShown() {
662 if ( $this->getNumRows() == 0 ) {
663 return false;
664 }
665 return parent::isNavigationBarShown();
666 }
667
668 /**
669 * Get the "prevent clickjacking" flag
670 * @return bool
671 */
672 public function getPreventClickjacking() {
673 return $this->preventClickjacking;
674 }
675
676 }
677
678 /** @deprecated class alias since 1.41 */
679 class_alias( HistoryPager::class, 'HistoryPager' );