diff options
Diffstat (limited to 'app/Controllers/errorController.php')
| -rw-r--r-- | app/Controllers/errorController.php | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/app/Controllers/errorController.php b/app/Controllers/errorController.php index bb3431c2b..76ab930e0 100644 --- a/app/Controllers/errorController.php +++ b/app/Controllers/errorController.php @@ -1,8 +1,21 @@ <?php +/** + * Controller to handle error page. + */ class FreshRSS_error_Controller extends Minz_ActionController { + /** + * This action is the default one for the controller. + * + * It is called by Minz_Error::error() method. + * + * Parameters are: + * - code (default: 404) + * - logs (default: array()) + */ public function indexAction() { - switch (Minz_Request::param('code')) { + $code_int = Minz_Request::param('code', 404); + switch ($code_int) { case 403: $this->view->code = 'Error 403 - Forbidden'; break; @@ -22,7 +35,7 @@ class FreshRSS_error_Controller extends Minz_ActionController { $errors = Minz_Request::param('logs', array()); $this->view->errorMessage = trim(implode($errors)); if ($this->view->errorMessage == '') { - switch(Minz_Request::param('code')) { + switch($code_int) { case 403: $this->view->errorMessage = _t('forbidden_access'); break; |
