aboutsummaryrefslogtreecommitdiff
path: root/mod/sitepages/actions
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-04-12 22:23:05 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-04-12 22:23:05 +0000
commitaf113e044fe8225a40ddd128f9226b973b0b6437 (patch)
tree4456d4ee056a3564eb01837ab2f091b57ec540e2 /mod/sitepages/actions
parent088d0638957cd6bc683711743d04091b6789cfd1 (diff)
downloadelgg-af113e044fe8225a40ddd128f9226b973b0b6437.tar.gz
elgg-af113e044fe8225a40ddd128f9226b973b0b6437.tar.bz2
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
Diffstat (limited to 'mod/sitepages/actions')
-rw-r--r--mod/sitepages/actions/addfront.php6
1 files changed, 6 insertions, 0 deletions
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();