diff options
Diffstat (limited to 'modules/exif/helpers/exif.php')
-rw-r--r-- | modules/exif/helpers/exif.php | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/modules/exif/helpers/exif.php b/modules/exif/helpers/exif.php index 5ddd09d4..d3a8c103 100644 --- a/modules/exif/helpers/exif.php +++ b/modules/exif/helpers/exif.php @@ -39,7 +39,7 @@ class exif_Core { if (function_exists("mb_detect_encoding") && mb_detect_encoding($value) != "UTF-8") { $value = utf8_encode($value); } - $keys[$field] = utf8::clean($value); + $keys[$field] = Input::clean($value); if ($field == "DateTime") { $time = strtotime($value); @@ -62,7 +62,7 @@ class exif_Core { if (function_exists("mb_detect_encoding") && mb_detect_encoding($value) != "UTF-8") { $value = utf8_encode($value); } - $keys[$keyword] = utf8::clean($value); + $keys[$keyword] = Input::clean($value); if ($keyword == "Caption" && !$item->description) { $item->description = $value; @@ -73,8 +73,8 @@ class exif_Core { } $item->save(); - $record = ORM::factory("exif_record")->where("item_id", $item->id)->find(); - if (!$record->loaded) { + $record = ORM::factory("exif_record")->where("item_id", "=", $item->id)->find(); + if (!$record->loaded()) { $record->item_id = $item->id; } $record->data = serialize($keys); @@ -86,9 +86,9 @@ class exif_Core { static function get($item) { $exif = array(); $record = ORM::factory("exif_record") - ->where("item_id", $item->id) + ->where("item_id", "=", $item->id) ->find(); - if (!$record->loaded) { + if (!$record->loaded()) { return array(); } @@ -143,11 +143,11 @@ class exif_Core { ->select("items.id") ->from("items") ->join("exif_records", "items.id", "exif_records.item_id", "left") - ->where("type", "photo") - ->open_paren() - ->where("exif_records.item_id", null) - ->orwhere("exif_records.dirty", 1) - ->close_paren() + ->where("type", "=", "photo") + ->and_open() + ->where("exif_records.item_id", "=", null) + ->or_where("exif_records.dirty", "=", 1) + ->close() ->get() ->count(); |