From 85e8d1c2efd5f3746ebd50c91ba9e95a98ecb28c Mon Sep 17 00:00:00 2001 From: Etienne Baroux Date: Mon, 2 Jun 2014 16:12:47 +0200 Subject: [PATCH] [ticket/12602] Add function get_tasks. PHPBB3-12602 --- phpBB/phpbb/cron/manager.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/phpBB/phpbb/cron/manager.php b/phpBB/phpbb/cron/manager.php index 1eb8edf033..77dfcff471 100644 --- a/phpBB/phpbb/cron/manager.php +++ b/phpBB/phpbb/cron/manager.php @@ -121,6 +121,21 @@ class manager return null; } + /** + * Find all tasks and return them. + * + * @return array List of all tasks. + */ + public function get_tasks() + { + $tasks = array(); + foreach ($this->tasks as $task) + { + $tasks[] = $task; + } + return $tasks; + } + /** * Wraps a task inside an instance of \phpbb\cron\task\wrapper. *