Code cleanup and comments.
This commit is contained in:
parent
e497dad6ab
commit
89ba9336f5
@ -33,9 +33,12 @@ class Admin_EXIF_GPS_Controller extends Admin_Controller {
|
||||
// Prevent Cross Site Request Forgery
|
||||
access::verify_csrf();
|
||||
|
||||
// Make sure the user filled out the form properly.
|
||||
$form = $this->_get_admin_form();
|
||||
if ($form->validate()) {
|
||||
Kohana_Log::add("error",print_r($form,1));
|
||||
|
||||
// Save settings to Gallery's database.
|
||||
module::set_var("exif_gps", "googlemap_api_key", $form->google_api_key->value);
|
||||
module::set_var("exif_gps", "sidebar_zoom", $form->Sidebar->sidebar_default_zoom->value);
|
||||
module::set_var("exif_gps", "sidebar_mapformat", $form->Sidebar->sidebar_mapformat->value);
|
||||
@ -64,7 +67,7 @@ class Admin_EXIF_GPS_Controller extends Admin_Controller {
|
||||
->value(module::get_var("exif_gps", "googlemap_api_key"))
|
||||
->rules("required");
|
||||
|
||||
// Create a group for sidebar settings
|
||||
// Create a group for sidebar settings
|
||||
$gps_sidebar = $form->group("Sidebar")
|
||||
->label(t("Sidebar Settings"));
|
||||
$gps_sidebar->input("sidebar_default_zoom")
|
||||
@ -82,7 +85,7 @@ class Admin_EXIF_GPS_Controller extends Admin_Controller {
|
||||
->selected(module::get_var("exif_gps", "sidebar_maptype"));
|
||||
|
||||
// Add a save button to the form.
|
||||
$form->submit("SaveLinks")->value(t("Save"));
|
||||
$form->submit("SaveSettings")->value(t("Save"));
|
||||
|
||||
// Return the newly generated form.
|
||||
return $form;
|
||||
|
@ -19,4 +19,4 @@
|
||||
google.setOnLoadCallback(initialize);
|
||||
|
||||
</script>
|
||||
<div id="sidebar_map_canvas" style="width:205px; height:214px"></div>
|
||||
<div id="sidebar_map_canvas" style="width:205px; height:214px"></div>
|
||||
|
@ -10,7 +10,7 @@
|
||||
mapTypeId: google.maps.MapTypeId.ROADMAP
|
||||
};
|
||||
var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
|
||||
var glatlngbounds = new google.maps.LatLngBounds( );
|
||||
var glatlngbounds = new google.maps.LatLngBounds( ); // This is so we can auto center the map.
|
||||
<? $counter = 1; ?>
|
||||
<? foreach ($items as $item) { ?>
|
||||
<? $item_coordinates = ORM::factory("exif_coordinate")->where("item_id", "=", $item->id)->find(); ?>
|
||||
|
@ -1,3 +1,2 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
||||
<img src="http://maps.google.com/maps/api/staticmap?center=<?=$latitude; ?>,<?=$longitude; ?>&zoom=<?= module::get_var("exif_gps", "sidebar_zoom"); ?>&size=205x214&maptype=<?=$sidebar_map_type ?>&markers=color:red|color:red|<?=$latitude; ?>,<?=$longitude; ?>&sensor=false">
|
||||
|
||||
|
Reference in New Issue
Block a user