From: Michael J. Rubinsky Date: Mon, 9 Nov 2009 18:48:23 +0000 (-0500) Subject: savelocation ajax action is POST only X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=e9fc0e319da170ff8106d226241e7efc3290dd74;p=horde.git savelocation ajax action is POST only --- diff --git a/ansel/js/googlemap.js b/ansel/js/googlemap.js index ec3d3922c..8aeb14622 100644 --- a/ansel/js/googlemap.js +++ b/ansel/js/googlemap.js @@ -250,9 +250,7 @@ Ansel_GMap.prototype = { /** * Custom getLocations method so we can check for our own locally cached - * geodata first. We can't implement our own GGeocodeCache becuase we want - * to allow a per-user override of an individual image, not a general cache - * of lat/lng => location text. + * geodata first. */ getLocations: function(p) { if (p.image_data.image_location.length > 0) { @@ -308,14 +306,10 @@ Ansel_GMap.prototype = { // Cache the location locally? if (update) { - new Ajax.Request(this.options['updateEndpoint'], + new Ajax.Request(this.options['updateEndpoint'] + "/action=location/post=values", { method: 'post', - parameters: { - type: 'location', - location: encodeURIComponent(place.address), - img: image_data.image_id - } + parameters: { "values": "location=" + encodeURIComponent(place.address) + "/img=" + image_data.image_id } } ); } diff --git a/ansel/lib/Ajax/Imple/ImageSaveGeotag.php b/ansel/lib/Ajax/Imple/ImageSaveGeotag.php index dd86d2e62..ea85f9ca5 100644 --- a/ansel/lib/Ajax/Imple/ImageSaveGeotag.php +++ b/ansel/lib/Ajax/Imple/ImageSaveGeotag.php @@ -26,10 +26,10 @@ class Ansel_Ajax_Imple_ImageSaveGeotag extends Horde_Ajax_Imple_Base include_once dirname(__FILE__) . '/../../base.php'; $type = $args['action']; - $location = empty($post['location']) ? '' : $post['location']; + $location = empty($post['location']) ? null : $post['location']; + $lat = empty($post['lat']) ? null : $post['lat']; + $lng = empty($post['lng']) ? null : $post['lng']; $img = $post['img']; - $lat = $post['lat']; - $lng = $post['lng']; if (empty($img) || ($type == 'location' && empty($location)) ||