1
0

Sidebar bugfix for dynamic pages.

This commit is contained in:
rWatcher 2010-04-08 06:48:33 +08:00 committed by Tim Almdal
parent eb1632d11f
commit 6247a0a9eb
2 changed files with 3 additions and 3 deletions

View File

@ -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 == "") {

View File

@ -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")