summaryrefslogtreecommitdiff
path: root/app/Model
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-05-03 11:48:18 -0400
committerFrederic Guillot <fred@kanboard.net>2015-05-03 11:48:18 -0400
commit46d711cf510b3795b02bf9a58b64fecb16f4a0b6 (patch)
tree814ec4267f14546ebebc757c846ceb9417dd9815 /app/Model
parentfa59a1487c01b27fb7128c22c472a09c34a7891b (diff)
Fix bug: task references are not unique
Diffstat (limited to 'app/Model')
-rw-r--r--app/Model/TaskFinder.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/Model/TaskFinder.php b/app/Model/TaskFinder.php
index 7216e92a..54dd578a 100644
--- a/app/Model/TaskFinder.php
+++ b/app/Model/TaskFinder.php
@@ -204,12 +204,13 @@ class TaskFinder extends Base
* Fetch a task by the reference (external id)
*
* @access public
+ * @param integer $project_id Project id
* @param string $reference Task reference
* @return array
*/
- public function getByReference($reference)
+ public function getByReference($project_id, $reference)
{
- return $this->db->table(Task::TABLE)->eq('reference', $reference)->findOne();
+ return $this->db->table(Task::TABLE)->eq('project_id', $project_id)->eq('reference', $reference)->findOne();
}
/**