mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/14466] Add an event to cron.php
PHPBB3-14466
This commit is contained in:
parent
8a2f564f3d
commit
3479f95090
1 changed files with 12 additions and 0 deletions
|
@ -55,6 +55,18 @@ if ($cron_lock->acquire())
|
||||||
$task = $cron->find_task($cron_type);
|
$task = $cron->find_task($cron_type);
|
||||||
if ($task)
|
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())
|
if ($task->is_parametrized())
|
||||||
{
|
{
|
||||||
$task->parse_parameters($request);
|
$task->parse_parameters($request);
|
||||||
|
|
Loading…
Add table
Reference in a new issue