Changeset 9860 for extensions
- Timestamp:
- Mar 26, 2011, 1:42:34 PM (14 years ago)
- Location:
- extensions/external_ImageMagick
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/external_ImageMagick/branch/2.1/imagick.class.php
r9858 r9860 4 4 { 5 5 var $source_path = ''; 6 var $tmp_path = '';7 6 var $image_data = array(); 8 7 var $imagemagickdir = ''; … … 49 48 50 49 if (isset($conf['imagick_dir'])) 51 $this->imagemagickdir = rtrim($conf['imagick_dir'], ' /\\').(PHP_OS == 'WINNT' ? '\\' : '/'); 52 53 $this->tmp_path = @tempnam($conf['local_data_dir'], get_extension($this->source_path)); 50 $this->imagemagickdir = rtrim($conf['imagick_dir'], ' /\\').'/'; 54 51 55 52 $command = $this->imagemagickdir."identify -verbose ".realpath($this->source_path); … … 142 139 } 143 140 144 $exec .= ' '.realpath($this->tmp_path); 141 $dest = pathinfo($destination_filepath); 142 $exec .= ' '.realpath($dest['dirname']).'/'.$dest['basename']; 145 143 @exec($exec, $returnarray, $returnvalue); 146 @rename($this->tmp_path, $destination_filepath);147 @chmod($destination_filepath, 0644);148 149 144 } 150 145 -
extensions/external_ImageMagick/branch/2.1/main.inc.php
r9857 r9860 46 46 global $conf; 47 47 48 $imagick_dir = isset($conf['imagick_dir']) ? rtrim($conf['imagick_dir'], ' /\\'). (PHP_OS == 'WINNT' ? '\\' : '/'): '';48 $imagick_dir = isset($conf['imagick_dir']) ? rtrim($conf['imagick_dir'], ' /\\').'/' : ''; 49 49 @exec($imagick_dir.'convert', $returnarray, $returnvalue); 50 50 return (!$returnvalue and !empty($returnarray[0]) and preg_match('/ImageMagick/', $returnarray[0])); -
extensions/external_ImageMagick/trunk/imagick.class.php
r9859 r9860 4 4 { 5 5 var $source_path = ''; 6 var $tmp_path = '';7 6 var $image_data = array(); 8 7 var $imagemagickdir = ''; … … 49 48 50 49 if (isset($conf['imagick_dir'])) 51 $this->imagemagickdir = rtrim($conf['imagick_dir'], ' /\\').(PHP_OS == 'WINNT' ? '\\' : '/'); 52 53 $this->tmp_path = @tempnam($conf['local_data_dir'], get_extension($this->source_path)); 50 $this->imagemagickdir = rtrim($conf['imagick_dir'], ' /\\').'/'; 54 51 55 52 $command = $this->imagemagickdir."identify -verbose ".realpath($this->source_path); … … 142 139 } 143 140 144 $exec .= ' '.realpath($this->tmp_path); 141 $dest = pathinfo($destination_filepath); 142 $exec .= ' '.realpath($dest['dirname']).'/'.$dest['basename']; 145 143 @exec($exec, $returnarray, $returnvalue); 146 @rename($this->tmp_path, $destination_filepath);147 @chmod($destination_filepath, 0644);148 144 } 149 145 -
extensions/external_ImageMagick/trunk/main.inc.php
r9856 r9860 42 42 global $conf; 43 43 44 $imagick_dir = isset($conf['imagick_dir']) ? rtrim($conf['imagick_dir'], ' /\\'). (PHP_OS == 'WINNT' ? '\\' : '/'): '';44 $imagick_dir = isset($conf['imagick_dir']) ? rtrim($conf['imagick_dir'], ' /\\').'/' : ''; 45 45 @exec($imagick_dir.'convert', $returnarray, $returnvalue); 46 46 return (!$returnvalue and !empty($returnarray[0]) and preg_match('/ImageMagick/', $returnarray[0]));
Note: See TracChangeset
for help on using the changeset viewer.