* Separated some delete & suppress message headers (bug 18839)
authorAaron Schulz <aaron@users.mediawiki.org>
Thu, 30 Jul 2009 18:01:41 +0000 (18:01 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Thu, 30 Jul 2009 18:01:41 +0000 (18:01 +0000)
* rev-deleted message cleanup with log links

includes/Article.php
languages/messages/MessagesEn.php

index 8474e59..ee738d5 100644 (file)
@@ -1150,12 +1150,10 @@ class Article {
         */
        public function showDeletedRevisionHeader() {
                global $wgOut, $wgRequest;
-
                if( !$this->mRevision->isDeleted( Revision::DELETED_TEXT ) ) {
                        // Not deleted
                        return true;
                }
-
                // If the user is not allowed to see it...
                if( !$this->mRevision->userCan(Revision::DELETED_TEXT) ) {
                        $wgOut->wrapWikiMsg( "<div class='mw-warning plainlinks'>\n$1</div>\n",
@@ -1166,13 +1164,16 @@ class Article {
                        # Give explanation and add a link to view the revision...
                        $oldid = intval( $this->getOldID() );
                        $link = $this->mTitle->getFullUrl( "oldid={$oldid}&unhide=1" );
+                       $msg = $this->mRevision->isDeleted( Revision::DELETED_RESTRICTED ) ?
+                               'rev-suppressed-text-unhide' : 'rev-deleted-text-unhide';
                        $wgOut->wrapWikiMsg( "<div class='mw-warning plainlinks'>\n$1</div>\n",
-                               array('rev-deleted-text-unhide',$link) );
+                               array($msg,$link) );
                        return false;
                // We are allowed to see...
                } else {
-                       $wgOut->wrapWikiMsg( "<div class='mw-warning plainlinks'>\n$1</div>\n",
-                               'rev-deleted-text-view' );
+                       $msg = $this->mRevision->isDeleted( Revision::DELETED_RESTRICTED ) ?
+                               'rev-suppressed-text-view' : 'rev-deleted-text-view';
+                       $wgOut->wrapWikiMsg( "<div class='mw-warning plainlinks'>\n$1</div>\n", $msg );
                        return true;
                }
        }
index a716184..5f857e4 100644 (file)
@@ -1415,16 +1415,21 @@ Try [[Special:Search|searching on the wiki]] for relevant new pages.',
 'rev-deleted-user'            => '(username removed)',
 'rev-deleted-event'           => '(log action removed)',
 'rev-deleted-text-permission' => "This page revision has been '''deleted'''.
-There may be details in the [{{fullurl:{{#Special:Log}}/suppress|page={{FULLPAGENAMEE}}}} suppression log].",
+There may be details in the [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} deletion log].",
 'rev-deleted-text-unhide'     => "This page revision has been '''deleted'''.
+There may be details in the [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} deletion log].
+As an administrator you can still [$1 view this revision] if you wish to proceed.",
+'rev-suppressed-text-unhide'     => "This page revision has been '''suppressed'''.
 There may be details in the [{{fullurl:{{#Special:Log}}/suppress|page={{FULLPAGENAMEE}}}} suppression log].
 As an administrator you can still [$1 view this revision] if you wish to proceed.",
 'rev-deleted-text-view'       => "This page revision has been '''deleted'''.
+As an administrator you can view it; there may be details in the [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} deletion log].",
+'rev-suppressed-text-view'       => "This page revision has been '''suppressed'''.
 As an administrator you can view it; there may be details in the [{{fullurl:{{#Special:Log}}/suppress|page={{FULLPAGENAMEE}}}} suppression log].",
 'rev-deleted-no-diff'         => "You cannot view this diff because one of the revisions has been '''deleted'''.
-There may be details in the [{{fullurl:{{#Special:Log}}/suppress|page={{FULLPAGENAMEE}}}} suppression log].",
+There may be details in the [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} deletion log].",
 'rev-deleted-unhide-diff'     => "One of the revisions of this diff has been '''deleted'''.
-There may be details in the [{{fullurl:{{#Special:Log}}/suppress|page={{FULLPAGENAMEE}}}} suppression log].
+There may be details in the [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} deletion log].
 As an administrator you can still [$1 view this diff] if you wish to proceed.",
 'rev-delundel'                => 'show/hide',
 'revisiondelete'              => 'Delete/undelete revisions',