1
0

Merge pull request #127 from chalbertgit/master

Fixed an introduced bug and verified the new implementation works properly
This commit is contained in:
Bharat Mediratta 2012-11-13 09:05:41 -08:00
commit ae3e9fbf71

View File

@ -71,17 +71,18 @@ class iptc_Core {
$record->key_count = count($keys);
$record->dirty = 0;
$record->save();
if (!empty($iptc['Keywords']) {
$tags = explode(';', $iptc['Keywords']);
foreach ($tags as $tag) {
try {
tag::add($item, $tag);
} catch (Exception $e) {
Kohana_Log::add("error", "Error adding tag: $tag\n"
. $e->getMessage() . "\n"
. $e->getTraceAsString();
}
}
if ( array_key_exists('Keywords', $keys) ) {
$tags = explode(';', $keys['Keywords']);
foreach ($tags as $tag) {
try {
tag::add($item, $tag);
} catch (Exception $e) {
Kohana_Log::add("error", "Error adding tag: $tag\n"
. $e->getMessage() . "\n"
. $e->getTraceAsString());
}
}
}
}