'success' => 'revdelete-success',
'failure' => 'revdelete-failure',
'list-class' => 'RevDel_RevisionList',
+ 'permission' => 'deleterevision',
),
'archive' => array(
'check-label' => 'revdelete-hide-text',
'success' => 'revdelete-success',
'failure' => 'revdelete-failure',
'list-class' => 'RevDel_ArchiveList',
+ 'permission' => 'deleterevision',
),
'oldimage'=> array(
'check-label' => 'revdelete-hide-image',
'success' => 'revdelete-success',
'failure' => 'revdelete-failure',
'list-class' => 'RevDel_FileList',
+ 'permission' => 'deleterevision',
),
'filearchive' => array(
'check-label' => 'revdelete-hide-image',
'success' => 'revdelete-success',
'failure' => 'revdelete-failure',
'list-class' => 'RevDel_ArchivedFileList',
+ 'permission' => 'deleterevision',
),
'logging' => array(
'check-label' => 'revdelete-hide-name',
'success' => 'logdelete-success',
'failure' => 'logdelete-failure',
'list-class' => 'RevDel_LogList',
+ 'permission' => 'deletelogentry',
),
);
$output = $this->getOutput();
$user = $this->getUser();
- $this->mIsAllowed = $user->isAllowed('deleterevision'); // for changes
$this->setHeaders();
$this->outputHeader();
$request = $this->getRequest();
return;
}
$this->typeInfo = self::$allowedTypes[$this->typeName];
+ $this->mIsAllowed = $user->isAllowed( $this->typeInfo['permission'] );
# If we have revisions, get the title from the first one
# since they should all be from the same page. This allows
$qc = $this->getLogQueryCond();
# Show relevant lines from the deletion log
- $output->addHTML( "<h2>" . htmlspecialchars( LogPage::logName( 'delete' ) ) . "</h2>\n" );
+ $deleteLogPage = new LogPage( 'delete' );
+ $output->addHTML( "<h2>" . $deleteLogPage->getName()->escaped() . "</h2>\n" );
LogEventsList::showLogExtract( $output, 'delete',
$this->targetObj, '', array( 'lim' => 25, 'conds' => $qc ) );
# Show relevant lines from the suppression log
if( $user->isAllowed( 'suppressionlog' ) ) {
- $output->addHTML( "<h2>" . htmlspecialchars( LogPage::logName( 'suppress' ) ) . "</h2>\n" );
+ $suppressLogPage = new LogPage( 'suppress' );
+ $output->addHTML( "<h2>" . $suppressLogPage->getName()->escaped() . "</h2>\n" );
LogEventsList::showLogExtract( $output, 'suppress',
$this->targetObj, '', array( 'lim' => 25, 'conds' => $qc ) );
}
/**
* Do the write operations. Simple wrapper for RevDel_*List::setVisibility().
+ * @param $bitfield
+ * @param $reason
+ * @param $title
* @return
*/
protected function save( $bitfield, $reason, $title ) {