From 6247a0a9eba8a7b7ea7952c9d8ec4f93c0edca89 Mon Sep 17 00:00:00 2001 From: rWatcher Date: Thu, 8 Apr 2010 06:48:33 +0800 Subject: [PATCH] Sidebar bugfix for dynamic pages. --- modules/exif_gps/controllers/exif_gps.php | 4 ++-- modules/exif_gps/helpers/exif_gps_block.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/exif_gps/controllers/exif_gps.php b/modules/exif_gps/controllers/exif_gps.php index abe4d358..4a14c200 100644 --- a/modules/exif_gps/controllers/exif_gps.php +++ b/modules/exif_gps/controllers/exif_gps.php @@ -19,7 +19,7 @@ */ class EXIF_GPS_Controller extends Controller { public function map($map_type, $type_id) { - // Map all items in the specified album. + // Map all items in the specified album or user. $map_title = ""; if ($map_type == "album") { @@ -48,7 +48,7 @@ class EXIF_GPS_Controller extends Controller { } // Make a new page. - $template = new Theme_View("page.html", "other", "TagsMap"); + $template = new Theme_View("page.html", "other", "EXIFMap"); $template->page_title = t("Gallery :: Map"); $template->content = new View("exif_gps_map.html"); if ($map_title == "") { diff --git a/modules/exif_gps/helpers/exif_gps_block.php b/modules/exif_gps/helpers/exif_gps_block.php index 9498adcb..78d29609 100644 --- a/modules/exif_gps/helpers/exif_gps_block.php +++ b/modules/exif_gps/helpers/exif_gps_block.php @@ -124,7 +124,7 @@ class exif_gps_block_Core { } $block->content->latitude = $latitude; $block->content->longitude = $longitude; - } elseif ($theme->item->is_album() && (module::get_var("exif_gps", "sidebar_mapformat") == 1)) { + } elseif (($theme->item()) && ($theme->item->is_album() && (module::get_var("exif_gps", "sidebar_mapformat") == 1))) { // If coordinates were NOT found, and this is an album with a dynamic map, then map the contents of the album. $items = ORM::factory("item", $theme->item->id) ->join("exif_coordinates", "items.id", "exif_coordinates.item_id")