]> dev.renevier.net Git - syj.git/blobdiff - application/controllers/ErrorController.php
routes profile
[syj.git] / application / controllers / ErrorController.php
index 486c24a948aef9138291d49a3ba910f2f5e2bc39..0a6c46868f402bef9e45771c31a9781b4942dbc2 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-/*  This file is part of Syj, Copyright (c) 2010 Arnaud Renevier,
+/*  This file is part of Syj, Copyright (c) 2010-2011 Arnaud Renevier,
     and is published under the AGPL license. */
 
 class ErrorController extends Zend_Controller_Action
@@ -10,8 +10,7 @@ class ErrorController extends Zend_Controller_Action
 
     public function init() {
         $this->_helper->SyjReset->resetPlaceHolders();
-        $this->view->headLink()->appendStylesheet('css/generic.css', 'all');
-        $this->view->headLink()->appendStylesheet('css/error.css', 'all');
+        $this->_helper->SyjMedias->addStyleSheets('error');
     }
 
     public function errorAction() {
@@ -29,6 +28,8 @@ class ErrorController extends Zend_Controller_Action
                     $error_code = 400; // Bad Request
                 } else if ($error->exception instanceof Syj_Exception_Forbidden) {
                     $error_code = 403; // Forbidden
+                } else if ($error->exception instanceof Syj_Exception_NotImplemented) {
+                    $error_code = 501; // Not Implemented
                 } else if ($error->exception instanceof Syj_Exception_NotFound) {
                     $error_code = $error->exception->getCode();
                 }