aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/cron.php
diff options
context:
space:
mode:
authorlavigor <lavigor@users.noreply.github.com>2016-02-07 16:50:17 +0300
committerlavigor <lavigor@users.noreply.github.com>2016-02-07 16:50:17 +0300
commit3479f950906dce340ab63b0d310ea8ba8fc02b97 (patch)
treef2fc3a1114cc986f502dc4bfb2563179be140af5 /phpBB/cron.php
parent8a2f564f3db0e857f382f0d0d9eb1c5281c14ec9 (diff)
downloadforums-3479f950906dce340ab63b0d310ea8ba8fc02b97.tar
forums-3479f950906dce340ab63b0d310ea8ba8fc02b97.tar.gz
forums-3479f950906dce340ab63b0d310ea8ba8fc02b97.tar.bz2
forums-3479f950906dce340ab63b0d310ea8ba8fc02b97.tar.xz
forums-3479f950906dce340ab63b0d310ea8ba8fc02b97.zip
[ticket/14466] Add an event to cron.php
PHPBB3-14466
Diffstat (limited to 'phpBB/cron.php')
-rw-r--r--phpBB/cron.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/phpBB/cron.php b/phpBB/cron.php
index 3f022b1db8..7ba19fd63a 100644
--- a/phpBB/cron.php
+++ b/phpBB/cron.php
@@ -55,6 +55,18 @@ if ($cron_lock->acquire())
$task = $cron->find_task($cron_type);
if ($task)
{
+ /**
+ * This event enables you to catch the task before it runs
+ *
+ * @event core.cron_run_before
+ * @var \phpbb\cron\task\task task Current Cron task
+ * @since 3.1.8-RC1
+ */
+ $vars = array(
+ 'task',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.cron_run_before', compact($vars)));
+
if ($task->is_parametrized())
{
$task->parse_parameters($request);