X-Git-Url: https://dev.renevier.net/?p=syj.git;a=blobdiff_plain;f=application%2Fcontrollers%2FGeomController.php;h=70acf763e073aa8984d42561c83f0093175eb061;hp=38d5ce7361240ba9c9f395a76c788d67dcc8ecfc;hb=a64d41557a62ec6051d7fa08d1ba941e089aa5c2;hpb=3c4eae3c94fd2369087cd3cc73e195cbc48fc433 diff --git a/application/controllers/GeomController.php b/application/controllers/GeomController.php index 38d5ce7..70acf76 100644 --- a/application/controllers/GeomController.php +++ b/application/controllers/GeomController.php @@ -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)); } }