diff options
-rw-r--r-- | core/controllers/admin_maintenance.php | 4 | ||||
-rw-r--r-- | core/helpers/core_task.php | 6 | ||||
-rw-r--r-- | core/views/admin_maintenance.html.php | 3 |
3 files changed, 7 insertions, 6 deletions
diff --git a/core/controllers/admin_maintenance.php b/core/controllers/admin_maintenance.php index 18eb644c..077bf098 100644 --- a/core/controllers/admin_maintenance.php +++ b/core/controllers/admin_maintenance.php @@ -26,8 +26,8 @@ class Admin_Maintenance_Controller extends Admin_Controller { $tasks = array(); foreach (module::installed() as $module_name => $module_info) { $class_name = "{$module_name}_task"; - if (method_exists($class_name, "available")) { - foreach (call_user_func(array($class_name, "available")) as $task) { + if (method_exists($class_name, "available_tasks")) { + foreach (call_user_func(array($class_name, "available_tasks")) as $task) { $tasks[$task->callback] = $task; } } diff --git a/core/helpers/core_task.php b/core/helpers/core_task.php index a56c432f..6e90035a 100644 --- a/core/helpers/core_task.php +++ b/core/helpers/core_task.php @@ -18,14 +18,14 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ class core_task_Core { - static function available() { + static function available_tasks() { $dirty_count = graphics::find_dirty_images_query()->count(); return array(Task::factory() ->callback("core_task::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", + t2("You have one out-of-date photo", + "You have %count out-of-date photo", $dirty_count) : t("All your images are up to date")) ->severity($dirty_count ? log::WARNING : log::SUCCESS)); diff --git a/core/views/admin_maintenance.html.php b/core/views/admin_maintenance.html.php index fd5f7a58..b893ed0d 100644 --- a/core/views/admin_maintenance.html.php +++ b/core/views/admin_maintenance.html.php @@ -19,7 +19,7 @@ <?= t("Action") ?> </th> </tr> - <? foreach ($task_definitions as $task) ?> + <? foreach ($task_definitions as $task): ?> <tr class="<?= log::severity_class($task->severity) ?>"> <td> <?= $task->name ?> @@ -34,6 +34,7 @@ </a> </td> </tr> + <? endforeach ?> </table> </div> |