From 2352dd162aacb6222aff7523aef4169223fe37a0 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Fri, 16 Jan 2009 04:31:41 +0000 Subject: Break task definitions out into the _task helper and create a Task library class as a data structure to hold task definitions. --- core/helpers/core_task.php | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 core/helpers/core_task.php (limited to 'core/helpers/core_task.php') diff --git a/core/helpers/core_task.php b/core/helpers/core_task.php new file mode 100644 index 00000000..2f37557d --- /dev/null +++ b/core/helpers/core_task.php @@ -0,0 +1,33 @@ +count(); + return array(Task::factory() + ->callback("graphics::rebuild_dirty_images") + ->name(t("Rebuild Images")) + ->description($dirty_count ? + t2("You have one image which is out of date", + "You have %count out-of-date images", + $dirty_count) + : t("All your images are up to date")) + ->severity($dirty_count ? log::WARNING : log::SUCCESS)); + } +} \ No newline at end of file -- cgit v1.2.3