More geotag ajax action changes to properly accept POST only
authorMichael J. Rubinsky <mrubinsk@horde.org>
Mon, 9 Nov 2009 18:56:02 +0000 (13:56 -0500)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Mon, 9 Nov 2009 18:56:02 +0000 (13:56 -0500)
ansel/lib/Widget/Geotag.php

index 786604d..3254e7c 100644 (file)
@@ -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) {