From 7bc7a78e70c8a426eb0f41d1fddfe9eb6b640477 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Thu, 22 Sep 2005 18:55:40 +0200 Subject: fixed bug in fetch.php on windows systems fetch.php used is_executable() to check for the ImageMagick convert tool. The function is not available prior PHP 5 for Windows systems. fetch now only checks if the config variable is set. darcs-hash:20050922165540-7ad00-f787b5be5c4e9ce4eb31399a1f3ce8dcd1654c60.gz --- lib/exe/fetch.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'lib') diff --git a/lib/exe/fetch.php b/lib/exe/fetch.php index 1f8b690fb..902d9248e 100644 --- a/lib/exe/fetch.php +++ b/lib/exe/fetch.php @@ -7,8 +7,8 @@ */ if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../').'/'); - require_once(DOKU_INC.'inc/init.php'); - require_once(DOKU_INC.'inc/common.php'); + require_once(DOKU_INC.'inc/init.php'); + require_once(DOKU_INC.'inc/common.php'); require_once(DOKU_INC.'inc/pageutils.php'); require_once(DOKU_INC.'inc/confutils.php'); require_once(DOKU_INC.'inc/auth.php'); @@ -17,21 +17,21 @@ $mimetypes = getMimeTypes(); - //get input - $MEDIA = getID('media'); - $CACHE = calc_cache($_REQUEST['cache']); - $WIDTH = $_REQUEST['w']; - $HEIGHT = $_REQUEST['h']; + //get input + $MEDIA = getID('media'); + $CACHE = calc_cache($_REQUEST['cache']); + $WIDTH = $_REQUEST['w']; + $HEIGHT = $_REQUEST['h']; list($EXT,$MIME) = mimetype($MEDIA); if($EXT === false){ $EXT = 'unknown'; $MIME = 'application/octet-stream'; } - //media to local file - if(preg_match('#^(https?|ftp)://#i',$MEDIA)){ + //media to local file + if(preg_match('#^(https?|ftp)://#i',$MEDIA)){ //handle external media - $FILE = get_from_URL($MEDIA,$EXT,$CACHE); + $FILE = get_from_URL($MEDIA,$EXT,$CACHE); if(!$FILE){ //download failed - redirect to original URL header('Location: '.$MEDIA); @@ -182,8 +182,8 @@ function get_from_URL($url,$ext,$cache){ function resize_imageIM($ext,$from,$from_w,$from_h,$to,$to_w,$to_h){ global $conf; - // check if convert is configured and available - if(!@is_executable($conf['im_convert'])) return false; + // check if convert is configured + if(!$conf['im_convert']) return false; // prepare command $cmd = $conf['im_convert']; -- cgit v1.2.3