diff options
author | nickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-05-11 21:37:12 +0000 |
---|---|---|
committer | nickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-05-11 21:37:12 +0000 |
commit | 25c192e75d52f5bd7db4da22bb9213421fa36b4c (patch) | |
tree | e2ef3042e4b048714a08d273700a426ac6020b1a /engine/lib/elgglib.php | |
parent | e210f797ff2dda5785e64380234f1ee876bc5c12 (diff) | |
download | elgg-25c192e75d52f5bd7db4da22bb9213421fa36b4c.tar.gz elgg-25c192e75d52f5bd7db4da22bb9213421fa36b4c.tar.bz2 |
Do not display site pages when in Walled Garden mode, excepting system-defined whitelist.
git-svn-id: http://code.elgg.org/elgg/trunk@6004 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/elgglib.php')
-rw-r--r-- | engine/lib/elgglib.php | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php index 9ee85c559..4e141bb84 100644 --- a/engine/lib/elgglib.php +++ b/engine/lib/elgglib.php @@ -3107,16 +3107,28 @@ function __elgg_shutdown_hook() { function elgg_init() { // Page handler for JS register_page_handler('js','js_page_handler'); - + // Register an event triggered at system shutdown register_shutdown_function('__elgg_shutdown_hook'); } +function elgg_walled_garden_index() { + global $CONFIG; + + $login = elgg_view('account/forms/login'); + $layout = elgg_view_layout('one_column', $login); + + echo page_draw('', $layout); + return TRUE; +} + /** * Boot Elgg * @return unknown_type */ function elgg_boot() { + global $CONFIG; + // Actions register_action('comments/add'); register_action('comments/delete'); @@ -3126,6 +3138,11 @@ function elgg_boot() { elgg_view_register_simplecache('css'); elgg_view_register_simplecache('js/friendsPickerv1'); elgg_view_register_simplecache('js/initialise_elgg'); + + // check for external page view + if (isset($CONFIG->site) && $CONFIG->site instanceof ElggSite) { + $CONFIG->site->check_walled_garden(); + } } /** |