Index: trunk/phase3/includes/specials/SpecialRevisiondelete.php |
— | — | @@ -170,13 +170,11 @@ |
171 | 171 | $qc = $this->getLogQueryCond(); |
172 | 172 | # Show relevant lines from the deletion log |
173 | 173 | $wgOut->addHTML( "<h2>" . htmlspecialchars( LogPage::logName( 'delete' ) ) . "</h2>\n" ); |
174 | | - LogEventsList::showLogExtract( $wgOut, 'delete', |
175 | | - $this->targetObj->getPrefixedText(), '', 25, $qc ); |
| 174 | + LogEventsList::showLogExtract( $wgOut, 'delete', $this->targetObj->getPrefixedText(), '', 25, $qc ); |
176 | 175 | # Show relevant lines from the suppression log |
177 | 176 | if( $wgUser->isAllowed( 'suppressionlog' ) ) { |
178 | 177 | $wgOut->addHTML( "<h2>" . htmlspecialchars( LogPage::logName( 'suppress' ) ) . "</h2>\n" ); |
179 | | - LogEventsList::showLogExtract( $wgOut, 'suppress', |
180 | | - $this->targetObj->getPrefixedText(), '', 25, $qc ); |
| 178 | + LogEventsList::showLogExtract( $wgOut, 'suppress', $this->targetObj->getPrefixedText(), '', 25, $qc ); |
181 | 179 | } |
182 | 180 | } |
183 | 181 | |
— | — | @@ -295,8 +293,7 @@ |
296 | 294 | if ( $this->typeName == 'logging' ) { |
297 | 295 | $wgOut->addWikiMsg( 'logdelete-selected', $wgLang->formatNum( count($this->ids) ) ); |
298 | 296 | } else { |
299 | | - $wgOut->addWikiMsg( 'revdelete-selected', |
300 | | - $this->targetObj->getPrefixedText(), count( $this->ids ) ); |
| 297 | + $wgOut->addWikiMsg( 'revdelete-selected', $this->targetObj->getPrefixedText(), count( $this->ids ) ); |
301 | 298 | } |
302 | 299 | |
303 | 300 | $bitfields = 0; |
— | — | @@ -647,8 +644,7 @@ |
648 | 645 | $opType = 'modify'; |
649 | 646 | } |
650 | 647 | |
651 | | - // TODO: use FILE::DELETED_FILE, though value is the same |
652 | | - if ( $item->isCurrent() && ($newBits & Revision::DELETED_TEXT) ) { |
| 648 | + if ( $item->isHideCurrentOp( $newBits ) ) { |
653 | 649 | // Cannot hide current version text |
654 | 650 | $status->error( 'revdelete-hide-current', $item->formatDate(), $item->formatTime() ); |
655 | 651 | $status->failCount++; |
— | — | @@ -905,10 +901,11 @@ |
906 | 902 | } |
907 | 903 | |
908 | 904 | /** |
909 | | - * Returns true if the item is "current" and can't be deleted for that reason |
| 905 | + * Returns true if the item is "current", and the operation to set the given |
| 906 | + * bits can't be executed for that reason |
910 | 907 | * STUB |
911 | 908 | */ |
912 | | - public function isCurrent() { |
| 909 | + public function isHideCurrentOp( $newBits ) { |
913 | 910 | return false; |
914 | 911 | } |
915 | 912 | |
— | — | @@ -1046,8 +1043,9 @@ |
1047 | 1044 | return $this->revision->isDeleted( Revision::DELETED_TEXT ); |
1048 | 1045 | } |
1049 | 1046 | |
1050 | | - public function isCurrent() { |
1051 | | - return $this->list->getCurrent() == $this->getId(); |
| 1047 | + public function isHideCurrentOp( $newBits ) { |
| 1048 | + return ( $newBits & Revision::DELETED_TEXT ) |
| 1049 | + && $this->list->getCurrent() == $this->getId(); |
1052 | 1050 | } |
1053 | 1051 | |
1054 | 1052 | /** |