diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-05-22 12:28:28 -0400 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-05-22 12:28:28 -0400 |
commit | 2230dd4e6b148346c0ec596b9e3e12996a762ed8 (patch) | |
tree | ef99ccde4f8b18592a3fb06a6ec45162c501fe38 /app/Controller/App.php | |
parent | a750b8ab2a0cb715da6fd9025a7ec8375db68a4d (diff) |
Code refactoring (add autoloader and change files organization)
Diffstat (limited to 'app/Controller/App.php')
-rw-r--r-- | app/Controller/App.php | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/app/Controller/App.php b/app/Controller/App.php new file mode 100644 index 00000000..64f9461f --- /dev/null +++ b/app/Controller/App.php @@ -0,0 +1,29 @@ +<?php + +namespace Controller; + +use Model\Project; + +/** + * Application controller + * + * @package controller + * @author Frederic Guillot + */ +class App extends Base +{ + /** + * Redirect to the project creation page or the board controller + * + * @access public + */ + public function index() + { + if ($this->project->countByStatus(Project::ACTIVE)) { + $this->response->redirect('?controller=board'); + } + else { + $this->redirectNoProject(); + } + } +} |