Allow urls without project_id
This commit is contained in:
@@ -172,6 +172,18 @@ class TaskFinder extends Base
|
||||
return $tasks;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get project id for a given task
|
||||
*
|
||||
* @access public
|
||||
* @param integer $task_id Task id
|
||||
* @return integer
|
||||
*/
|
||||
public function getProjectId($task_id)
|
||||
{
|
||||
return (int) $this->db->table(Task::TABLE)->eq('id', $task_id)->findOneColumn('project_id') ?: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch a task by the id
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user