*/
protected $parentLens;
+ /** @var bool Whether to show the tag editing UI */
+ protected $showTagEditUI;
+
/**
* @param HistoryAction $historyPage
* @param string $year
$this->tagFilter = $tagFilter;
$this->getDateCond( $year, $month );
$this->conds = $conds;
+ $this->showTagEditUI = ChangeTags::showTagEditingUI( $this->getUser() );
}
// For hook compatibility...
if ( $user->isAllowed( 'deleterevision' ) ) {
$actionButtons .= $this->getRevisionButton( 'revisiondelete', 'showhideselectedversions' );
}
- if ( ChangeTags::showTagEditingUI( $user ) ) {
+ if ( $this->showTagEditUI ) {
$actionButtons .= $this->getRevisionButton( 'editchangetags', 'history-edit-tags' );
}
if ( $actionButtons ) {
$del = '';
$user = $this->getUser();
$canRevDelete = $user->isAllowed( 'deleterevision' );
- $showTagEditUI = ChangeTags::showTagEditingUI( $user );
// Show checkboxes for each revision, to allow for revision deletion and
// change tags
- if ( $canRevDelete || $showTagEditUI ) {
+ if ( $canRevDelete || $this->showTagEditUI ) {
$this->preventClickjacking();
// If revision was hidden from sysops and we don't need the checkbox
// for anything else, disable it
- if ( !$showTagEditUI && !$rev->userCan( Revision::DELETED_RESTRICTED, $user ) ) {
+ if ( !$this->showTagEditUI && !$rev->userCan( Revision::DELETED_RESTRICTED, $user ) ) {
$del = Xml::check( 'deleterevisions', false, array( 'disabled' => 'disabled' ) );
// Otherwise, enable the checkbox...
} else {
*/
protected $mDefaultQuery;
+ /**
+ * @var bool
+ */
+ protected $showTagEditUI;
+
/**
* Constructor.
* The first two parameters used to be $skin and $out, but now only a context
}
$this->flags = $flags;
+ $this->showTagEditUI = ChangeTags::showTagEditingUI( $this->getUser() );
}
/**
$user = $this->getUser();
// If change tag editing is available to this user, return the checkbox
- if ( $this->flags & self::USE_CHECKBOXES && ChangeTags::showTagEditingUI( $user ) ) {
+ if ( $this->flags & self::USE_CHECKBOXES && $this->showTagEditUI ) {
return Xml::check(
'showhiderevisions',
false,