1
0

In IPTC, extracting an item now tries to add keywords as tags.

This commit is contained in:
chalbertgit 2012-10-19 15:32:56 -04:00
parent f4ad8c3c8b
commit 82bb01ba71

View File

@ -71,6 +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();
}
}
}
}
static function get($item) {