summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2005-09-22 18:55:40 +0200
committerAndreas Gohr <andi@splitbrain.org>2005-09-22 18:55:40 +0200
commit7bc7a78e70c8a426eb0f41d1fddfe9eb6b640477 (patch)
tree66014ca2d839d2c5f2e1658ed301a2c11a34c4b1
parentb034216d3aab746631aaad991cbe7165c78dd792 (diff)
downloadrpg-7bc7a78e70c8a426eb0f41d1fddfe9eb6b640477.tar.gz
rpg-7bc7a78e70c8a426eb0f41d1fddfe9eb6b640477.tar.bz2
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
-rw-r--r--lib/exe/fetch.php24
1 files changed, 12 insertions, 12 deletions
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'];