Changeset 1682 for trunk


Ignore:
Timestamp:
Dec 28, 2006, 1:06:06 AM (17 years ago)
Author:
rub
Message:

Fix Feature Issue ID 0000585.

Convergence of exif configuration between local site and remote site.

Notes added on administration page where configuration is not OK.

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin.php

    r1672 r1682  
    4444
    4545sync_users();
     46
     47// +-----------------------------------------------------------------------+
     48// |  Check configuration and add notes on problem                         |
     49// +-----------------------------------------------------------------------+
     50
     51check_conf();
    4652
    4753// +-----------------------------------------------------------------------+
  • trunk/admin/include/functions.php

    r1624 r1682  
    18891889  associate_images_to_categories($images, $destinations);
    18901890}
     1891
     1892/**
     1893 * Check configuration and add notes on problem
     1894 *
     1895 * @param void
     1896 * @return void
     1897 */
     1898function check_conf()
     1899{
     1900  global $conf, $header_notes;
     1901  $count = 0;
     1902 
     1903  if (($conf['show_exif']) and (!function_exists('read_exif_data')))
     1904  {
     1905    $header_notes[] = sprintf(l10n('note_check_exif'), '$conf[\'show_exif\']');
     1906    $count++;
     1907  }
     1908
     1909  if (($conf['use_exif']) and (!function_exists('read_exif_data')))
     1910  {
     1911    $header_notes[] = sprintf(l10n('note_check_exif'), '$conf[\'use_exif\']');
     1912    $count++;
     1913  }
     1914
     1915  if ($count != 0)
     1916  {
     1917    $header_notes[] =
     1918      sprintf
     1919      (
     1920        l10n('note_check_more_info'),
     1921        sprintf('<a href="http://forum.phpwebgallery.net/" target="_blank"> %s</a>', l10n('note_check_more_info_forum')),
     1922        sprintf('<a href="http://phpwebgallery.net/doc/" target="_blank"> %s</a>', l10n('note_check_more_info_wiki'))
     1923      );
     1924  }
     1925}
     1926
    18911927?>
  • trunk/include/config_default.inc.php

    r1677 r1682  
    311311// use_exif: Use EXIF data during database synchronization with files
    312312// metadata
    313 $conf['use_exif'] = false;
     313$conf['use_exif'] = true;
    314314
    315315// use_exif_mapping: same behaviour as use_iptc_mapping
  • trunk/include/picture_metadata.inc.php

    r1655 r1682  
    3333include_once(PHPWG_ROOT_PATH.'/include/functions_metadata.inc.php');
    3434$template->assign_block_vars('metadata', array());
    35 if ($conf['show_exif'])
     35if (($conf['show_exif']) and (function_exists('read_exif_data')))
    3636{
    37   if (!function_exists('read_exif_data'))
    38   {
    39     die('Exif extension not available, admin should disable exif display');
    40   }
    41 
    4237  if ($exif = @read_exif_data($picture['current']['image_path']))
    4338  {
  • trunk/language/en_UK.iso-8859-1/admin.lang.php

    r1672 r1682  
    568568$lang['special_admin_menu'] = 'Specials';
    569569$lang['pictures_menu'] = 'Pictures';
     570$lang['note_check_exif'] = '%s must be to set to false in your config_local.inc.php file because exif are not supported.';
     571$lang['note_check_more_info'] = 'Go to %s or %s for more informations.';
     572$lang['note_check_more_info_forum'] = 'the forum';
     573$lang['note_check_more_info_wiki'] = 'the wiki';
    570574
    571575
  • trunk/language/fr_FR.iso-8859-1/admin.lang.php

    r1672 r1682  
    566566$lang['special_admin_menu'] = 'Spécials';
    567567$lang['pictures_menu'] = 'Images';
     568$lang['note_check_exif'] = '%s doit être mis à "false" dans votre fichier config_local.inc.php parce que l\'exif n\'est pas supporté.';
     569$lang['note_check_more_info'] = 'Allez sur %s ou %s pour plus d\'informations.';
     570$lang['note_check_more_info_forum'] = 'le forum';
     571$lang['note_check_more_info_wiki'] = 'le wiki';
    568572
    569573?>
  • trunk/picture.php

    r1677 r1682  
    780780include(PHPWG_ROOT_PATH.'include/picture_rate.inc.php');
    781781include(PHPWG_ROOT_PATH.'include/picture_comment.inc.php');
    782 if ($metadata_showable and isset($_GET['metadata']))
     782//if ($metadata_showable and isset($_GET['metadata']))
    783783{
    784784  include(PHPWG_ROOT_PATH.'include/picture_metadata.inc.php');
Note: See TracChangeset for help on using the changeset viewer.