From 905cd34f437225758b735681c693117b5760af85 Mon Sep 17 00:00:00 2001 From: Rob Church Date: Wed, 22 Aug 2007 05:35:40 +0000 Subject: [PATCH] Add links back to the image in deletion and reversion forms --- includes/FileDeleteForm.php | 3 ++- includes/FileRevertForm.php | 3 ++- languages/messages/MessagesEn.php | 2 ++ maintenance/language/messageTypes.inc | 2 ++ maintenance/language/messages.inc | 2 ++ 5 files changed, 10 insertions(+), 2 deletions(-) diff --git a/includes/FileDeleteForm.php b/includes/FileDeleteForm.php index ad4e963bca..bd96e3da25 100644 --- a/includes/FileDeleteForm.php +++ b/includes/FileDeleteForm.php @@ -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 ) ) ); } /** diff --git a/includes/FileRevertForm.php b/includes/FileRevertForm.php index 1adde88e02..55f21fffbf 100644 --- a/includes/FileRevertForm.php +++ b/includes/FileRevertForm.php @@ -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 ) ) ); } /** diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index b30a350668..2c06876c8a 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -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' => '← $1', 'filerevert-legend' => 'Revert file', 'filerevert-intro' => "You are reverting '''[[Media:$1|$1]]''' to the [$4 version as of $3, $2].", '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' => '← $1', 'filedelete-legend' => 'Delete file', 'filedelete-intro' => "You are deleting '''[[Media:$1|$1]]'''.", 'filedelete-intro-old' => "You are deleting the version of '''[[Media:$1|$1]]''' as of [$4 $3, $2].", diff --git a/maintenance/language/messageTypes.inc b/maintenance/language/messageTypes.inc index 0c168e8116..8fc44d924b 100644 --- a/maintenance/language/messageTypes.inc +++ b/maintenance/language/messageTypes.inc @@ -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 */ diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index 9475513bb8..2b5a5ce649 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -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', -- 2.20.1