mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-01 20:04:51 +02:00
feature 3221 Lazy log file open, clean code
git-svn-id: http://piwigo.org/svn/trunk@31103 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -621,6 +621,8 @@ class image_ext_imagick implements imageInterface
|
||||
|
||||
function write($destination_filepath)
|
||||
{
|
||||
global $logger;
|
||||
|
||||
$this->add_command('interlace', 'line'); // progressive rendering
|
||||
// use 4:2:2 chroma subsampling (reduce file size by 20-30% with "almost" no human perception)
|
||||
//
|
||||
@@ -648,13 +650,13 @@ class image_ext_imagick implements imageInterface
|
||||
|
||||
$dest = pathinfo($destination_filepath);
|
||||
$exec .= ' "'.realpath($dest['dirname']).'/'.$dest['basename'].'" 2>&1';
|
||||
$logger->debug($exec, 'i.php');
|
||||
@exec($exec, $returnarray);
|
||||
|
||||
if (function_exists('ilog')) ilog($exec);
|
||||
if (is_array($returnarray) && (count($returnarray)>0) )
|
||||
{
|
||||
if (function_exists('ilog')) ilog('ERROR', $returnarray);
|
||||
foreach($returnarray as $line)
|
||||
$logger->error('', 'i.php', $returnarray);
|
||||
foreach ($returnarray as $line)
|
||||
trigger_error($line, E_USER_WARNING);
|
||||
}
|
||||
return is_array($returnarray);
|
||||
|
||||
Reference in New Issue
Block a user