diff options
Diffstat (limited to 'modules/exif/helpers/exif_theme.php')
-rw-r--r-- | modules/exif/helpers/exif_theme.php | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/modules/exif/helpers/exif_theme.php b/modules/exif/helpers/exif_theme.php index 73ec0200..a99a6319 100644 --- a/modules/exif/helpers/exif_theme.php +++ b/modules/exif/helpers/exif_theme.php @@ -21,11 +21,18 @@ class exif_theme_Core { static function sidebar_bottom($theme) { $item = $theme->item(); if ($item && $item->is_photo()) { - $view = new View("exif_sidebar.html"); + $exif_key = ORM::factory("exif_key") + ->select("COUNT(*) AS C") + ->where("item_id", $item->id) + ->find(); + + if (!empty($exif_key->C)) { + $view = new View("exif_sidebar.html"); - $csrf = access::csrf_token(); - $view->url = url::site("exif/show/{$item->id}?csrf=$csrf"); - return $view; + $csrf = access::csrf_token(); + $view->url = url::site("exif/show/{$item->id}?csrf=$csrf"); + return $view; + } } return null; } |