Changeset 6621


Ignore:
Timestamp:
Jun 29, 2010, 2:18:40 AM (10 years ago)
Author:
plg
Message:

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:
branches/2.1/admin
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • branches/2.1/admin/include/functions_upload.inc.php

    r6616 r6621  
    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 
  • branches/2.1/admin/photos_add_direct.php

    r6618 r6621  
    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  );
  • branches/2.1/admin/themes/default/default-layout.css

    r6364 r6621  
    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
  • branches/2.1/admin/themes/default/template/photos_add_direct.tpl

    r6616 r6621  
    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.