* (bug 12935) Fully-qualify archive URLs correctly in deletion message
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 13 Feb 2008 02:31:12 +0000 (02:31 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 13 Feb 2008 02:31:12 +0000 (02:31 +0000)
RELEASE-NOTES
includes/FileDeleteForm.php

index e947ac5..c1b3f75 100644 (file)
@@ -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 ==
index 3cb358f..8537ca0 100644 (file)
@@ -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(