summaryrefslogtreecommitdiff
path: root/app/Controller/App.php
blob: b7f79b1d0e02ea564b53c6ad06b40942c6006117 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php

namespace Controller;

use Model\Project as ProjectModel;

/**
 * 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(ProjectModel::ACTIVE)) {
            $this->response->redirect('?controller=board');
        }
        else {
            $this->redirectNoProject();
        }
    }
}