summaryrefslogtreecommitdiff
path: root/app/Api
diff options
context:
space:
mode:
Diffstat (limited to 'app/Api')
-rw-r--r--app/Api/File.php9
-rw-r--r--app/Api/Task.php17
2 files changed, 18 insertions, 8 deletions
diff --git a/app/Api/File.php b/app/Api/File.php
index 11c48404..5b82179c 100644
--- a/app/Api/File.php
+++ b/app/Api/File.php
@@ -36,13 +36,18 @@ class File extends Base
return '';
}
- public function createFile($project_id, $task_id, $filename, $is_image, &$blob)
+ public function createFile($project_id, $task_id, $filename, $blob)
{
- return $this->file->uploadContent($project_id, $task_id, $filename, $is_image, $blob);
+ return $this->file->uploadContent($project_id, $task_id, $filename, $blob);
}
public function removeFile($file_id)
{
return $this->file->remove($file_id);
}
+
+ public function removeAllFiles($task_id)
+ {
+ return $this->file->removeAll($task_id);
+ }
}
diff --git a/app/Api/Task.php b/app/Api/Task.php
index c98b24a6..e06c012b 100644
--- a/app/Api/Task.php
+++ b/app/Api/Task.php
@@ -17,6 +17,11 @@ class Task extends Base
return $this->taskFinder->getById($task_id);
}
+ public function getTaskByReference($project_id, $reference)
+ {
+ return $this->taskFinder->getByReference($project_id, $reference);
+ }
+
public function getAllTasks($project_id, $status_id = TaskModel::STATUS_OPEN)
{
return $this->taskFinder->getAll($project_id, $status_id);
@@ -50,7 +55,7 @@ class Task extends Base
public function createTask($title, $project_id, $color_id = '', $column_id = 0, $owner_id = 0, $creator_id = 0,
$date_due = '', $description = '', $category_id = 0, $score = 0, $swimlane_id = 0,
$recurrence_status = 0, $recurrence_trigger = 0, $recurrence_factor = 0, $recurrence_timeframe = 0,
- $recurrence_basedate = 0)
+ $recurrence_basedate = 0, $reference = '')
{
$values = array(
'title' => $title,
@@ -69,6 +74,7 @@ class Task extends Base
'recurrence_factor' => $recurrence_factor,
'recurrence_timeframe' => $recurrence_timeframe,
'recurrence_basedate' => $recurrence_basedate,
+ 'reference' => $reference,
);
list($valid,) = $this->taskValidator->validateCreation($values);
@@ -76,29 +82,28 @@ class Task extends Base
return $valid ? $this->taskCreation->create($values) : false;
}
- public function updateTask($id, $title = null, $project_id = null, $color_id = null, $column_id = null, $owner_id = null,
+ public function updateTask($id, $title = null, $project_id = null, $color_id = null, $owner_id = null,
$creator_id = null, $date_due = null, $description = null, $category_id = null, $score = null,
- $swimlane_id = null, $recurrence_status = null, $recurrence_trigger = null, $recurrence_factor = null,
- $recurrence_timeframe = null, $recurrence_basedate = null)
+ $recurrence_status = null, $recurrence_trigger = null, $recurrence_factor = null,
+ $recurrence_timeframe = null, $recurrence_basedate = null, $reference = null)
{
$values = array(
'id' => $id,
'title' => $title,
'project_id' => $project_id,
'color_id' => $color_id,
- 'column_id' => $column_id,
'owner_id' => $owner_id,
'creator_id' => $creator_id,
'date_due' => $date_due,
'description' => $description,
'category_id' => $category_id,
'score' => $score,
- 'swimlane_id' => $swimlane_id,
'recurrence_status' => $recurrence_status,
'recurrence_trigger' => $recurrence_trigger,
'recurrence_factor' => $recurrence_factor,
'recurrence_timeframe' => $recurrence_timeframe,
'recurrence_basedate' => $recurrence_basedate,
+ 'reference' => $reference,
);
foreach ($values as $key => $value) {