RemoveOldDrafts
extends ScheduledTask
in package
Check for old drafts and remove them.
Table of Contents
Constants
- RECEIVE_NOTIFY_ALERT = 0x1
- RECEIVE_NOTIFY_EMAIL = 0x2
- Constants for notification types.
Properties
- $should_log : bool
- $_details : array<string|int, mixed>
Methods
- __construct() : mixed
- The constructor.
- execute() : bool
- This executes the task.
- getMinUserInfo() : array<string|int, mixed>
- Loads minimal info for the previously loaded user ids
- log() : void
- Records the start time and duration of this task.
- updateNextTaskTime() : void
- Updates Config::$modSettings['next_task_time'].
Constants
RECEIVE_NOTIFY_ALERT
public
mixed
RECEIVE_NOTIFY_ALERT
= 0x1
RECEIVE_NOTIFY_EMAIL
Constants for notification types.
public
mixed
RECEIVE_NOTIFY_EMAIL
= 0x2
Properties
$should_log
public
bool
$should_log
= true
Whether to log that the task completed.
$_details
protected
array<string|int, mixed>
$_details
Holds the details for the task
Methods
__construct()
The constructor.
public
__construct(array<string|int, mixed> $details) : mixed
Parameters
- $details : array<string|int, mixed>
-
The details for the task
execute()
This executes the task.
public
execute() : bool
Tags
Return values
bool —Always returns true.
getMinUserInfo()
Loads minimal info for the previously loaded user ids
public
getMinUserInfo([array<string|int, mixed> $user_ids = [] ]) : array<string|int, mixed>
Parameters
- $user_ids : array<string|int, mixed> = []
Tags
Return values
array<string|int, mixed>log()
Records the start time and duration of this task.
public
log() : void
updateNextTaskTime()
Updates Config::$modSettings['next_task_time'].
public
static updateNextTaskTime() : void