mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-02 04:15:05 +02:00
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
This commit is contained in:
@@ -44,6 +44,12 @@ check_status(ACCESS_ADMINISTRATOR);
|
||||
|
||||
sync_users();
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | Check configuration and add notes on problem |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
check_conf();
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | variables init |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
@@ -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'))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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'] );
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
?>
|
||||
|
||||
@@ -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';
|
||||
|
||||
?>
|
||||
|
||||
+1
-1
@@ -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');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user