]> dev.renevier.net Git - syj.git/blobdiff - application/controllers/GeomController.php
allow anonymous routes creation
[syj.git] / application / controllers / GeomController.php
index 38d5ce7361240ba9c9f395a76c788d67dcc8ecfc..70acf763e073aa8984d42561c83f0093175eb061 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)->setBody(json_encode($data));
     }
 }