Changeset 421410
- Timestamp:
- 08/10/2011 08:44:19 AM (15 years ago)
- File:
-
- 1 edited
-
imagemagick-engine/trunk/imagemagick-engine.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
imagemagick-engine/trunk/imagemagick-engine.php
r420547 r421410 6 6 Author: Orangelab 7 7 Author URI: http://www.orangelab.se 8 Version: 1.3.1-beta 18 Version: 1.3.1-beta2 9 9 Text Domain: imagemagick-engine 10 10 … … 425 425 } 426 426 427 // Escape cli executable428 function ime_im_cli_escape_cmd($cmd) {429 return '"' . $cmd . '"';430 }431 432 427 // Test if we are allowed to exec executable! 433 428 function ime_im_cli_check_executable($fullpath) { … … 435 430 return false; 436 431 437 @exec( ime_im_cli_escape_cmd($fullpath) . '--version', $output);432 @exec('"' . $fullpath . '" --version', $output); 438 433 439 434 return count($output) > 0; … … 457 452 $path = ime_try_realpath($path); 458 453 459 $cmd = escapeshellcmd($path . '/' . $executable);454 $cmd = $path . '/' . $executable; 460 455 if (ime_im_cli_check_executable($cmd)) 461 456 return $cmd; … … 503 498 if (empty($cmd)) 504 499 return false; 505 $cmd = ime_im_cli_escape_cmd($cmd);506 500 507 501 $old_file = addslashes($old_file); … … 511 505 512 506 // limits are 150mb and 128mb 513 $cmd = " $cmd\"$old_file\" -limit memory 157286400 -limit map 134217728 -resize $geometry";507 $cmd = "\"$cmd\" \"$old_file\" -limit memory 157286400 -limit map 134217728 -resize $geometry"; 514 508 if ($crop) { 515 509 // '^' is an escape character on Windows
Note: See TracChangeset
for help on using the changeset viewer.