From: Erik Moeller Date: Thu, 7 Apr 2005 06:29:08 +0000 (+0000) Subject: 1) we need an absolute path for the image, since it needs to be retrieved X-Git-Tag: 1.5.0alpha1~373 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=f9d54adab1a3cc3832bd502854d3cd9eed7a19f0;p=lhc%2Fweb%2Fwiklou.git 1) we need an absolute path for the image, since it needs to be retrieved by the external editor helper application (NB: that fatal error was probably a PHP 4/5 thing, I'm using PHP 5 here). 2) adding some extra information for the helper, this should all be made a little more logical (only pass on as much information as needed to construct the proper URLs) --- diff --git a/includes/ExternalEdit.php b/includes/ExternalEdit.php index 7d02447b35..b52dcf0f42 100644 --- a/includes/ExternalEdit.php +++ b/includes/ExternalEdit.php @@ -31,7 +31,7 @@ class ExternalEdit { } function edit() { - global $wgUser, $wgOut, $wgScript, $wgServer; + global $wgUser, $wgOut, $wgScript, $wgScriptPath, $wgServer; $wgOut->disable(); $name=$this->mTitle->getText(); $pos=strrpos($name,".")+1; @@ -45,7 +45,7 @@ class ExternalEdit { } elseif($this->mMode=="file") { $type="Edit file"; $url = Image::newFromTitle( $this->mTitle ); - $url = $url->url; # php sucks + $url = $wgServer . $url->url; # php sucks $extension=substr($name, $pos); } @@ -54,6 +54,8 @@ class ExternalEdit { Type=$type Engine=MediaWiki Script={$wgServer}{$wgScript} +Server={$wgServer} +Path={$wgScriptPath} [File] Extension=$extension