Changeset 5009 for branches


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

Issue 1473 : file missing in listing when icon is generated

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.0/tools/create_listing_file.php

    r5008 r5009  
    208208   
    209209    // Backup input/output format support
    210     array_push($pwg_conf['gd_supported_format'], $info['JPG Support'] or $info['JPEG 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  }
     
    708708 
    709709  $error_log ='';
     710  $icon_log = '';
    710711 
    711712  $file_base  = basename($file_full);
     
    720721  {
    721722    // Here we scan a picture : thumbnail is mandatory, high is optionnal, representative is not scanned
    722     $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);
    723724    if ($element['tn_ext'] != '')
    724725    {
     
    811812    $line .= '/>'."\n";
    812813  }
    813  
     814
     815  // Adding Icon generation log to message
     816  $error_log .= $icon_log;
     817
    814818  //~ pwg_log('<<<<< pwg_scan_file() returns '.var_export($error_log, TRUE).' <<<<<'."\n");
    815819  return $error_log;
     
    11031107      $format = ($info['GIF Create Support']) ? '<code>gif</code>' : NULL;
    11041108      array_push($format_list, $format);
    1105       $format = ($info['JPG Support'] or $info['JPEG Support']) ? '<code>jpg</code>' : NULL;
     1109      $format = (isset($info['JPG Support']) or isset($info['JPEG Support'])) ? '<code>jpg</code>' : NULL;
    11061110      array_push($format_list, $format);
    11071111      $format = ($info['PNG Support']) ? '<code>png</code>' : NULL;
Note: See TracChangeset for help on using the changeset viewer.