aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/cron.php
diff options
context:
space:
mode:
authornickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-05-14 14:30:37 +0000
committernickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-05-14 14:30:37 +0000
commit95d7c27e5a65f6df5221842bb4427619ccec3327 (patch)
treede044918562a24c6f069f8cfc9ad24895ddb9abe /engine/lib/cron.php
parenta540eee93088628adeb3127227f401592ce4403c (diff)
downloadelgg-95d7c27e5a65f6df5221842bb4427619ccec3327.tar.gz
elgg-95d7c27e5a65f6df5221842bb4427619ccec3327.tar.bz2
Updating core code to allow public pages using new Walled Garden functionality.
git-svn-id: http://code.elgg.org/elgg/trunk@6047 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/cron.php')
-rw-r--r--engine/lib/cron.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/engine/lib/cron.php b/engine/lib/cron.php
index b4952e2ee..75897fb21 100644
--- a/engine/lib/cron.php
+++ b/engine/lib/cron.php
@@ -18,6 +18,9 @@ class CronException extends Exception {}
function cron_init() {
// Register a pagehandler for cron
register_page_handler('cron','cron_page_handler');
+
+ // register a hook for Walled Garden public pages
+ register_plugin_hook('public_pages', 'walled_garden', 'cron_public_pages');
}
/**
@@ -53,5 +56,22 @@ function cron_page_handler($page) {
}
}
+function cron_public_pages($hook, $type, $return_value, $params) {
+ global $CONFIG;
+
+ $return_value[] = "{$CONFIG->url}pg/cron/minute";
+ $return_value[] = "{$CONFIG->url}pg/cron/fiveminute";
+ $return_value[] = "{$CONFIG->url}pg/cron/fifteenmin";
+ $return_value[] = "{$CONFIG->url}pg/cron/halfhour";
+ $return_value[] = "{$CONFIG->url}pg/cron/hourly";
+ $return_value[] = "{$CONFIG->url}pg/cron/daily";
+ $return_value[] = "{$CONFIG->url}pg/cron/weekly";
+ $return_value[] = "{$CONFIG->url}pg/cron/monthly";
+ $return_value[] = "{$CONFIG->url}pg/cron/yearly";
+ $return_value[] = "{$CONFIG->url}pg/cron/reboot";
+
+ return $return_value;
+}
+
// Register a startup event
register_elgg_event_handler('init','system','cron_init'); \ No newline at end of file