bug 2104 fixed: ability to display EXIF/IPTC metadata from HD even if the HD
is not visible for user git-svn-id: http://piwigo.org/svn/branches/2.1@8630 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
a115700ecb
commit
959dea59b1
1 changed files with 15 additions and 2 deletions
|
@ -26,6 +26,19 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// $picture['current']['high_url'] may not be set if the user has no access
|
||||||
|
// to the high definition, but we may want to display metadata and read the
|
||||||
|
// high definition is available
|
||||||
|
$high_url = null;
|
||||||
|
if (isset($picture['current']['high_url']))
|
||||||
|
{
|
||||||
|
$high_url = $picture['current']['high_url'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$high_url = get_high_url($picture['current']);
|
||||||
|
}
|
||||||
|
|
||||||
include_once(PHPWG_ROOT_PATH.'/include/functions_metadata.inc.php');
|
include_once(PHPWG_ROOT_PATH.'/include/functions_metadata.inc.php');
|
||||||
if (($conf['show_exif']) and (function_exists('read_exif_data')))
|
if (($conf['show_exif']) and (function_exists('read_exif_data')))
|
||||||
{
|
{
|
||||||
|
@ -38,7 +51,7 @@ if (($conf['show_exif']) and (function_exists('read_exif_data')))
|
||||||
$exif = get_exif_data($picture['current']['image_path'], $exif_mapping);
|
$exif = get_exif_data($picture['current']['image_path'], $exif_mapping);
|
||||||
if (count($exif) == 0 and $picture['current']['has_high'])
|
if (count($exif) == 0 and $picture['current']['has_high'])
|
||||||
{
|
{
|
||||||
$exif = get_exif_data($picture['current']['high_url'], $exif_mapping);
|
$exif = get_exif_data($high_url, $exif_mapping);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count($exif) > 0)
|
if (count($exif) > 0)
|
||||||
|
@ -85,7 +98,7 @@ if ($conf['show_iptc'])
|
||||||
$iptc = get_iptc_data($picture['current']['image_path'], $conf['show_iptc_mapping']);
|
$iptc = get_iptc_data($picture['current']['image_path'], $conf['show_iptc_mapping']);
|
||||||
if (count($iptc) == 0 and $picture['current']['has_high'])
|
if (count($iptc) == 0 and $picture['current']['has_high'])
|
||||||
{
|
{
|
||||||
$iptc = get_iptc_data($picture['current']['high_url'], $conf['show_iptc_mapping']);
|
$iptc = get_iptc_data($high_url, $conf['show_iptc_mapping']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count($iptc) > 0)
|
if (count($iptc) > 0)
|
||||||
|
|
Loading…
Add table
Reference in a new issue