summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-03-11 03:14:52 +0000
committerTim Almdal <tnalmdal@shaw.ca>2009-03-11 03:14:52 +0000
commit8da729cfa1ed17040720ddeefbfd6f4ec541bc9c (patch)
treeb25ade47dc6e929e2a7020ca98870825a7f5da16 /modules
parent47756db8569400d5d23dbb1c30dd40f00c7beaf1 (diff)
Refine the task api but removing the optional parameters on the
task::create method call
Diffstat (limited to 'modules')
-rw-r--r--modules/server_add/controllers/server_add.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/modules/server_add/controllers/server_add.php b/modules/server_add/controllers/server_add.php
index 10bf28d3..430d8745 100644
--- a/modules/server_add/controllers/server_add.php
+++ b/modules/server_add/controllers/server_add.php
@@ -82,10 +82,12 @@ class Server_Add_Controller extends Controller {
}
}
- $task = task::create("server_add_task::add_from_server", t("Add from server"),
- array("item_id" => $id,
- "next" => 0,
- "paths" => $files));
+ $task_def = Task_Definition::factory()
+ ->callback("server_add_task::add_from_server")
+ ->description(t("Add photos or movies from the local server"))
+ ->name(t("Add from server"));
+ $task = task::create($task_def, array("item_id" => $id, "next" => 0, "paths" => $files));
+
batch::start();
print json_encode(array("result" => "started",
"url" => url::site("server_add/add_photo/{$task->id}?csrf=" .