diff options
Diffstat (limited to 'phpBB/includes/cron/task')
-rw-r--r-- | phpBB/includes/cron/task/base.php | 2 | ||||
-rw-r--r-- | phpBB/includes/cron/task/core/prune_all_forums.php | 2 | ||||
-rw-r--r-- | phpBB/includes/cron/task/core/prune_forum.php | 2 | ||||
-rw-r--r-- | phpBB/includes/cron/task/core/queue.php | 2 | ||||
-rw-r--r-- | phpBB/includes/cron/task/core/tidy_cache.php | 2 | ||||
-rw-r--r-- | phpBB/includes/cron/task/core/tidy_database.php | 2 | ||||
-rw-r--r-- | phpBB/includes/cron/task/core/tidy_search.php | 2 | ||||
-rw-r--r-- | phpBB/includes/cron/task/core/tidy_sessions.php | 2 | ||||
-rw-r--r-- | phpBB/includes/cron/task/core/tidy_warnings.php | 2 | ||||
-rw-r--r-- | phpBB/includes/cron/task/parametrized.php | 2 | ||||
-rw-r--r-- | phpBB/includes/cron/task/provider.php | 48 | ||||
-rw-r--r-- | phpBB/includes/cron/task/task.php | 2 | ||||
-rw-r--r-- | phpBB/includes/cron/task/wrapper.php | 2 |
13 files changed, 60 insertions, 12 deletions
diff --git a/phpBB/includes/cron/task/base.php b/phpBB/includes/cron/task/base.php index 9db8e3bd44..c05fb9a87c 100644 --- a/phpBB/includes/cron/task/base.php +++ b/phpBB/includes/cron/task/base.php @@ -3,7 +3,7 @@ * * @package phpBB3 * @copyright (c) 2010 phpBB Group -* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 * */ diff --git a/phpBB/includes/cron/task/core/prune_all_forums.php b/phpBB/includes/cron/task/core/prune_all_forums.php index 39b5765229..15b93a9ca6 100644 --- a/phpBB/includes/cron/task/core/prune_all_forums.php +++ b/phpBB/includes/cron/task/core/prune_all_forums.php @@ -3,7 +3,7 @@ * * @package phpBB3 * @copyright (c) 2010 phpBB Group -* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 * */ diff --git a/phpBB/includes/cron/task/core/prune_forum.php b/phpBB/includes/cron/task/core/prune_forum.php index 55b1c58cd4..7686fd4281 100644 --- a/phpBB/includes/cron/task/core/prune_forum.php +++ b/phpBB/includes/cron/task/core/prune_forum.php @@ -3,7 +3,7 @@ * * @package phpBB3 * @copyright (c) 2010 phpBB Group -* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 * */ diff --git a/phpBB/includes/cron/task/core/queue.php b/phpBB/includes/cron/task/core/queue.php index 96cade0ce5..1c72eec7c7 100644 --- a/phpBB/includes/cron/task/core/queue.php +++ b/phpBB/includes/cron/task/core/queue.php @@ -3,7 +3,7 @@ * * @package phpBB3 * @copyright (c) 2010 phpBB Group -* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 * */ diff --git a/phpBB/includes/cron/task/core/tidy_cache.php b/phpBB/includes/cron/task/core/tidy_cache.php index 793ce746b4..c9dc0bd9ae 100644 --- a/phpBB/includes/cron/task/core/tidy_cache.php +++ b/phpBB/includes/cron/task/core/tidy_cache.php @@ -3,7 +3,7 @@ * * @package phpBB3 * @copyright (c) 2010 phpBB Group -* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 * */ diff --git a/phpBB/includes/cron/task/core/tidy_database.php b/phpBB/includes/cron/task/core/tidy_database.php index fb0e81eaba..80a1901b1e 100644 --- a/phpBB/includes/cron/task/core/tidy_database.php +++ b/phpBB/includes/cron/task/core/tidy_database.php @@ -3,7 +3,7 @@ * * @package phpBB3 * @copyright (c) 2010 phpBB Group -* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 * */ diff --git a/phpBB/includes/cron/task/core/tidy_search.php b/phpBB/includes/cron/task/core/tidy_search.php index dcc78abbb8..8a0b1b690a 100644 --- a/phpBB/includes/cron/task/core/tidy_search.php +++ b/phpBB/includes/cron/task/core/tidy_search.php @@ -3,7 +3,7 @@ * * @package phpBB3 * @copyright (c) 2010 phpBB Group -* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 * */ diff --git a/phpBB/includes/cron/task/core/tidy_sessions.php b/phpBB/includes/cron/task/core/tidy_sessions.php index 81e7e6a147..ae7bb242b8 100644 --- a/phpBB/includes/cron/task/core/tidy_sessions.php +++ b/phpBB/includes/cron/task/core/tidy_sessions.php @@ -3,7 +3,7 @@ * * @package phpBB3 * @copyright (c) 2010 phpBB Group -* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 * */ diff --git a/phpBB/includes/cron/task/core/tidy_warnings.php b/phpBB/includes/cron/task/core/tidy_warnings.php index e7d4cc9eea..e1434e7087 100644 --- a/phpBB/includes/cron/task/core/tidy_warnings.php +++ b/phpBB/includes/cron/task/core/tidy_warnings.php @@ -3,7 +3,7 @@ * * @package phpBB3 * @copyright (c) 2010 phpBB Group -* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 * */ diff --git a/phpBB/includes/cron/task/parametrized.php b/phpBB/includes/cron/task/parametrized.php index c6c45be0c0..0714b2e701 100644 --- a/phpBB/includes/cron/task/parametrized.php +++ b/phpBB/includes/cron/task/parametrized.php @@ -3,7 +3,7 @@ * * @package phpBB3 * @copyright (c) 2010 phpBB Group -* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 * */ diff --git a/phpBB/includes/cron/task/provider.php b/phpBB/includes/cron/task/provider.php new file mode 100644 index 0000000000..1482051699 --- /dev/null +++ b/phpBB/includes/cron/task/provider.php @@ -0,0 +1,48 @@ +<?php +/** +* +* @package phpBB3 +* @copyright (c) 2011 phpBB Group +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* +*/ + +/** +* @ignore +*/ +if (!defined('IN_PHPBB')) +{ + exit; +} + +/** +* Provides cron manager with tasks +* +* Finds installed cron tasks and makes them available to the cron manager. +* +* @package phpBB3 +*/ +class phpbb_cron_task_provider extends phpbb_extension_provider +{ + /** + * Finds cron task names using the extension manager. + * + * All PHP files in includes/cron/task/core/ are considered tasks. Tasks + * in extensions have to be located in a directory called cron or a subdir + * of a directory called cron. The class and filename must end in a _task + * suffix. Additionally all PHP files in includes/cron/task/core/ are + * tasks. + * + * @return array List of task names + */ + protected function find() + { + $finder = $this->extension_manager->get_finder(); + + return $finder + ->extension_suffix('_task') + ->extension_directory('/cron') + ->core_path('includes/cron/task/core/') + ->get_classes(); + } +} diff --git a/phpBB/includes/cron/task/task.php b/phpBB/includes/cron/task/task.php index cceccce44f..2f2a9e51f9 100644 --- a/phpBB/includes/cron/task/task.php +++ b/phpBB/includes/cron/task/task.php @@ -3,7 +3,7 @@ * * @package phpBB3 * @copyright (c) 2010 phpBB Group -* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 * */ diff --git a/phpBB/includes/cron/task/wrapper.php b/phpBB/includes/cron/task/wrapper.php index 238d97853c..66c45189e5 100644 --- a/phpBB/includes/cron/task/wrapper.php +++ b/phpBB/includes/cron/task/wrapper.php @@ -3,7 +3,7 @@ * * @package phpBB3 * @copyright (c) 2010 phpBB Group -* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 * */ |