aboutsummaryrefslogtreecommitdiff
path: root/app/Controllers/errorController.php
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-10-06 13:12:36 +0200
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-10-06 13:12:36 +0200
commit34151ea1ae2107d4b5d96cefe8f4b2dc1ae3b70f (patch)
tree5c1395b902949ffd53e0fbd7f0b03703e6a47c8f /app/Controllers/errorController.php
parentd65a9f9bd62e93d8a2cdcb34c520f2af7e02983d (diff)
Add comments in error and importExport controllers
See https://github.com/marienfressinaud/FreshRSS/issues/655
Diffstat (limited to 'app/Controllers/errorController.php')
-rw-r--r--app/Controllers/errorController.php17
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;