From c9bd1b392d098dce1c406f7da7654d5c1b4833a7 Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Thu, 28 Oct 2010 21:41:53 +0200 Subject: [PATCH] [feature/system-cron] remove conditional includes in favour of autoloading PHPBB3-9596 --- phpBB/includes/cron/manager.php | 5 ----- phpBB/includes/cron/task/core/prune_all_forums.php | 5 ----- phpBB/includes/cron/task/core/prune_forum.php | 5 ----- phpBB/includes/cron/task/core/queue.php | 5 ----- phpBB/includes/cron/task/core/tidy_cache.php | 5 ----- phpBB/includes/cron/task/core/tidy_database.php | 5 ----- phpBB/includes/cron/task/core/tidy_search.php | 5 ----- phpBB/includes/cron/task/core/tidy_sessions.php | 5 ----- phpBB/includes/cron/task/core/tidy_warnings.php | 5 ----- phpBB/includes/cron/task_base.php | 5 ----- phpBB/includes/cron/task_wrapper.php | 6 ------ 11 files changed, 56 deletions(-) diff --git a/phpBB/includes/cron/manager.php b/phpBB/includes/cron/manager.php index 58333b0b66..170724dc2e 100644 --- a/phpBB/includes/cron/manager.php +++ b/phpBB/includes/cron/manager.php @@ -16,11 +16,6 @@ if (!defined('IN_PHPBB')) exit; } -if (!class_exists('cron_task_wrapper')) -{ - include($phpbb_root_path . 'includes/cron/cron_task_wrapper.' . $phpEx); -} - /** * Cron manager class. * diff --git a/phpBB/includes/cron/task/core/prune_all_forums.php b/phpBB/includes/cron/task/core/prune_all_forums.php index de7ea557b0..b218aac6c5 100644 --- a/phpBB/includes/cron/task/core/prune_all_forums.php +++ b/phpBB/includes/cron/task/core/prune_all_forums.php @@ -16,11 +16,6 @@ if (!defined('IN_PHPBB')) exit; } -if (!class_exists('cron_task_base')) -{ - include($phpbb_root_path . 'includes/cron/cron_task_base.' . $phpEx); -} - /** * Prune all forums cron task. * diff --git a/phpBB/includes/cron/task/core/prune_forum.php b/phpBB/includes/cron/task/core/prune_forum.php index 7728932d7e..090a90c212 100644 --- a/phpBB/includes/cron/task/core/prune_forum.php +++ b/phpBB/includes/cron/task/core/prune_forum.php @@ -16,11 +16,6 @@ if (!defined('IN_PHPBB')) exit; } -if (!class_exists('cron_task_base')) -{ - include($phpbb_root_path . 'includes/cron/cron_task_base.' . $phpEx); -} - /** * Prune one forum cron task. * diff --git a/phpBB/includes/cron/task/core/queue.php b/phpBB/includes/cron/task/core/queue.php index dffaf5aed4..d32e133973 100644 --- a/phpBB/includes/cron/task/core/queue.php +++ b/phpBB/includes/cron/task/core/queue.php @@ -16,11 +16,6 @@ if (!defined('IN_PHPBB')) exit; } -if (!class_exists('cron_task_base')) -{ - include($phpbb_root_path . 'includes/cron/cron_task_base.' . $phpEx); -} - /** * Queue cron task. Sends email and jabber messages queued by other scripts. * diff --git a/phpBB/includes/cron/task/core/tidy_cache.php b/phpBB/includes/cron/task/core/tidy_cache.php index 72843ba680..69038a8a5a 100644 --- a/phpBB/includes/cron/task/core/tidy_cache.php +++ b/phpBB/includes/cron/task/core/tidy_cache.php @@ -16,11 +16,6 @@ if (!defined('IN_PHPBB')) exit; } -if (!class_exists('cron_task_base')) -{ - include($phpbb_root_path . 'includes/cron/cron_task_base.' . $phpEx); -} - /** * Tidy cache cron task. * diff --git a/phpBB/includes/cron/task/core/tidy_database.php b/phpBB/includes/cron/task/core/tidy_database.php index 6724ec092e..3ae8c42273 100644 --- a/phpBB/includes/cron/task/core/tidy_database.php +++ b/phpBB/includes/cron/task/core/tidy_database.php @@ -16,11 +16,6 @@ if (!defined('IN_PHPBB')) exit; } -if (!class_exists('cron_task_base')) -{ - include($phpbb_root_path . 'includes/cron/cron_task_base.' . $phpEx); -} - /** * Tidy database cron task. * diff --git a/phpBB/includes/cron/task/core/tidy_search.php b/phpBB/includes/cron/task/core/tidy_search.php index e821310c9f..e21d48c13a 100644 --- a/phpBB/includes/cron/task/core/tidy_search.php +++ b/phpBB/includes/cron/task/core/tidy_search.php @@ -16,11 +16,6 @@ if (!defined('IN_PHPBB')) exit; } -if (!class_exists('cron_task_base')) -{ - include($phpbb_root_path . 'includes/cron/cron_task_base.' . $phpEx); -} - /** * Tidy search cron task. * diff --git a/phpBB/includes/cron/task/core/tidy_sessions.php b/phpBB/includes/cron/task/core/tidy_sessions.php index ecf0be3978..ea6aa70699 100644 --- a/phpBB/includes/cron/task/core/tidy_sessions.php +++ b/phpBB/includes/cron/task/core/tidy_sessions.php @@ -16,11 +16,6 @@ if (!defined('IN_PHPBB')) exit; } -if (!class_exists('cron_task_base')) -{ - include($phpbb_root_path . 'includes/cron/cron_task_base.' . $phpEx); -} - /** * Tidy sessions cron task. * diff --git a/phpBB/includes/cron/task/core/tidy_warnings.php b/phpBB/includes/cron/task/core/tidy_warnings.php index 6ef6a17fab..257c116b5e 100644 --- a/phpBB/includes/cron/task/core/tidy_warnings.php +++ b/phpBB/includes/cron/task/core/tidy_warnings.php @@ -16,11 +16,6 @@ if (!defined('IN_PHPBB')) exit; } -if (!class_exists('cron_task_base')) -{ - include($phpbb_root_path . 'includes/cron/cron_task_base.' . $phpEx); -} - /** * Tidy warnings cron task. * diff --git a/phpBB/includes/cron/task_base.php b/phpBB/includes/cron/task_base.php index 1edb4aae51..d867b3abf1 100644 --- a/phpBB/includes/cron/task_base.php +++ b/phpBB/includes/cron/task_base.php @@ -16,11 +16,6 @@ if (!defined('IN_PHPBB')) exit; } -if (!interface_exists('cron_task')) -{ - include($phpbb_root_path . 'includes/cron/cron_task.' . $phpEx); -} - /** * Cron task base class. Provides sensible defaults for cron tasks * and partially implements cron task interface, making writing cron tasks easier. diff --git a/phpBB/includes/cron/task_wrapper.php b/phpBB/includes/cron/task_wrapper.php index 17f80278a7..ecc0d1901d 100644 --- a/phpBB/includes/cron/task_wrapper.php +++ b/phpBB/includes/cron/task_wrapper.php @@ -16,12 +16,6 @@ if (!defined('IN_PHPBB')) exit; } -// We use parametrized_cron_task in is_parametrized -if (!interface_exists('cron_task')) -{ - include($phpbb_root_path . 'includes/cron/cron_task.' . $phpEx); -} - /** * Cron task wrapper class. * Enhances cron tasks with convenience methods that work identically for all tasks.