Changeset 6622


Ignore:
Timestamp:
06/29/10 02:26:43 (10 years ago)
Author:
plg
Message:

merge r6621 from branch 2.1 to trunk

bug 1742 fixed: if the EXIF functions are not available:

1) display a warning (but not an error)
2) avoid to try to read EXIF data

Location:
trunk/admin
Files:
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/admin/include/functions_upload.inc.php

    r6617 r6622  
    142142   
    143143  // update metadata from the uploaded file (exif/iptc) 
     144  if ($conf['use_exif'] and !function_exists('read_exif_data')) 
     145  { 
     146    $conf['use_exif'] = false; 
     147  } 
    144148  update_metadata(array($image_id=>$file_path)); 
    145149   
  • trunk/admin/photos_add_direct.php

    r6620 r6622  
    444444 
    445445$setup_errors = array(); 
     446$setup_warnings = array(); 
    446447 
    447448$error_message = ready_for_upload_message(); 
     
    454455{ 
    455456  array_push($setup_errors, l10n('GD library is missing')); 
     457} 
     458 
     459if ($conf['use_exif'] and !function_exists('read_exif_data')) 
     460{ 
     461  array_push( 
     462    $setup_warnings, 
     463    l10n('Exif extension not available, admin should disable exif use') 
     464    ); 
    456465} 
    457466 
     
    459468    array( 
    460469      'setup_errors'=> $setup_errors, 
     470      'setup_warnings' => $setup_warnings, 
    461471    ) 
    462472  ); 
  • trunk/admin/themes/default/default-layout.css

    r6363 r6622  
    823823 * Informations box in administration 
    824824 */ 
    825 .infos, .errors { 
     825.infos, .errors, .warnings { 
    826826  text-align: left; 
    827827  margin: 5px; 
     
    846846} 
    847847 
    848 .infos li, .errors li { list-style-type:square; } 
     848.warnings { 
     849  color: #ee8800; 
     850  background-color:#ffdd99; 
     851  background-image: url(icon/warnings.png); 
     852} 
     853 
     854.infos li, .errors li, .warnings li { list-style-type:square; } 
    849855.infos .submit {margin-left:30px;} 
    850856 
  • trunk/admin/themes/default/template/photos_add_direct.tpl

    r6617 r6622  
    216216</div> 
    217217{else} 
     218 
     219  {if count($setup_warnings) > 0} 
     220<div class="warnings"> 
     221  <ul> 
     222    {foreach from=$setup_warnings item=warning} 
     223    <li>{$warning}</li> 
     224    {/foreach} 
     225  </ul> 
     226</div> 
     227  {/if} 
     228 
    218229 
    219230{if !empty($thumbnails)} 
Note: See TracChangeset for help on using the changeset viewer.