X-Git-Url: https://dev.renevier.net/?a=blobdiff_plain;f=application%2Fcontrollers%2FGeomController.php;h=b01837c8c50c218e20cb452c59ffc6ff3bebe4dc;hb=c06c7fd6e6f26d31abb8d7c9a9f9e3f2d5b27d5c;hp=1a860b66c968e4eaeb9805037a1698ea1237f63a;hpb=0fb09adccd5c3b305d56f1b267dbd3bf836fd17f;p=syj.git diff --git a/application/controllers/GeomController.php b/application/controllers/GeomController.php index 1a860b6..b01837c 100644 --- a/application/controllers/GeomController.php +++ b/application/controllers/GeomController.php @@ -28,12 +28,14 @@ class GeomController extends Zend_Controller_Action } if (!$pathMapper->find($idx, $path)) { - if ($pathMapper->hasexisted($idx)) { - $api->setCode(410); - } else { - $api->setCode(404); + if (!$pathMapper->findByTitle($idx, $path)) { + if ($pathMapper->hasexisted($idx)) { + $api->setCode(410); + } else { + $api->setCode(404); + } + return; } - return; } switch ($ext) { @@ -82,7 +84,7 @@ class GeomController extends Zend_Controller_Action $data .= ''; $api = $this->_helper->SyjApi; - $api->setCheckIfNoneMatch(true)->setContentType('application/octet-stream')->setBody($data); + $api->setCheckIfNoneMatch(true)->setContentType('application/gpx+xml')->setBody($data); } protected function json(Syj_Model_Path $path) {