summaryrefslogtreecommitdiff
path: root/modules/exif/helpers/exif_theme.php
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-02-26 21:23:35 +0000
committerTim Almdal <tnalmdal@shaw.ca>2009-02-26 21:23:35 +0000
commit960c4248deb43eb824dda14670ea1f759a709013 (patch)
tree17e6e97aea38a8caf5dabfd7e079727b880fdb2f /modules/exif/helpers/exif_theme.php
parent8d59f5b5fba5c494ea0e3276b69d687cb12b8f05 (diff)
Replace ORM->select(count(*)) with a call to Database::count_records
Diffstat (limited to 'modules/exif/helpers/exif_theme.php')
-rw-r--r--modules/exif/helpers/exif_theme.php8
1 files changed, 3 insertions, 5 deletions
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();