diff options
author | Nathan Kinkade <nath@nkinka.de> | 2011-04-22 16:54:55 +0000 |
---|---|---|
committer | Nathan Kinkade <nath@nkinka.de> | 2011-04-22 16:54:55 +0000 |
commit | 1f7c1f18c651c58048e92d615c71ac0fe6691c10 (patch) | |
tree | 4527c4bc08000a07c180cd1fe81792d71195d58b /modules/exif | |
parent | de6f3fce9110b777d61dec97f2a3a61d887a5ccd (diff) | |
parent | 55da59c942c0f7171b515f0718fea8506ed4b116 (diff) |
Merge branch 'master' of git://github.com/gallery/gallery3
Diffstat (limited to 'modules/exif')
-rw-r--r-- | modules/exif/helpers/exif.php | 10 | ||||
-rw-r--r-- | modules/exif/helpers/exif_event.php | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/modules/exif/helpers/exif.php b/modules/exif/helpers/exif.php index 1cdf7d34..a35a2141 100644 --- a/modules/exif/helpers/exif.php +++ b/modules/exif/helpers/exif.php @@ -36,10 +36,7 @@ class exif_Core { foreach(self::_keys() as $field => $exifvar) { if (isset($exif_raw[$exifvar[0]][$exifvar[1]])) { $value = $exif_raw[$exifvar[0]][$exifvar[1]]; - if (function_exists("mb_detect_encoding") && - mb_detect_encoding($value, "ISO-8859-1, UTF-8") != "UTF-8") { - $value = utf8_encode($value); - } + $value = encoding::convert_to_utf8($value); $keys[$field] = Input::clean($value); if ($field == "DateTime") { @@ -60,10 +57,7 @@ class exif_Core { foreach (array("Keywords" => "2#025", "Caption" => "2#120") as $keyword => $iptc_key) { if (!empty($iptc[$iptc_key])) { $value = implode(" ", $iptc[$iptc_key]); - if (function_exists("mb_detect_encoding") && - mb_detect_encoding($value, "ISO-8859-1, UTF-8") != "UTF-8") { - $value = utf8_encode($value); - } + $value = encoding::convert_to_utf8($value); $keys[$keyword] = Input::clean($value); if ($keyword == "Caption" && !$item->description) { diff --git a/modules/exif/helpers/exif_event.php b/modules/exif/helpers/exif_event.php index e594c765..72e88041 100644 --- a/modules/exif/helpers/exif_event.php +++ b/modules/exif/helpers/exif_event.php @@ -24,6 +24,12 @@ class exif_event_Core { } } + static function item_updated_data_file($item) { + if (!$item->is_album()) { + exif::extract($item); + } + } + static function item_deleted($item) { db::build() ->delete("exif_records") |