http://www.mediawiki.org/wiki/Special:Code/MediaWiki/66827

Revision: 66827
Author:   aaron
Date:     2010-05-24 14:05:24 +0000 (Mon, 24 May 2010)

Log Message:
-----------
(bug 23593) Made revision/date links enabled at history/contribs for deleted 
revs

Modified Paths:
--------------
    trunk/phase3/includes/HistoryPage.php
    trunk/phase3/includes/specials/SpecialContributions.php

Modified: trunk/phase3/includes/HistoryPage.php
===================================================================
--- trunk/phase3/includes/HistoryPage.php       2010-05-24 13:35:16 UTC (rev 
66826)
+++ trunk/phase3/includes/HistoryPage.php       2010-05-24 14:05:24 UTC (rev 
66827)
@@ -590,7 +590,7 @@
                global $wgLang;
                $date = $wgLang->timeanddate( wfTimestamp(TS_MW, 
$rev->getTimestamp()), true );
                $date = htmlspecialchars( $date );
-               if( !$rev->isDeleted( Revision::DELETED_TEXT ) ) {
+               if ( $rev->userCan( Revision::DELETED_TEXT ) ) {
                        $link = $this->getSkin()->link(
                                $this->title,
                                $date,
@@ -599,8 +599,11 @@
                                array( 'known', 'noclasses' )
                        );
                } else {
-                       $link = "<span class=\"history-deleted\">$date</span>";
+                       $link = $date;
                }
+               if ( $rev->isDeleted( Revision::DELETED_TEXT ) ) {
+                       $link = "<span class=\"history-deleted\">$link</span>";
+               }
                return $link;
        }
 

Modified: trunk/phase3/includes/specials/SpecialContributions.php
===================================================================
--- trunk/phase3/includes/specials/SpecialContributions.php     2010-05-24 
13:35:16 UTC (rev 66826)
+++ trunk/phase3/includes/specials/SpecialContributions.php     2010-05-24 
14:05:24 UTC (rev 66827)
@@ -604,16 +604,19 @@
 
                $comment = $wgContLang->getDirMark() . $sk->revComment( $rev, 
false, true );
                $date = $wgLang->timeanddate( wfTimestamp( TS_MW, 
$row->rev_timestamp ), true );
-               if( $rev->isDeleted( Revision::DELETED_TEXT ) ) {
-                       $d = '<span class="history-deleted">' . $date . 
'</span>';
-               } else {
+               if( $rev->userCan( Revision::DELETED_TEXT ) ) {
                        $d = $sk->linkKnown(
                                $page,
                                htmlspecialchars($date),
                                array(),
                                array( 'oldid' => intval( $row->rev_id ) )
                        );
+               } else {
+                       $d = $date;
                }
+               if( $rev->isDeleted( Revision::DELETED_TEXT ) ) {
+                       $d = '<span class="history-deleted">' . $d . '</span>';
+               }
 
                if( $this->target == 'newbies' ) {
                        $userlink = ' . . ' . $sk->userLink( $row->rev_user, 
$row->rev_user_text );



_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to