diff options
author | rub <rub@piwigo.org> | 2006-12-28 00:06:06 +0000 |
---|---|---|
committer | rub <rub@piwigo.org> | 2006-12-28 00:06:06 +0000 |
commit | 4a4f72cbc359b9aff80a60c71882f5f78aa996a1 (patch) | |
tree | b72254d662b73f291dfacfdfbcbcdfed2a98f3c9 | |
parent | cc96fca4c5fa560b10dc7d6faf85cb7160aa475e (diff) |
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.
git-svn-id: http://piwigo.org/svn/trunk@1682 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | admin.php | 6 | ||||
-rw-r--r-- | admin/include/functions.php | 36 | ||||
-rw-r--r-- | include/config_default.inc.php | 2 | ||||
-rw-r--r-- | include/picture_metadata.inc.php | 7 | ||||
-rw-r--r-- | language/en_UK.iso-8859-1/admin.lang.php | 4 | ||||
-rw-r--r-- | language/fr_FR.iso-8859-1/admin.lang.php | 4 | ||||
-rw-r--r-- | picture.php | 2 |
7 files changed, 53 insertions, 8 deletions
@@ -45,6 +45,12 @@ check_status(ACCESS_ADMINISTRATOR); sync_users(); // +-----------------------------------------------------------------------+ +// | Check configuration and add notes on problem | +// +-----------------------------------------------------------------------+ + +check_conf(); + +// +-----------------------------------------------------------------------+ // | variables init | // +-----------------------------------------------------------------------+ diff --git a/admin/include/functions.php b/admin/include/functions.php index 1aec5b1db..9855f8278 100644 --- a/admin/include/functions.php +++ b/admin/include/functions.php @@ -1888,4 +1888,40 @@ SELECT image_id associate_images_to_categories($images, $destinations); } + +/** + * Check configuration and add notes on problem + * + * @param void + * @return void + */ +function check_conf() +{ + global $conf, $header_notes; + $count = 0; + + if (($conf['show_exif']) and (!function_exists('read_exif_data'))) + { + $header_notes[] = sprintf(l10n('note_check_exif'), '$conf[\'show_exif\']'); + $count++; + } + + if (($conf['use_exif']) and (!function_exists('read_exif_data'))) + { + $header_notes[] = sprintf(l10n('note_check_exif'), '$conf[\'use_exif\']'); + $count++; + } + + if ($count != 0) + { + $header_notes[] = + sprintf + ( + l10n('note_check_more_info'), + sprintf('<a href="http://forum.phpwebgallery.net/" target="_blank"> %s</a>', l10n('note_check_more_info_forum')), + sprintf('<a href="http://phpwebgallery.net/doc/" target="_blank"> %s</a>', l10n('note_check_more_info_wiki')) + ); + } +} + ?> diff --git a/include/config_default.inc.php b/include/config_default.inc.php index 453a9a02b..f477fc267 100644 --- a/include/config_default.inc.php +++ b/include/config_default.inc.php @@ -310,7 +310,7 @@ $conf['show_exif_fields'] = array( // use_exif: Use EXIF data during database synchronization with files // metadata -$conf['use_exif'] = false; +$conf['use_exif'] = true; // use_exif_mapping: same behaviour as use_iptc_mapping $conf['use_exif_mapping'] = array( diff --git a/include/picture_metadata.inc.php b/include/picture_metadata.inc.php index a661a09e9..0cc7dc2ea 100644 --- a/include/picture_metadata.inc.php +++ b/include/picture_metadata.inc.php @@ -32,13 +32,8 @@ include_once(PHPWG_ROOT_PATH.'/include/functions_metadata.inc.php'); $template->assign_block_vars('metadata', array()); -if ($conf['show_exif']) +if (($conf['show_exif']) and (function_exists('read_exif_data'))) { - if (!function_exists('read_exif_data')) - { - die('Exif extension not available, admin should disable exif display'); - } - if ($exif = @read_exif_data($picture['current']['image_path'])) { $exif = trigger_event('format_exif_data', $exif, $picture['current'] ); diff --git a/language/en_UK.iso-8859-1/admin.lang.php b/language/en_UK.iso-8859-1/admin.lang.php index 0c664594f..158fcca78 100644 --- a/language/en_UK.iso-8859-1/admin.lang.php +++ b/language/en_UK.iso-8859-1/admin.lang.php @@ -567,6 +567,10 @@ $lang['Web Services availability duration in days'] = 'Web Services availability duration in days'; $lang['special_admin_menu'] = 'Specials'; $lang['pictures_menu'] = 'Pictures'; +$lang['note_check_exif'] = '%s must be to set to false in your config_local.inc.php file because exif are not supported.'; +$lang['note_check_more_info'] = 'Go to %s or %s for more informations.'; +$lang['note_check_more_info_forum'] = 'the forum'; +$lang['note_check_more_info_wiki'] = 'the wiki'; ?> diff --git a/language/fr_FR.iso-8859-1/admin.lang.php b/language/fr_FR.iso-8859-1/admin.lang.php index 898015d92..877597c02 100644 --- a/language/fr_FR.iso-8859-1/admin.lang.php +++ b/language/fr_FR.iso-8859-1/admin.lang.php @@ -565,5 +565,9 @@ $lang['Web Services availability duration in days'] = 'Durée d\'ouverture des Services Web en jours'; $lang['special_admin_menu'] = 'Spécials'; $lang['pictures_menu'] = 'Images'; +$lang['note_check_exif'] = '%s doit être mis à "false" dans votre fichier config_local.inc.php parce que l\'exif n\'est pas supporté.'; +$lang['note_check_more_info'] = 'Allez sur %s ou %s pour plus d\'informations.'; +$lang['note_check_more_info_forum'] = 'le forum'; +$lang['note_check_more_info_wiki'] = 'le wiki'; ?> diff --git a/picture.php b/picture.php index ab660da98..220490238 100644 --- a/picture.php +++ b/picture.php @@ -779,7 +779,7 @@ if (isset($_GET['slideshow'])) include(PHPWG_ROOT_PATH.'include/picture_rate.inc.php'); include(PHPWG_ROOT_PATH.'include/picture_comment.inc.php'); -if ($metadata_showable and isset($_GET['metadata'])) +//if ($metadata_showable and isset($_GET['metadata'])) { include(PHPWG_ROOT_PATH.'include/picture_metadata.inc.php'); } |