From 225250e4519dea5e44e0d47812fa531d1826a7ba Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 13 Feb 2008 02:31:12 +0000 Subject: [PATCH] * (bug 12935) Fully-qualify archive URLs correctly in deletion message --- RELEASE-NOTES | 1 + includes/FileDeleteForm.php | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index e947ac5a38..c1b3f7517e 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -387,6 +387,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 7681, 11559) Cookie values no longer override GET and POST variables. * (bug 5262) Fully-qualified $wgStylePath no longer corrupted on XML feeds * (bug 3269) Inaccessible titles ending in '/.' or '/..' now forbidden. +* (bug 12935) Fully-qualify archive URLs correctly in deletion message == Parser changes in 1.12 == diff --git a/includes/FileDeleteForm.php b/includes/FileDeleteForm.php index 3cb358fc98..8537ca0f26 100644 --- a/includes/FileDeleteForm.php +++ b/includes/FileDeleteForm.php @@ -180,13 +180,18 @@ class FileDeleteForm { private function prepareMessage( $message ) { global $wgLang, $wgServer; if( $this->oldimage ) { + $url = $this->file->getArchiveUrl( $this->oldimage ); + if( substr( $url, 0, 1 ) == '/' ) { + // Fully-qualify the URL if necessary + $url = $wgServer . $url; + } return wfMsgExt( "{$message}-old", # To ensure grep will find them: 'filedelete-intro-old', 'filedelete-nofile-old', 'filedelete-success-old' 'parse', $this->title->getText(), $wgLang->date( $this->getTimestamp(), true ), $wgLang->time( $this->getTimestamp(), true ), - $wgServer . $this->file->getArchiveUrl( $this->oldimage ) + $url ); } else { return wfMsgExt( -- 2.20.1