aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--admin.php6
-rw-r--r--admin/include/functions.php36
-rw-r--r--include/config_default.inc.php2
-rw-r--r--include/picture_metadata.inc.php7
-rw-r--r--language/en_UK.iso-8859-1/admin.lang.php4
-rw-r--r--language/fr_FR.iso-8859-1/admin.lang.php4
-rw-r--r--picture.php2
7 files changed, 53 insertions, 8 deletions
diff --git a/admin.php b/admin.php
index 42a0c905f..a7830ba9c 100644
--- a/admin.php
+++ b/admin.php
@@ -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');
}