From 3bfa294985001c2c6ebb58fbf87b2f795e055ca5 Mon Sep 17 00:00:00 2001 From: cash Date: Thu, 11 Nov 2010 01:36:23 +0000 Subject: Fixes #2640 - elgg_view_layout now uses a parameter array like all the other elgg_view* functions git-svn-id: http://code.elgg.org/elgg/trunk@7288 36083f99-b078-4883-b0ff-0f9b5a30f544 --- pages/account/forgotten_password.php | 2 +- pages/account/register.php | 19 +++++++++---------- 2 files changed, 10 insertions(+), 11 deletions(-) (limited to 'pages/account') diff --git a/pages/account/forgotten_password.php b/pages/account/forgotten_password.php index 3fb629ef6..1906a889e 100644 --- a/pages/account/forgotten_password.php +++ b/pages/account/forgotten_password.php @@ -11,7 +11,7 @@ require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php"); if (!isloggedin()) { $area1 = elgg_view_title(elgg_echo("user:password:lost")); $area2 = elgg_view("account/forms/forgotten_password"); - $content = elgg_view_layout("one_column_with_sidebar", $area1 . $area2); + $content = elgg_view_layout("one_column_with_sidebar", array('content' => $area1 . $area2)); echo elgg_view_page(elgg_echo('user:password:lost'), $content); } else { forward(); diff --git a/pages/account/register.php b/pages/account/register.php index 2638ef561..f18061dfc 100644 --- a/pages/account/register.php +++ b/pages/account/register.php @@ -32,15 +32,14 @@ if (!$CONFIG->allow_registration) { $friend_guid = (int) get_input('friend_guid', 0); $invitecode = get_input('invitecode'); -// If we're not logged in, display the registration page -if (!isloggedin()) { - $area1 = elgg_view_title(elgg_echo("register")); - $area2 = elgg_view("account/forms/register", - array('friend_guid' => $friend_guid, 'invitecode' => $invitecode)); - - echo elgg_view_page(elgg_echo("register"), elgg_view_layout("one_column_with_sidebar", $area1 . $area2)); - - // Otherwise, forward to the index page -} else { +// only logged out people need to register +if (isloggedin()) { forward(); } + +$area1 = elgg_view_title(elgg_echo("register")); +$area2 = elgg_view("account/forms/register", + array('friend_guid' => $friend_guid, 'invitecode' => $invitecode)); + +$body = elgg_view_layout("one_column_with_sidebar", array('content' => $area1 . $area2)); +echo elgg_view_page(elgg_echo("register"), $body); -- cgit v1.2.3