forked from web2project/web2project
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathqueuescanner.php
More file actions
36 lines (30 loc) · 1.18 KB
/
queuescanner.php
File metadata and controls
36 lines (30 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
// Function to scan the event queue and execute any functions required.
require_once 'base.php';
require_once W2P_BASE_DIR . '/includes/config.php';
require_once W2P_BASE_DIR . '/includes/main_functions.php';
require_once W2P_BASE_DIR . '/includes/db_adodb.php';
$defaultTZ = w2PgetConfig('system_timezone', 'Europe/London');
date_default_timezone_set($defaultTZ);
$AppUI = new CAppUI;
$AppUI->setUserLocale();
$queue = new w2p_Core_EventQueue();
$queue->scan();
/*
This is the first piece of a simple hook system to allow for regularly
scheduled maintenance tasks to occur. This could be data validation and
cleanup, sending email notifications, or workflow related tasks.
The model for this functionality was based on Drupal's methods for laying
out and interacting with hooks. It should not be considered complete at
this time.
*/
$moduleList = $AppUI->getLoadableModuleList();
foreach ($moduleList as $module) {
if (!in_array($module['mod_main_class'], get_declared_classes())) {
require_once ($AppUI->getModuleClass($module['mod_directory']));
}
$object = new $module['mod_main_class']();
if (is_callable(array($object, 'hook_cron'))) {
$object->hook_cron();
}
}