]> dev.renevier.net Git - syj.git/blobdiff - application/controllers/GeomController.php
do not add a hidden input before checkbox inputs
[syj.git] / application / controllers / GeomController.php
index 38d5ce7361240ba9c9f395a76c788d67dcc8ecfc..5e0a0340ea887ef1ba6af94b22816446d44aa7ca 100644 (file)
@@ -24,8 +24,12 @@ class GeomController extends Zend_Controller_Action
             return;
         }
 
-        $api->setCheckIfNoneMatch(true)->setBody(json_encode(
-            array('owner' => (string)$path->owner->pseudo, 'geom' => (string)$path->geom)
-        ));
+        $data = array('geom' => (string)$path->geom,
+                  'title' => (string)$path->displayTitle);
+        if ($path->creator) {
+            $data['creator'] = (string)$path->creator->pseudo;
+        }
+
+        $api->setCheckIfNoneMatch(true)->setBodyJson($data);
     }
 }