Sidebar bugfix for dynamic pages.
This commit is contained in:
parent
eb1632d11f
commit
6247a0a9eb
@ -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 == "") {
|
||||
|
@ -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")
|
||||
|
Reference in New Issue
Block a user