r51009 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r51008‎ | r51009 | r51010 >
Date:12:29, 26 May 2009
Author:aaron
Status:ok
Tags:
Comment:
(bug 18772) Removed redundant 'deletedrev' message instances
Modified paths:
  • /trunk/phase3/includes/ChangesList.php (modified) (history)
  • /trunk/phase3/includes/PageHistory.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialContributions.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialDeletedContributions.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialRevisiondelete.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUndelete.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/ChangesList.php
@@ -447,10 +447,6 @@
448448 # For subclasses
449449 $this->insertExtra( $s, $rc, $classes );
450450
451 - # Mark revision as deleted if so
452 - if( !$rc->mAttribs['rc_log_type'] && $this->isDeleted($rc,Revision::DELETED_TEXT) ) {
453 - $s .= ' <tt>' . wfMsgHtml( 'deletedrev' ) . '</tt>';
454 - }
455451 # How many users watch this page
456452 if( $rc->numberofWatchingusers > 0 ) {
457453 $s .= ' ' . wfMsgExt( 'number_of_watching_users_RCview',
@@ -865,11 +861,6 @@
866862 $this->insertRollback( $r, $rcObj );
867863 # Tags
868864 $this->insertTags( $r, $rcObj, $classes );
869 -
870 - # Mark revision as deleted
871 - if( !$rc_log_type && $this->isDeleted($rcObj,Revision::DELETED_TEXT) ) {
872 - $r .= ' <tt>' . wfMsgHtml( 'deletedrev' ) . '</tt>';
873 - }
874865
875866 $r .= "</td></tr>\n";
876867 }
Index: trunk/phase3/includes/specials/SpecialUndelete.php
@@ -902,7 +902,6 @@
903903 array(),
904904 $targetQuery
905905 ) .
906 - ( $isDeleted ? ' ' . wfMsgHtml( 'deletedrev' ) : '' ) .
907906 '</strong></div>' .
908907 '<div id="mw-diff-'.$prefix.'title2">' .
909908 $sk->revUserTools( $rev ) . '<br/>' .
Index: trunk/phase3/includes/specials/SpecialRevisiondelete.php
@@ -599,7 +599,7 @@
600600 global $wgLang, $wgUser;
601601
602602 $date = $wgLang->timeanddate( $rev->getTimestamp() );
603 - $difflink = $del = '';
 603+ $difflink = '';
604604 // Live revisions
605605 if( $this->deleteKey == 'oldid' ) {
606606 $tokenParams = '&unhide=1&token='.urlencode( $wgUser->editToken( $rev->getId() ) );
@@ -618,7 +618,6 @@
619619 // Check permissions; items may be "suppressed"
620620 if( $rev->isDeleted(Revision::DELETED_TEXT) ) {
621621 $revlink = '<span class="history-deleted">'.$revlink.'</span>';
622 - $del = ' <tt>' . wfMsgHtml( 'deletedrev' ) . '</tt>';
623622 if( !$rev->userCan(Revision::DELETED_TEXT) ) {
624623 $revlink = '<span class="history-deleted">'.$date.'</span>';
625624 $difflink = '(' . wfMsgHtml('diff') . ')';
@@ -627,7 +626,7 @@
628627 $userlink = $this->skin->revUserLink( $rev );
629628 $comment = $this->skin->revComment( $rev );
630629
631 - return "<li>$difflink $revlink $userlink $comment{$del}</li>";
 630+ return "<li>$difflink $revlink $userlink $comment</li>";
632631 }
633632
634633 /**
@@ -640,10 +639,8 @@
641640 $target = $this->page->getPrefixedText();
642641 $date = $wgLang->timeanddate( $file->getTimestamp(), true );
643642
644 - $del = '';
645643 # Hidden files...
646644 if( $file->isDeleted(File::DELETED_FILE) ) {
647 - $del = ' <tt>' . wfMsgHtml( 'deletedrev' ) . '</tt>';
648645 if( !$file->userCan(File::DELETED_FILE) ) {
649646 $pageLink = $date;
650647 } else {
@@ -663,7 +660,7 @@
664661 $data = htmlspecialchars( $data );
665662
666663 return "<li>$pageLink ".$this->fileUserTools( $file )." $data ".
667 - $this->fileComment( $file )."$del</li>";
 664+ $this->fileComment( $file )."</li>";
668665 }
669666
670667 /**
@@ -680,18 +677,13 @@
681678 $pageLink = $this->skin->makeKnownLinkObj( $undelete, $date,
682679 "target=$target&file={$file->getKey()}" );
683680
684 - $del = '';
685 - if( $file->isDeleted(File::DELETED_FILE) ) {
686 - $del = ' <tt>' . wfMsgHtml( 'deletedrev' ) . '</tt>';
687 - }
688 -
689681 $data = wfMsg( 'widthheight', $wgLang->formatNum( $file->getWidth() ),
690682 $wgLang->formatNum( $file->getHeight() ) ) .
691683 ' (' . wfMsgExt( 'nbytes', 'parsemag', $wgLang->formatNum( $file->getSize() ) ) . ')';
692684 $data = htmlspecialchars( $data );
693685
694686 return "<li>$pageLink ".$this->fileUserTools( $file )." $data ".
695 - $this->fileComment( $file )."$del</li>";
 687+ $this->fileComment( $file )."</li>";
696688 }
697689
698690 /**
Index: trunk/phase3/includes/specials/SpecialContributions.php
@@ -554,9 +554,6 @@
555555 }
556556
557557 $ret = "{$del}{$d} {$histlink} {$difftext} {$nflag}{$mflag} {$link}{$userlink} {$comment} {$topmarktext}";
558 - if( $rev->isDeleted( Revision::DELETED_TEXT ) ) {
559 - $ret .= ' ' . wfMsgHtml( 'deletedrev' );
560 - }
561558
562559 # Tags, if any.
563560 list($tagSummary, $newClasses) = ChangeTags::formatSummaryRow( $row->ts_tags, 'contributions' );
Index: trunk/phase3/includes/specials/SpecialDeletedContributions.php
@@ -180,9 +180,6 @@
181181 }
182182
183183 $ret = "{$del}{$link} ({$last}) ({$dellog}) ({$reviewlink}) . . {$mflag} {$pagelink} {$comment}";
184 - if( $rev->isDeleted( Revision::DELETED_TEXT ) ) {
185 - $ret .= ' ' . wfMsgHtml( 'deletedrev' );
186 - }
187184
188185 $ret = "<li>$ret</li>\n";
189186
Index: trunk/phase3/includes/PageHistory.php
@@ -320,19 +320,18 @@
321321 if( $notificationtimestamp && ($row->rev_timestamp >= $notificationtimestamp) ) {
322322 $s .= ' <span class="updatedmarker">' . wfMsgHtml( 'updatedmarker' ) . '</span>';
323323 }
324 - if( $rev->isDeleted( Revision::DELETED_TEXT ) ) {
325 - $s .= ' <tt>' . wfMsgHtml( 'deletedrev' ) . '</tt>';
326 - }
327324
328325 $tools = array();
329326
330327 if( !is_null( $next ) && is_object( $next ) ) {
331328 if( $latest && $this->mTitle->userCan( 'rollback' ) && $this->mTitle->userCan( 'edit' ) ) {
332 - $tools[] = '<span class="mw-rollback-link">'.$this->mSkin->buildRollbackLink( $rev ).'</span>';
 329+ $tools[] = '<span class="mw-rollback-link">'.
 330+ $this->mSkin->buildRollbackLink( $rev ).'</span>';
333331 }
334332
335 - if( $this->mTitle->quickUserCan( 'edit' ) && !$rev->isDeleted( Revision::DELETED_TEXT ) &&
336 - !$next->rev_deleted & Revision::DELETED_TEXT )
 333+ if( $this->mTitle->quickUserCan( 'edit' )
 334+ && !$rev->isDeleted( Revision::DELETED_TEXT )
 335+ && !$next->rev_deleted & Revision::DELETED_TEXT )
337336 {
338337 # Create undo tooltip for the first (=latest) line only
339338 $undoTooltip = $latest

Follow-up revisions

RevisionCommit summaryAuthorDate
r51013Follow-up on r51009. Remove unused 'deletedrev'siebrand13:06, 26 May 2009

Status & tagging log