(bug 31363) Expand description URLs for thumbnails to canonical form
authorRoan Kattouw <catrope@users.mediawiki.org>
Wed, 5 Oct 2011 10:16:49 +0000 (10:16 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Wed, 5 Oct 2011 10:16:49 +0000 (10:16 +0000)
includes/filerepo/File.php

index 30717f6..630f1f8 100644 (file)
@@ -735,7 +735,7 @@ abstract class File {
                        // Get the descriptionUrl to embed it as comment into the thumbnail. Bug 19791.
                        $descriptionUrl =  $this->getDescriptionUrl();
                        if ( $descriptionUrl ) {
-                               $params['descriptionUrl'] = $wgServer . $descriptionUrl;
+                               $params['descriptionUrl'] = wfExpandUrl( $descriptionUrl, PROTO_CANONICAL );
                        }
 
                        $script = $this->getTransformScript();