summaryrefslogtreecommitdiff
path: root/core/helpers/task.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/helpers/task.php')
-rw-r--r--core/helpers/task.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/helpers/task.php b/core/helpers/task.php
index d5cc7c4e..9a38c0de 100644
--- a/core/helpers/task.php
+++ b/core/helpers/task.php
@@ -27,7 +27,7 @@ class task_Core {
$class_name = "{$module_name}_task";
if (method_exists($class_name, "available_tasks")) {
foreach (call_user_func(array($class_name, "available_tasks")) as $task) {
- if (in_array($task->type, $type)) {
+ if ($task->type == $type) {
$tasks[$task->callback] = $task;
}
}
@@ -37,8 +37,8 @@ class task_Core {
return $tasks;
}
- static function create($task_callback) {
- $task_definitions = self::get_definitions(array("admin", "general", "both"));
+ static function create($type, $task_callback) {
+ $task_definitions = self::get_definitions($type);
$task = ORM::factory("task");
$task->callback = $task_callback;