From: Erik Moeller Date: Tue, 28 Jun 2005 05:02:09 +0000 (+0000) Subject: bugfix: if the upload path is absolute, don't prepend the server URL X-Git-Tag: 1.5.0beta2~170 X-Git-Url: https://git.cyclocoop.org/admin/%7B%24www_url%7Dadmin/config?a=commitdiff_plain;h=e56ab3154a52842eb8e4b235aa2aa5dfa5599c99;p=lhc%2Fweb%2Fwiklou.git bugfix: if the upload path is absolute, don't prepend the server URL --- diff --git a/includes/ExternalEdit.php b/includes/ExternalEdit.php index d7c14bd43d..e3effe6b17 100644 --- a/includes/ExternalEdit.php +++ b/includes/ExternalEdit.php @@ -50,7 +50,12 @@ class ExternalEdit { } elseif($this->mMode=="file") { $type="Edit file"; $image = Image::newFromTitle( $this->mTitle ); - $url = $wgServer . $image->getURL(); + $img_url = $image->getURL(); + if(strpos($img_url,"://")) { + $url = $img_url; + } else { + $url = $wgServer . $img_url; + } $extension=substr($name, $pos); } $special=$wgLang->getNsText(NS_SPECIAL);