From af113e044fe8225a40ddd128f9226b973b0b6437 Mon Sep 17 00:00:00 2001 From: brettp Date: Mon, 12 Apr 2010 22:23:05 +0000 Subject: Updated site pages docs. Added ability to pass arguments to custom keywords. Added user_list keyword. Reject logged out front pages that don't have [[login_box]]. git-svn-id: http://code.elgg.org/elgg/trunk@5710 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/sitepages/actions/addfront.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'mod/sitepages/actions') diff --git a/mod/sitepages/actions/addfront.php b/mod/sitepages/actions/addfront.php index fd2154cc3..f92d4614d 100644 --- a/mod/sitepages/actions/addfront.php +++ b/mod/sitepages/actions/addfront.php @@ -15,6 +15,12 @@ admin_gatekeeper(); $logged_in_content = get_input('logged_in_content', '', FALSE); $logged_out_content = get_input('logged_out_content', '', FALSE); +// do some error checking to make sure you can't lock yourself out of your front page. +if (FALSE === strpos($logged_out_content, '[[login_box')) { + register_error(elgg_echo('sitepages:error:no_login')); + forward($_SERVER['HTTP_REFERER']); +} + $css = get_input('css', '', FALSE); $loggedin_user_guid = get_loggedin_userid(); -- cgit v1.2.3