Ignore:
Timestamp:
Apr 24, 2015, 7:06:47 PM (9 years ago)
Author:
mistic100
Message:

feature 3221 Lazy log file open, clean code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/include/image.class.php

    r29392 r31103  
    622622  function write($destination_filepath)
    623623  {
     624    global $logger;
     625
    624626    $this->add_command('interlace', 'line'); // progressive rendering
    625627    // use 4:2:2 chroma subsampling (reduce file size by 20-30% with "almost" no human perception)
     
    649651    $dest = pathinfo($destination_filepath);
    650652    $exec .= ' "'.realpath($dest['dirname']).'/'.$dest['basename'].'" 2>&1';
     653    $logger->debug($exec, 'i.php');
    651654    @exec($exec, $returnarray);
    652655
    653     if (function_exists('ilog')) ilog($exec);
    654656    if (is_array($returnarray) && (count($returnarray)>0) )
    655657    {
    656       if (function_exists('ilog')) ilog('ERROR', $returnarray);
    657       foreach($returnarray as $line)
     658      $logger->error('', 'i.php', $returnarray);
     659      foreach ($returnarray as $line)
    658660        trigger_error($line, E_USER_WARNING);
    659661    }
Note: See TracChangeset for help on using the changeset viewer.