From 6dbd8aa002c8de2b63a94d24612ce8856d8fee97 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Mon, 11 May 2009 02:35:43 +0000 Subject: Don't use ORM to delete old exif_keys.. it's too inefficient --- modules/exif/helpers/exif.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/exif/helpers') diff --git a/modules/exif/helpers/exif.php b/modules/exif/helpers/exif.php index 3b61f41c..8cb9c551 100644 --- a/modules/exif/helpers/exif.php +++ b/modules/exif/helpers/exif.php @@ -26,11 +26,11 @@ class exif_Core { protected static $exif_keys; static function extract($item) { - ORM::factory("exif_key")->where("item_id", $item->id)->delete_all(); + $db = Database::instance(); + $db->delete("exif_keys", array("item_id" => $item->id)); // Only try to extract EXIF from photos if ($item->is_photo() && $item->mime_type == "image/jpeg") { - $db = Database::instance(); $data = array(); require_once(MODPATH . "exif/lib/exif.php"); $exif_raw = read_exif_data_raw($item->file_path(), false); -- cgit v1.2.3