From 9f8b535cea4489eb24cc34a0e4ab9e2136496600 Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Mon, 9 Nov 2009 13:56:02 -0500 Subject: [PATCH] More geotag ajax action changes to properly accept POST only --- ansel/lib/Widget/Geotag.php | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/ansel/lib/Widget/Geotag.php b/ansel/lib/Widget/Geotag.php index 786604d39..3254e7cb5 100644 --- a/ansel/lib/Widget/Geotag.php +++ b/ansel/lib/Widget/Geotag.php @@ -155,14 +155,10 @@ class Ansel_Widget_Geotag extends Ansel_Widget_Base function setLocation(lat, lng) { - params = { - type: 'geotag', - img: {$image_id}, - lat: lat, - lng: lng}; + var params = { "values": "img={$image_id}/lat=" + lat + "/lng=" + lng }; url = "{$impleUrl}"; - new Ajax.Request(url, { + new Ajax.Request(url + "/action=geotag/post=values", { method: 'post', parameters: params, onComplete: function(transport) { @@ -188,12 +184,10 @@ class Ansel_Widget_Geotag extends Ansel_Widget_Base } function deleteLocation() { - params = { - type: 'untag', - img: {$image_id}}; + var params = {"values": "img={$image_id}" }; - url = "{$impleUrl}"; - new Ajax.Request(url, { + var url = "{$impleUrl}"; + new Ajax.Request(url + "/action=untag/post=values", { method: 'post', parameters: params, onComplete: function(transport) { -- 2.11.0