summaryrefslogtreecommitdiff
path: root/modules/exif
diff options
context:
space:
mode:
Diffstat (limited to 'modules/exif')
-rw-r--r--modules/exif/helpers/exif.php22
-rw-r--r--modules/exif/helpers/exif_task.php10
-rw-r--r--modules/exif/helpers/exif_theme.php6
3 files changed, 19 insertions, 19 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();
diff --git a/modules/exif/helpers/exif_task.php b/modules/exif/helpers/exif_task.php
index 7c4c97c4..66f69790 100644
--- a/modules/exif/helpers/exif_task.php
+++ b/modules/exif/helpers/exif_task.php
@@ -44,11 +44,11 @@ class exif_task_Core {
$start = microtime(true);
foreach (ORM::factory("item")
->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()
->find_all() as $item) {
// The query above can take a long time, so start the timer after its done
// to give ourselves a little time to actually process rows.
diff --git a/modules/exif/helpers/exif_theme.php b/modules/exif/helpers/exif_theme.php
index bb6926d3..23dc95c2 100644
--- a/modules/exif/helpers/exif_theme.php
+++ b/modules/exif/helpers/exif_theme.php
@@ -21,11 +21,11 @@ class exif_theme_Core {
static function sidebar_bottom($theme) {
$item = $theme->item();
if ($item && $item->is_photo()) {
- $record = Database::instance()
+ $record = db::build()
->select("key_count")
->from("exif_records")
- ->where("item_id", $item->id)
- ->get()
+ ->where("item_id", "=", $item->id)
+ ->execute()
->current();
if ($record && $record->key_count) {
$view = new View("exif_sidebar.html");