item(); if ($item && $item->is_photo()) { $exif_count = Database::instance() ->count_records("exif_keys", array("item_id" => $item->id)); if (!empty($exif_count)) { $view = new View("exif_sidebar.html"); $csrf = access::csrf_token(); $view->url = url::site("exif/show/{$item->id}?csrf=$csrf"); return $view; } } return null; } }