Add links back to the image in deletion and reversion forms
authorRob Church <robchurch@users.mediawiki.org>
Wed, 22 Aug 2007 05:35:40 +0000 (05:35 +0000)
committerRob Church <robchurch@users.mediawiki.org>
Wed, 22 Aug 2007 05:35:40 +0000 (05:35 +0000)
includes/FileDeleteForm.php
includes/FileRevertForm.php
languages/messages/MessagesEn.php
maintenance/language/messageTypes.inc
maintenance/language/messages.inc

index ad4e963..bd96e3d 100644 (file)
@@ -145,9 +145,10 @@ class FileDeleteForm {
         * Set headers, titles and other bits
         */
        private function setHeaders() {
-               global $wgOut;
+               global $wgOut, $wgUser;
                $wgOut->setPageTitle( wfMsg( 'filedelete', $this->title->getText() ) );
                $wgOut->setRobotPolicy( 'noindex,nofollow' );
+               $wgOut->setSubtitle( wfMsg( 'filedelete-backlink', $wgUser->getSkin()->makeKnownLinkObj( $this->title ) ) );
        }
        
        /**
index 1adde88..55f21ff 100644 (file)
@@ -109,9 +109,10 @@ class FileRevertForm {
         * Set headers, titles and other bits
         */
        private function setHeaders() {
-               global $wgOut;
+               global $wgOut, $wgUser;
                $wgOut->setPageTitle( wfMsg( 'filerevert', $this->title->getText() ) );
                $wgOut->setRobotPolicy( 'noindex,nofollow' );
+               $wgOut->setSubtitle( wfMsg( 'filerevert-backlink', $wgUser->getSkin()->makeKnownLinkObj( $this->title ) ) );
        }
        
        /**
index b30a350..2c06876 100644 (file)
@@ -1494,6 +1494,7 @@ If you have this image in full resolution upload this one, otherwise change the
 
 # File reversion
 'filerevert'                => 'Revert $1',
+'filerevert-backlink' => '&larr; $1',
 'filerevert-legend'         => 'Revert file',
 'filerevert-intro'          => "<span class=\"plainlinks\">You are reverting '''[[Media:$1|$1]]''' to the [$4 version as of $3, $2].</span>",
 'filerevert-comment'        => 'Comment:',
@@ -1504,6 +1505,7 @@ If you have this image in full resolution upload this one, otherwise change the
 
 # File deletion
 'filedelete' => 'Delete $1',
+'filedelete-backlink' => '&larr; $1',
 'filedelete-legend' => 'Delete file',
 'filedelete-intro' => "You are deleting '''[[Media:$1|$1]]'''.",
 'filedelete-intro-old' => "<span class=\"plainlinks\">You are deleting the version of '''[[Media:$1|$1]]''' as of [$4 $3, $2].</span>",
index 0c168e8..8fc44d9 100644 (file)
@@ -199,6 +199,8 @@ $wgOptionalMessages = array(
        'seconds-abbrev',
        'minutes-abbrev',
        'hours-abbrev',
+       'filerevert-backlink',
+       'filedelete-backlink',
 );
 
 /** EXIF messages, which may be set as optional in several checks, but are generally mandatory */
index 9475513..2b5a5ce 100644 (file)
@@ -890,6 +890,7 @@ $wgMessageStructure = array(
        ),
        'filerevert' => array(
                'filerevert',
+               'filerevert-backlink',
                'filerevert-legend',
                'filerevert-intro',
                'filerevert-comment',
@@ -900,6 +901,7 @@ $wgMessageStructure = array(
        ),
        'filedelete' => array(
                'filedelete',
+               'filedelete-backlink',
                'filedelete-legend',
                'filedelete-intro',
                'filedelete-intro-old',