X-Git-Url: https://dev.renevier.net/?a=blobdiff_plain;f=application%2Fcontrollers%2FErrorController.php;h=f2e1b69c51a22a6c580f476f203d3337f5bdc7dd;hb=482c3abbceb9818ee12c355c5d96d15077c04736;hp=fed3945cbd7dbf89322fb1604c1278f70d0f157f;hpb=8e7d8e39a2ee5801a2f68b95cdc0e84b55da1019;p=syj.git diff --git a/application/controllers/ErrorController.php b/application/controllers/ErrorController.php index fed3945..f2e1b69 100644 --- a/application/controllers/ErrorController.php +++ b/application/controllers/ErrorController.php @@ -1,5 +1,5 @@ crit($this->view->message, $error->exception); } - if ($error_code != 404 and $error_code != 410 and $error->request->isXmlHttpRequest()) { + if ($error_code == 400 and $error->request->isXmlHttpRequest()) { return $this->_helper->json(array('message' => $error->exception->getMessage())); + } else if ($error->exception instanceof Syj_Exception_InvalidGeomUpload) { + // invalid file upload: we will redirect to main page + $this->_helper->SyjReset->resetPlaceHolders(); + $this->_request->setControllerName('idx')->setActionName('error')->setDispatched(false); + return; } // conditionally display exceptions