mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-02 04:15:05 +02:00
- bug 471: apostrophe lors de l'ajout d'un tag (different behavior depending on
magic_quotes_gpc) - metadata synchronization correction: iptc keywords were MySql escaped 2 times when synchronizing from site manager, but only once when synchronizing one image git-svn-id: http://piwigo.org/svn/trunk@1717 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -2,10 +2,10 @@
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | PhpWebGallery - a PHP based picture gallery |
|
||||
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
|
||||
// | Copyright (C) 2003-2005 PhpWebGallery Team - http://phpwebgallery.net |
|
||||
// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | branch : BSF (Best So Far)
|
||||
// | file : $RCSfile$
|
||||
// | file : $Id$
|
||||
// | last update : $Date$
|
||||
// | last modifier : $Author$
|
||||
// | revision : $Revision$
|
||||
@@ -65,6 +65,11 @@ function get_sync_iptc_data($file)
|
||||
);
|
||||
}
|
||||
|
||||
foreach ($iptc as $pwg_key => $value)
|
||||
{
|
||||
$iptc[$pwg_key] = addslashes($iptc[$pwg_key]);
|
||||
}
|
||||
|
||||
return $iptc;
|
||||
}
|
||||
|
||||
@@ -83,6 +88,7 @@ function get_sync_exif_data($file)
|
||||
$exif[$pwg_key] = $matches[1].'-'.$matches[2].'-'.$matches[3];
|
||||
}
|
||||
}
|
||||
$exif[$pwg_key] = addslashes($exif[$pwg_key]);
|
||||
}
|
||||
|
||||
return $exif;
|
||||
@@ -115,14 +121,6 @@ function update_metadata($files)
|
||||
if ($conf['use_exif'])
|
||||
{
|
||||
$exif = get_sync_exif_data($file);
|
||||
|
||||
if (count($exif) > 0)
|
||||
{
|
||||
foreach (array_keys($exif) as $key)
|
||||
{
|
||||
$data[$key] = addslashes($exif[$key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($conf['use_iptc'])
|
||||
@@ -147,10 +145,6 @@ function update_metadata($files)
|
||||
);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$data[$key] = addslashes($iptc[$key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user