$qc = $this->getLogQueryCond();
# Show relevant lines from the deletion log
$wgOut->addHTML( "<h2>" . htmlspecialchars( LogPage::logName( 'delete' ) ) . "</h2>\n" );
- LogEventsList::showLogExtract( $wgOut, 'delete',
- $this->targetObj->getPrefixedText(), '', 25, $qc );
+ LogEventsList::showLogExtract( $wgOut, 'delete', $this->targetObj->getPrefixedText(), '', 25, $qc );
# Show relevant lines from the suppression log
if( $wgUser->isAllowed( 'suppressionlog' ) ) {
$wgOut->addHTML( "<h2>" . htmlspecialchars( LogPage::logName( 'suppress' ) ) . "</h2>\n" );
- LogEventsList::showLogExtract( $wgOut, 'suppress',
- $this->targetObj->getPrefixedText(), '', 25, $qc );
+ LogEventsList::showLogExtract( $wgOut, 'suppress', $this->targetObj->getPrefixedText(), '', 25, $qc );
}
}
if ( $this->typeName == 'logging' ) {
$wgOut->addWikiMsg( 'logdelete-selected', $wgLang->formatNum( count($this->ids) ) );
} else {
- $wgOut->addWikiMsg( 'revdelete-selected',
- $this->targetObj->getPrefixedText(), count( $this->ids ) );
+ $wgOut->addWikiMsg( 'revdelete-selected', $this->targetObj->getPrefixedText(), count( $this->ids ) );
}
$bitfields = 0;
$opType = 'modify';
}
- // TODO: use FILE::DELETED_FILE, though value is the same
- if ( $item->isCurrent() && ($newBits & Revision::DELETED_TEXT) ) {
+ if ( $item->isHideCurrentOp( $newBits ) ) {
// Cannot hide current version text
$status->error( 'revdelete-hide-current', $item->formatDate(), $item->formatTime() );
$status->failCount++;
}
/**
- * Returns true if the item is "current" and can't be deleted for that reason
+ * Returns true if the item is "current", and the operation to set the given
+ * bits can't be executed for that reason
* STUB
*/
- public function isCurrent() {
+ public function isHideCurrentOp( $newBits ) {
return false;
}
return $this->revision->isDeleted( Revision::DELETED_TEXT );
}
- public function isCurrent() {
- return $this->list->getCurrent() == $this->getId();
+ public function isHideCurrentOp( $newBits ) {
+ return ( $newBits & Revision::DELETED_TEXT )
+ && $this->list->getCurrent() == $this->getId();
}
/**