Changeset 5010


Ignore:
Timestamp:
Mar 1, 2010, 12:29:34 PM (14 years ago)
Author:
laurent.duretz
Message:

Merging corrections from branch 2.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/create_listing_file.php

    r3747 r5010  
    208208   
    209209    // Backup input/output format support
    210     array_push($pwg_conf['gd_supported_format'], $info['JPG Support'] ? 'jpeg' : NULL);
     210    array_push($pwg_conf['gd_supported_format'], isset($info['JPG Support']) or isset($info['JPEG Support']) ? 'jpeg' : NULL);
    211211    array_push($pwg_conf['gd_supported_format'], $info['PNG Support'] ? 'png' : NULL);
    212212    array_push($pwg_conf['gd_supported_format'], ($info['GIF Read Support'] and $info['GIF Create Support']) ? 'gif' : NULL);
     
    509509 * @return string
    510510 */
    511 function pwg_get_thumbnail_ext($file_dir, $file_short, $file_ext, &$error_log)
     511function pwg_get_thumbnail_ext($file_dir, $file_short, $file_ext, &$error_log, &$icon_log)
    512512{
    513513  //~ pwg_log('>>>>> pwg_get_thumbnail_ext($file_dir = '.var_export($file_dir, TRUE).', $file_short = '.var_export($file_short, TRUE).') >>>>>'."\n");
     
    534534        $thumb_ext = $conf['thumbnail_format'];
    535535      }
    536       $error_log .= $log; 
     536      $icon_log .= $log; 
    537537    }
    538538  }
     
    559559  $error_log = '';
    560560 
     561  // Create thumbnail directory if not exists
     562  if (!file_exists($file_dir.'/'.$conf['thumbs']))
     563  {
     564    mkdir($file_dir.'/'.$conf['thumbs']);
     565  }
     566
    561567  // Get original properties (width, height)
    562568  if ($image_size = getimagesize($file_dir.'/'.$file_short.'.'.$file_ext))
     
    702708 
    703709  $error_log ='';
     710  $icon_log = '';
    704711 
    705712  $file_base  = basename($file_full);
     
    714721  {
    715722    // Here we scan a picture : thumbnail is mandatory, high is optionnal, representative is not scanned
    716     $element['tn_ext'] = pwg_get_thumbnail_ext($file_dir, $file_short, $file_ext, $error_log);
     723    $element['tn_ext'] = pwg_get_thumbnail_ext($file_dir, $file_short, $file_ext, $error_log, $icon_log);
    717724    if ($element['tn_ext'] != '')
    718725    {
     
    805812    $line .= '/>'."\n";
    806813  }
    807  
     814
     815  // Adding Icon generation log to message
     816  $error_log .= $icon_log;
     817
    808818  //~ pwg_log('<<<<< pwg_scan_file() returns '.var_export($error_log, TRUE).' <<<<<'."\n");
    809819  return $error_log;
     
    10971107      $format = ($info['GIF Create Support']) ? '<code>gif</code>' : NULL;
    10981108      array_push($format_list, $format);
    1099       $format = ($info['JPG Support']) ? '<code>jpg</code>' : NULL;
     1109      $format = (isset($info['JPG Support']) or isset($info['JPEG Support'])) ? '<code>jpg</code>' : NULL;
    11001110      array_push($format_list, $format);
    11011111      $format = ($info['PNG Support']) ? '<code>png</code>' : NULL;
Note: See TracChangeset for help on using the changeset viewer.