3 * Implements Special:Contributions
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.
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.
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
21 * @ingroup SpecialPage
25 * Special:Contributions, show user contributions in a paged list
27 * @ingroup SpecialPage
30 class SpecialContributions extends SpecialPage {
32 public function __construct() {
33 parent::__construct( 'Contributions' );
36 public function execute( $par ) {
37 global $wgUser, $wgOut, $wgRequest;
40 $this->outputHeader();
42 $this->opts = array();
44 if( $par == 'newbies' ) {
46 $this->opts['contribs'] = 'newbie';
47 } elseif( isset( $par ) ) {
50 $target = $wgRequest->getVal( 'target' );
54 if( $wgRequest->getVal( 'contribs' ) == 'newbie' ) {
56 $this->opts['contribs'] = 'newbie';
59 $this->opts['deletedOnly'] = $wgRequest->getBool( 'deletedOnly' );
61 if( !strlen( $target ) ) {
62 $wgOut->addHTML( $this->getForm() );
66 $this->opts['limit'] = $wgRequest->getInt( 'limit', $wgUser->getOption('rclimit') );
67 $this->opts['target'] = $target;
68 $this->opts['topOnly'] = $wgRequest->getBool( 'topOnly' );
70 $nt = Title::makeTitleSafe( NS_USER, $target );
72 $wgOut->addHTML( $this->getForm() );
75 $id = User::idFromName( $nt->getText() );
77 if( $target != 'newbies' ) {
78 $target = $nt->getText();
79 $wgOut->setSubtitle( $this->contributionsSub( $nt, $id ) );
80 $wgOut->setHTMLTitle( wfMsg( 'pagetitle', wfMsgExt( 'contributions-title', array( 'parsemag' ),$target ) ) );
82 $wgOut->setSubtitle( wfMsgHtml( 'sp-contributions-newbies-sub') );
83 $wgOut->setHTMLTitle( wfMsg( 'pagetitle', wfMsg( 'sp-contributions-newbies-title' ) ) );
86 if( ( $ns = $wgRequest->getVal( 'namespace', null ) ) !== null && $ns !== '' ) {
87 $this->opts['namespace'] = intval( $ns );
89 $this->opts['namespace'] = '';
92 $this->opts['tagFilter'] = (string) $wgRequest->getVal( 'tagFilter' );
94 // Allows reverts to have the bot flag in recent changes. It is just here to
95 // be passed in the form at the top of the page
96 if( $wgUser->isAllowed( 'markbotedits' ) && $wgRequest->getBool( 'bot' ) ) {
97 $this->opts['bot'] = '1';
100 $skip = $wgRequest->getText( 'offset' ) || $wgRequest->getText( 'dir' ) == 'prev';
101 # Offset overrides year/month selection
103 $this->opts['year'] = '';
104 $this->opts['month'] = '';
106 $this->opts['year'] = $wgRequest->getIntOrNull( 'year' );
107 $this->opts['month'] = $wgRequest->getIntOrNull( 'month' );
110 // Add RSS/atom links
111 $this->setSyndicated();
112 $feedType = $wgRequest->getVal( 'feed' );
114 return $this->feed( $feedType );
117 if ( wfRunHooks( 'SpecialContributionsBeforeMainOutput', array( $id ) ) ) {
119 $wgOut->addHTML( $this->getForm() );
121 $pager = new ContribsPager( array(
123 'namespace' => $this->opts['namespace'],
124 'year' => $this->opts['year'],
125 'month' => $this->opts['month'],
126 'deletedOnly' => $this->opts['deletedOnly'],
127 'topOnly' => $this->opts['topOnly'],
129 if( !$pager->getNumRows() ) {
130 $wgOut->addWikiMsg( 'nocontribs', $target );
132 # Show a message about slave lag, if applicable
133 if( ( $lag = $pager->getDatabase()->getLag() ) > 0 )
134 $wgOut->showLagWarning( $lag );
137 '<p>' . $pager->getNavigationBar() . '</p>' .
139 '<p>' . $pager->getNavigationBar() . '</p>'
142 $wgOut->preventClickjacking( $pager->getPreventClickjacking() );
145 # Show the appropriate "footer" message - WHOIS tools, etc.
146 if( $target != 'newbies' ) {
147 $message = 'sp-contributions-footer';
148 if ( IP::isIPAddress( $target ) ) {
149 $message = 'sp-contributions-footer-anon';
151 $user = User::newFromName( $target );
152 if ( !$user || $user->isAnon() ) {
153 // No message for non-existing users
158 $text = wfMsgNoTrans( $message, $target );
159 if( !wfEmptyMsg( $message, $text ) && $text != '-' ) {
161 "<div class='mw-contributions-footer'>\n$1\n</div>",
162 array( $message, $target ) );
168 protected function setSyndicated() {
170 $wgOut->setSyndicated( true );
171 $wgOut->setFeedAppendQuery( wfArrayToCGI( $this->opts ) );
175 * Generates the subheading with links
176 * @param $nt Title object for the target
177 * @param $id Integer: User ID for the target
178 * @return String: appropriately-escaped HTML to be output literally
179 * @todo Fixme: almost the same as getSubTitle in SpecialDeletedContributions.php. Could be combined.
181 protected function contributionsSub( $nt, $id ) {
182 global $wgSysopUserBans, $wgLang, $wgUser, $wgOut;
184 $sk = $wgUser->getSkin();
186 if ( $id === null ) {
187 $user = htmlspecialchars( $nt->getText() );
189 $user = $sk->link( $nt, htmlspecialchars( $nt->getText() ) );
191 $userObj = User::newFromName( $nt->getText(), /* check for username validity not needed */ false );
192 $talk = $nt->getTalkPage();
195 $tools[] = $sk->link( $talk, wfMsgHtml( 'sp-contributions-talk' ) );
196 if( ( $id !== null && $wgSysopUserBans ) || ( $id === null && IP::isIPAddress( $nt->getText() ) ) ) {
197 if( $wgUser->isAllowed( 'block' ) ) { # Block / Change block / Unblock links
198 if ( $userObj->isBlocked() ) {
199 $tools[] = $sk->linkKnown( # Change block link
200 SpecialPage::getTitleFor( 'Blockip', $nt->getDBkey() ),
201 wfMsgHtml( 'change-blocklink' )
203 $tools[] = $sk->linkKnown( # Unblock link
204 SpecialPage::getTitleFor( 'Ipblocklist' ),
205 wfMsgHtml( 'unblocklink' ),
208 'action' => 'unblock',
209 'ip' => $nt->getDBkey()
213 else { # User is not blocked
214 $tools[] = $sk->linkKnown( # Block link
215 SpecialPage::getTitleFor( 'Blockip', $nt->getDBkey() ),
216 wfMsgHtml( 'blocklink' )
221 $tools[] = $sk->linkKnown(
222 SpecialPage::getTitleFor( 'Log' ),
223 wfMsgHtml( 'sp-contributions-blocklog' ),
227 'page' => $nt->getPrefixedText()
232 $tools[] = $sk->linkKnown(
233 SpecialPage::getTitleFor( 'Listfiles' ),
234 wfMsgHtml( 'sp-contributions-uploads' ),
236 array( 'user' => $nt->getText() )
240 $tools[] = $sk->linkKnown(
241 SpecialPage::getTitleFor( 'Log' ),
242 wfMsgHtml( 'sp-contributions-logs' ),
244 array( 'user' => $nt->getText() )
247 # Add link to deleted user contributions for priviledged users
248 if( $wgUser->isAllowed( 'deletedhistory' ) ) {
249 $tools[] = $sk->linkKnown(
250 SpecialPage::getTitleFor( 'DeletedContributions', $nt->getDBkey() ),
251 wfMsgHtml( 'sp-contributions-deleted' )
255 # Add a link to change user rights for privileged users
256 $userrightsPage = new UserrightsPage();
257 if( $id !== null && $userrightsPage->userCanChangeRights( User::newFromId( $id ) ) ) {
258 $tools[] = $sk->linkKnown(
259 SpecialPage::getTitleFor( 'Userrights', $nt->getDBkey() ),
260 wfMsgHtml( 'sp-contributions-userrights' )
264 wfRunHooks( 'ContributionsToolLinks', array( $id, $nt, &$tools ) );
266 $links = $wgLang->pipeList( $tools );
268 // Show a note if the user is blocked and display the last block log entry.
269 if ( $userObj->isBlocked() ) {
270 LogEventsList::showLogExtract(
273 $nt->getPrefixedText(),
277 'showIfEmpty' => false,
280 'sp-contributions-blocked-notice-anon' :
281 'sp-contributions-blocked-notice',
282 $nt->getText() # Support GENDER in 'sp-contributions-blocked-notice'
284 'offset' => '' # don't use $wgRequest parameter offset
290 // Old message 'contribsub' had one parameter, but that doesn't work for
291 // languages that want to put the "for" bit right after $user but before
292 // $links. If 'contribsub' is around, use it for reverse compatibility,
293 // otherwise use 'contribsub2'.
294 if( wfEmptyMsg( 'contribsub', wfMsg( 'contribsub' ) ) ) {
295 return wfMsgHtml( 'contribsub2', $user, $links );
297 return wfMsgHtml( 'contribsub', "$user ($links)" );
302 * Generates the namespace selector form with hidden attributes.
303 * @return String: HTML fragment
305 protected function getForm() {
308 $this->opts['title'] = $this->getTitle()->getPrefixedText();
309 if( !isset( $this->opts['target'] ) ) {
310 $this->opts['target'] = '';
312 $this->opts['target'] = str_replace( '_' , ' ' , $this->opts['target'] );
315 if( !isset( $this->opts['namespace'] ) ) {
316 $this->opts['namespace'] = '';
319 if( !isset( $this->opts['contribs'] ) ) {
320 $this->opts['contribs'] = 'user';
323 if( !isset( $this->opts['year'] ) ) {
324 $this->opts['year'] = '';
327 if( !isset( $this->opts['month'] ) ) {
328 $this->opts['month'] = '';
331 if( $this->opts['contribs'] == 'newbie' ) {
332 $this->opts['target'] = '';
335 if( !isset( $this->opts['tagFilter'] ) ) {
336 $this->opts['tagFilter'] = '';
339 if( !isset( $this->opts['topOnly'] ) ) {
340 $this->opts['topOnly'] = false;
343 $f = Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'class' => 'mw-contributions-form' ) );
345 # Add hidden params for tracking except for parameters in $skipParameters
346 $skipParameters = array( 'namespace', 'deletedOnly', 'target', 'contribs', 'year', 'month', 'topOnly' );
347 foreach ( $this->opts as $name => $value ) {
348 if( in_array( $name, $skipParameters ) ) {
351 $f .= "\t" . Html::hidden( $name, $value ) . "\n";
354 $tagFilter = ChangeTags::buildTagFilterSelector( $this->opts['tagFilter'] );
356 $f .= Xml::fieldset( wfMsg( 'sp-contributions-search' ) ) .
357 Xml::radioLabel( wfMsgExt( 'sp-contributions-newbies', array( 'parsemag' ) ),
358 'contribs', 'newbie' , 'newbie', $this->opts['contribs'] == 'newbie' ) . '<br />' .
359 Xml::radioLabel( wfMsgExt( 'sp-contributions-username', array( 'parsemag' ) ),
360 'contribs' , 'user', 'user', $this->opts['contribs'] == 'user' ) . ' ' .
361 Html::input( 'target', $this->opts['target'], 'text', array(
364 ) + ( $this->opts['target'] ? array() : array( 'autofocus' ) ) ) . ' '.
365 Html::rawElement( 'span', array( 'style' => 'white-space: nowrap' ),
366 Xml::label( wfMsg( 'namespace' ), 'namespace' ) . ' ' .
367 Xml::namespaceSelector( $this->opts['namespace'], '' )
369 Xml::checkLabel( wfMsg( 'history-show-deleted' ),
370 'deletedOnly', 'mw-show-deleted-only', $this->opts['deletedOnly'] ) . '<br />' .
371 Xml::tags( 'p', null, Xml::checkLabel( wfMsg( 'sp-contributions-toponly' ),
372 'topOnly', 'mw-show-top-only', $this->opts['topOnly'] ) ) .
373 ( $tagFilter ? Xml::tags( 'p', null, implode( ' ', $tagFilter ) ) : '' ) .
374 Html::rawElement( 'p', array( 'style' => 'white-space: nowrap' ),
375 Xml::dateMenu( $this->opts['year'], $this->opts['month'] ) . ' ' .
376 Xml::submitButton( wfMsg( 'sp-contributions-submit' ) )
378 $explain = wfMsgExt( 'sp-contributions-explain', 'parseinline' );
379 if( !wfEmptyMsg( 'sp-contributions-explain', $explain ) ) {
380 $f .= "<p id='mw-sp-contributions-explain'>{$explain}</p>";
382 $f .= Xml::closeElement('fieldset' ) .
383 Xml::closeElement( 'form' );
388 * Output a subscription feed listing recent edits to this page.
389 * @param $type String
391 protected function feed( $type ) {
392 global $wgFeed, $wgFeedClasses, $wgFeedLimit, $wgOut;
395 $wgOut->addWikiMsg( 'feed-unavailable' );
399 if( !isset( $wgFeedClasses[$type] ) ) {
400 $wgOut->addWikiMsg( 'feed-invalid' );
404 $feed = new $wgFeedClasses[$type](
406 wfMsgExt( 'tagline', 'parsemag' ),
407 $this->getTitle()->getFullUrl() . "/" . urlencode($this->opts['target'])
410 // Already valid title
411 $nt = Title::makeTitleSafe( NS_USER, $this->opts['target'] );
412 $target = $this->opts['target'] == 'newbies' ? 'newbies' : $nt->getText();
414 $pager = new ContribsPager( array(
416 'namespace' => $this->opts['namespace'],
417 'year' => $this->opts['year'],
418 'month' => $this->opts['month'],
419 'tagFilter' => $this->opts['tagFilter'],
420 'deletedOnly' => $this->opts['deletedOnly'],
421 'topOnly' => $this->opts['topOnly'],
424 $pager->mLimit = min( $this->opts['limit'], $wgFeedLimit );
427 if( $pager->getNumRows() > 0 ) {
428 foreach ( $pager->mResult as $row ) {
429 $feed->outItem( $this->feedItem( $row ) );
435 protected function feedTitle() {
436 global $wgLanguageCode, $wgSitename;
437 $page = SpecialPage::getPage( 'Contributions' );
438 $desc = $page->getDescription();
439 return "$wgSitename - $desc [$wgLanguageCode]";
442 protected function feedItem( $row ) {
443 $title = Title::MakeTitle( intval( $row->page_namespace ), $row->page_title );
445 $date = $row->rev_timestamp;
446 $comments = $title->getTalkPage()->getFullURL();
447 $revision = Revision::newFromTitle( $title, $row->rev_id );
450 $title->getPrefixedText(),
451 $this->feedItemDesc( $revision ),
452 $title->getFullURL(),
454 $this->feedItemAuthor( $revision ),
462 protected function feedItemAuthor( $revision ) {
463 return $revision->getUserText();
466 protected function feedItemDesc( $revision ) {
468 return '<p>' . htmlspecialchars( $revision->getUserText() ) . wfMsgForContent( 'colon-separator' ) .
469 htmlspecialchars( FeedItem::stripComment( $revision->getComment() ) ) .
470 "</p>\n<hr />\n<div>" .
471 nl2br( htmlspecialchars( $revision->getText() ) ) . "</div>";
478 * Pager for Special:Contributions
479 * @ingroup SpecialPage Pager
481 class ContribsPager extends ReverseChronologicalPager {
482 public $mDefaultDirection = true;
483 var $messages, $target;
484 var $namespace = '', $mDb;
485 var $preventClickjacking = false;
487 function __construct( $options ) {
488 parent::__construct();
490 $msgs = array( 'uctop', 'diff', 'newarticle', 'rollbacklink', 'diff', 'hist', 'rev-delundel', 'pipe-separator' );
492 foreach( $msgs as $msg ) {
493 $this->messages[$msg] = wfMsgExt( $msg, array( 'escapenoentities' ) );
496 $this->target = isset( $options['target'] ) ? $options['target'] : '';
497 $this->namespace = isset( $options['namespace'] ) ? $options['namespace'] : '';
498 $this->tagFilter = isset( $options['tagFilter'] ) ? $options['tagFilter'] : false;
500 $this->deletedOnly = !empty( $options['deletedOnly'] );
501 $this->topOnly = !empty( $options['topOnly'] );
503 $year = isset( $options['year'] ) ? $options['year'] : false;
504 $month = isset( $options['month'] ) ? $options['month'] : false;
505 $this->getDateCond( $year, $month );
507 $this->mDb = wfGetDB( DB_SLAVE, 'contributions' );
510 function getDefaultQuery() {
511 $query = parent::getDefaultQuery();
512 $query['target'] = $this->target;
516 function getQueryInfo() {
518 list( $tables, $index, $userCond, $join_cond ) = $this->getUserCond();
520 $conds = array_merge( $userCond, $this->getNamespaceCond() );
521 // Paranoia: avoid brute force searches (bug 17342)
522 if( !$wgUser->isAllowed( 'deletedhistory' ) ) {
523 $conds[] = $this->mDb->bitAnd('rev_deleted',Revision::DELETED_USER) . ' = 0';
524 } else if( !$wgUser->isAllowed( 'suppressrevision' ) ) {
525 $conds[] = $this->mDb->bitAnd('rev_deleted',Revision::SUPPRESSED_USER) .
526 ' != ' . Revision::SUPPRESSED_USER;
528 $join_cond['page'] = array( 'INNER JOIN', 'page_id=rev_page' );
533 'page_namespace', 'page_title', 'page_is_new', 'page_latest', 'page_is_redirect',
534 'page_len','rev_id', 'rev_page', 'rev_text_id', 'rev_timestamp', 'rev_comment',
535 'rev_minor_edit', 'rev_user', 'rev_user_text', 'rev_parent_id', 'rev_deleted'
538 'options' => array( 'USE INDEX' => array('revision' => $index) ),
539 'join_conds' => $join_cond
542 ChangeTags::modifyDisplayQuery(
543 $queryInfo['tables'],
544 $queryInfo['fields'],
546 $queryInfo['join_conds'],
547 $queryInfo['options'],
551 wfRunHooks( 'ContribsPager::getQueryInfo', array( &$this, &$queryInfo ) );
555 function getUserCond() {
556 $condition = array();
557 $join_conds = array();
558 if( $this->target == 'newbies' ) {
559 $tables = array( 'user_groups', 'page', 'revision' );
560 $max = $this->mDb->selectField( 'user', 'max(user_id)', false, __METHOD__ );
561 $condition[] = 'rev_user >' . (int)($max - $max / 100);
562 $condition[] = 'ug_group IS NULL';
563 $index = 'user_timestamp';
564 # FIXME: other groups may have 'bot' rights
565 $join_conds['user_groups'] = array( 'LEFT JOIN', "ug_user = rev_user AND ug_group = 'bot'" );
567 $tables = array( 'page', 'revision' );
568 $condition['rev_user_text'] = $this->target;
569 $index = 'usertext_timestamp';
571 if( $this->deletedOnly ) {
572 $condition[] = "rev_deleted != '0'";
574 if( $this->topOnly ) {
575 $condition[] = "rev_id = page_latest";
577 return array( $tables, $index, $condition, $join_conds );
580 function getNamespaceCond() {
581 if( $this->namespace !== '' ) {
582 return array( 'page_namespace' => (int)$this->namespace );
588 function getIndexField() {
589 return 'rev_timestamp';
592 function getStartBody() {
596 function getEndBody() {
601 * Generates each row in the contributions list.
603 * Contributions which are marked "top" are currently on top of the history.
604 * For these contributions, a [rollback] link is shown for users with roll-
605 * back privileges. The rollback link restores the most recent version that
606 * was not written by the target user.
608 * @todo This would probably look a lot nicer in a table.
610 function formatRow( $row ) {
611 global $wgUser, $wgLang, $wgContLang;
612 wfProfileIn( __METHOD__ );
614 $sk = $this->getSkin();
615 $rev = new Revision( $row );
618 $page = Title::newFromRow( $row );
621 htmlspecialchars( $page->getPrefixedText() ),
623 $page->isRedirect() ? array( 'redirect' => 'no' ) : array()
625 # Mark current revisions
627 if( $row->rev_id == $row->page_latest ) {
628 $topmarktext .= '<span class="mw-uctop">' . $this->messages['uctop'] . '</span>';
630 if( !$row->page_is_new && $page->quickUserCan( 'rollback' )
631 && $page->quickUserCan( 'edit' ) )
633 $this->preventClickjacking();
634 $topmarktext .= ' '.$sk->generateRollback( $rev );
637 # Is there a visible previous revision?
638 if( $rev->userCan( Revision::DELETED_TEXT ) && $rev->getParentId() !== 0 ) {
639 $difftext = $sk->linkKnown(
641 $this->messages['diff'],
645 'oldid' => $row->rev_id
649 $difftext = $this->messages['diff'];
651 $histlink = $sk->linkKnown(
653 $this->messages['hist'],
655 array( 'action' => 'history' )
658 $comment = $wgContLang->getDirMark() . $sk->revComment( $rev, false, true );
659 $date = $wgLang->timeanddate( wfTimestamp( TS_MW, $row->rev_timestamp ), true );
660 if( $rev->userCan( Revision::DELETED_TEXT ) ) {
663 htmlspecialchars($date),
665 array( 'oldid' => intval( $row->rev_id ) )
668 $d = htmlspecialchars( $date );
670 if( $rev->isDeleted( Revision::DELETED_TEXT ) ) {
671 $d = '<span class="history-deleted">' . $d . '</span>';
674 if( $this->target == 'newbies' ) {
675 $userlink = ' . . ' . $sk->userLink( $row->rev_user, $row->rev_user_text );
676 $userlink .= ' ' . wfMsg( 'parentheses', $sk->userTalkLink( $row->rev_user, $row->rev_user_text ) ) . ' ';
681 if( $rev->getParentId() === 0 ) {
682 $nflag = ChangesList::flag( 'newpage' );
687 if( $rev->isMinor() ) {
688 $mflag = ChangesList::flag( 'minor' );
693 // Don't show useless link to people who cannot hide revisions
694 $canHide = $wgUser->isAllowed( 'deleterevision' );
695 if( $canHide || ($rev->getVisibility() && $wgUser->isAllowed('deletedhistory')) ) {
696 if( !$rev->userCan( Revision::DELETED_RESTRICTED ) ) {
697 $del = $this->mSkin->revDeleteLinkDisabled( $canHide ); // revision was hidden from sysops
700 'type' => 'revision',
701 'target' => $page->getPrefixedDbkey(),
702 'ids' => $rev->getId()
704 $del = $this->mSkin->revDeleteLink( $query,
705 $rev->isDeleted( Revision::DELETED_RESTRICTED ), $canHide );
712 $diffHistLinks = '(' . $difftext . $this->messages['pipe-separator'] . $histlink . ')';
713 $ret = "{$del}{$d} {$diffHistLinks} {$nflag}{$mflag} {$link}{$userlink} {$comment} {$topmarktext}";
715 # Denote if username is redacted for this edit
716 if( $rev->isDeleted( Revision::DELETED_USER ) ) {
717 $ret .= " <strong>" . wfMsgHtml('rev-deleted-user-contribs') . "</strong>";
721 list($tagSummary, $newClasses) = ChangeTags::formatSummaryRow( $row->ts_tags, 'contributions' );
722 $classes = array_merge( $classes, $newClasses );
723 $ret .= " $tagSummary";
725 // Let extensions add data
726 wfRunHooks( 'ContributionsLineEnding', array( &$this, &$ret, $row ) );
728 $classes = implode( ' ', $classes );
729 $ret = "<li class=\"$classes\">$ret</li>\n";
730 wfProfileOut( __METHOD__ );
735 * Get the Database object in use
739 public function getDatabase() {
744 * Overwrite Pager function and return a helpful comment
746 function getSqlComment() {
747 if ( $this->namespace || $this->deletedOnly ) {
748 return 'contributions page filtered for namespace or RevisionDeleted edits'; // potentially slow, see CR r58153
750 return 'contributions page unfiltered';
754 protected function preventClickjacking() {
755 $this->preventClickjacking = true;
758 public function getPreventClickjacking() {
759 return $this->preventClickjacking;