Improve Board::Index() and avoid useless HTTP redirects

This commit is contained in:
Frédéric Guillot
2014-09-16 13:25:44 +02:00
parent a7f3cd87fb
commit 12a688347c
4 changed files with 64 additions and 47 deletions

View File

@@ -280,11 +280,12 @@ abstract class Base
* Common method to get a project
*
* @access protected
* @param integer $project_id Default project id
* @return array
*/
protected function getProject()
protected function getProject($project_id = 0)
{
$project_id = $this->request->getIntegerParam('project_id');
$project_id = $this->request->getIntegerParam('project_id', $project_id);
$project = $this->project->getById($project_id);
if (! $project) {