From 960c4248deb43eb824dda14670ea1f759a709013 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Thu, 26 Feb 2009 21:23:35 +0000 Subject: Replace ORM->select(count(*)) with a call to Database::count_records --- modules/exif/helpers/exif_theme.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'modules/exif/helpers') diff --git a/modules/exif/helpers/exif_theme.php b/modules/exif/helpers/exif_theme.php index a99a6319..41eb5c76 100644 --- a/modules/exif/helpers/exif_theme.php +++ b/modules/exif/helpers/exif_theme.php @@ -21,12 +21,10 @@ class exif_theme_Core { static function sidebar_bottom($theme) { $item = $theme->item(); if ($item && $item->is_photo()) { - $exif_key = ORM::factory("exif_key") - ->select("COUNT(*) AS C") - ->where("item_id", $item->id) - ->find(); + $exif_count = Database::instance() + ->count_records("exif_keys", array("item_id" => $item->id)); - if (!empty($exif_key->C)) { + if (!empty($exif_count)) { $view = new View("exif_sidebar.html"); $csrf = access::csrf_token(); -- cgit v1.2.3