X-Git-Url: https://dev.renevier.net/?a=blobdiff_plain;f=application%2Fcontrollers%2FGeomController.php;h=5e0a0340ea887ef1ba6af94b22816446d44aa7ca;hb=ecc2a5e8ea444b4a0f2384355e4fa21c6571ab2e;hp=38d5ce7361240ba9c9f395a76c788d67dcc8ecfc;hpb=190fd621df4920c56a422c03663874cddaa67d64;p=syj.git diff --git a/application/controllers/GeomController.php b/application/controllers/GeomController.php index 38d5ce7..5e0a034 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)->setBodyJson($data); } }