diff options
-rw-r--r-- | core/helpers/core_task.php | 1 | ||||
-rw-r--r-- | core/helpers/task.php | 10 | ||||
-rw-r--r-- | core/libraries/Task_Definition.php | 6 | ||||
-rw-r--r-- | modules/exif/helpers/exif_task.php | 1 | ||||
-rw-r--r-- | modules/search/helpers/search_task.php | 1 |
5 files changed, 4 insertions, 15 deletions
diff --git a/core/helpers/core_task.php b/core/helpers/core_task.php index 785bf874..008c593f 100644 --- a/core/helpers/core_task.php +++ b/core/helpers/core_task.php @@ -23,7 +23,6 @@ class core_task_Core { return array(Task_Definition::factory() ->callback("core_task::rebuild_dirty_images") ->name(t("Rebuild Images")) - ->type("admin") ->description($dirty_count ? t2("You have one out of date photo", "You have %count out of date photos", diff --git a/core/helpers/task.php b/core/helpers/task.php index 9a38c0de..d9eeecfa 100644 --- a/core/helpers/task.php +++ b/core/helpers/task.php @@ -21,15 +21,13 @@ class task_Core { /** * Get all available tasks */ - static function get_definitions($type) { + static function get_definitions() { $tasks = array(); foreach (module::installed() as $module_name => $module_info) { $class_name = "{$module_name}_task"; if (method_exists($class_name, "available_tasks")) { foreach (call_user_func(array($class_name, "available_tasks")) as $task) { - if ($task->type == $type) { - $tasks[$task->callback] = $task; - } + $tasks[$task->callback] = $task; } } } @@ -37,8 +35,8 @@ class task_Core { return $tasks; } - static function create($type, $task_callback) { - $task_definitions = self::get_definitions($type); + static function create($task_callback) { + $task_definitions = self::get_definitions(); $task = ORM::factory("task"); $task->callback = $task_callback; diff --git a/core/libraries/Task_Definition.php b/core/libraries/Task_Definition.php index 3ee4a772..1394617a 100644 --- a/core/libraries/Task_Definition.php +++ b/core/libraries/Task_Definition.php @@ -23,7 +23,6 @@ class Task_Definition_Core { public $description; public $name; public $severity; - public $type; static function factory() { return new Task_Definition(); @@ -48,9 +47,4 @@ class Task_Definition_Core { $this->severity = $severity; return $this; } - - function type($type) { - $this->type = $type; - return $this; - } } diff --git a/modules/exif/helpers/exif_task.php b/modules/exif/helpers/exif_task.php index 879462a6..8e715b52 100644 --- a/modules/exif/helpers/exif_task.php +++ b/modules/exif/helpers/exif_task.php @@ -38,7 +38,6 @@ class exif_task_Core { return array(Task_Definition::factory() ->callback("exif_task::extract_exif") ->name(t("Extract EXIF data")) - ->type("admin") ->description($remaining ? t("%percent% of your photos need to be scanned for EXIF data", array("percent" => $percent)) diff --git a/modules/search/helpers/search_task.php b/modules/search/helpers/search_task.php index bc950624..7aba640e 100644 --- a/modules/search/helpers/search_task.php +++ b/modules/search/helpers/search_task.php @@ -36,7 +36,6 @@ class search_task_Core { return array(Task_Definition::factory() ->callback("search_task::update_index") ->name(t("Update Search Index")) - ->type("admin") ->description($remaining ? t("Search index is %percent% up-to-date", array("percent" => $percent)) |