summaryrefslogtreecommitdiff
path: root/modules/exif/helpers
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-05-11 02:35:43 +0000
committerBharat Mediratta <bharat@menalto.com>2009-05-11 02:35:43 +0000
commit6dbd8aa002c8de2b63a94d24612ce8856d8fee97 (patch)
treec1140f70192930840be8faeb871b21f63e5dcda6 /modules/exif/helpers
parent8c776ffa6fd4e03c15deed434f2d6feb3a416942 (diff)
Don't use ORM to delete old exif_keys.. it's too inefficient
Diffstat (limited to 'modules/exif/helpers')
-rw-r--r--modules/exif/helpers/exif.php4
1 files changed, 2 insertions, 2 deletions
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);