summaryrefslogtreecommitdiff
path: root/modules/exif
diff options
context:
space:
mode:
Diffstat (limited to 'modules/exif')
-rw-r--r--modules/exif/helpers/exif.php10
-rw-r--r--modules/exif/helpers/exif_event.php6
-rw-r--r--modules/exif/module.info4
3 files changed, 12 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")
diff --git a/modules/exif/module.info b/modules/exif/module.info
index c8ae688e..e266e20e 100644
--- a/modules/exif/module.info
+++ b/modules/exif/module.info
@@ -1,3 +1,7 @@
name = "Exif Data"
description = "Extract Exif data and display it on photo pages."
version = 1
+author_name = "Gallery Team"
+author_url = "http://codex.gallery2.org/Gallery:Team"
+info_url = "http://codex.gallery2.org/Gallery3:Modules:exif"
+discuss_url = "http://gallery.menalto.com/forum_module_exif"