aboutsummaryrefslogtreecommitdiff
path: root/engine/handlers/cron_handler.php
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-10-01 16:16:41 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-10-01 16:16:41 +0000
commitba5dce43c9cd44ded0657f89b05d8dba29cf6a4b (patch)
treed5b584fd979fb2b02b4d366e2d6a2bf970bc4181 /engine/handlers/cron_handler.php
parent420200475b9893755adec774d04024d01a84afac (diff)
downloadelgg-ba5dce43c9cd44ded0657f89b05d8dba29cf6a4b.tar.gz
elgg-ba5dce43c9cd44ded0657f89b05d8dba29cf6a4b.tar.bz2
Improved cron support
git-svn-id: https://code.elgg.org/elgg/trunk@2160 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/handlers/cron_handler.php')
-rw-r--r--engine/handlers/cron_handler.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/engine/handlers/cron_handler.php b/engine/handlers/cron_handler.php
index dd58b5266..acc24541c 100644
--- a/engine/handlers/cron_handler.php
+++ b/engine/handlers/cron_handler.php
@@ -14,16 +14,20 @@
require_once("../start.php");
global $CONFIG;
+ // Get basic parameters
+ $period = get_input('period');
+ if (!$period) throw new CronException(sprintf(elgg_echo('CronException:unknownperiod'), $period));
+
// Get a list of parameters
$params = array();
$params['time'] = time();
- foreach ($_REQUEST[] as $k => $v)
+ foreach ($CONFIG->input as $k => $v)
$params[$k] = $v;
// Trigger hack
$std_out = ""; // Data to return to
- $std_out = trigger_plugin_hook('system', 'cron', $params, $std_out);
+ $std_out = trigger_plugin_hook('cron', $period, $params, $std_out);
// Return event
echo $std_out;