From e2ecdb543fdf4ac0adf7097c979e74950c39165e Mon Sep 17 00:00:00 2001 From: cash Date: Wed, 15 Dec 2010 02:15:39 +0000 Subject: moved account forms into forms directory git-svn-id: http://code.elgg.org/elgg/trunk@7623 36083f99-b078-4883-b0ff-0f9b5a30f544 --- pages/account/register.php | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) (limited to 'pages/account/register.php') diff --git a/pages/account/register.php b/pages/account/register.php index 76319e0d6..9aa835b9c 100644 --- a/pages/account/register.php +++ b/pages/account/register.php @@ -2,7 +2,7 @@ /** * Assembles and outputs the registration page. * - * Since 1.8 registration can be disabled via administration. If this is + * Since 1.8, registration can be disabled via administration. If this is * the case, calls to this page will forward to the network front page. * * If the user is logged in, this page will forward to the network @@ -12,17 +12,6 @@ * @subpackage Registration */ -/** - * Start the Elgg engine - * - * Why? - * Tthere _might_ exist direct calls to this file, requiring the engine - * to be started. Logic for both cases follow. - * - * @todo remove as direct calls were deprecated in 1.7 - */ -require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php"); - // check new registration allowed if (elgg_get_config('allow_registration') == false) { register_error(elgg_echo('registerdisabled')); @@ -37,11 +26,23 @@ if (isloggedin()) { forward(); } -$area1 = elgg_view_title(elgg_echo("register")); -$area2 = elgg_view("account/forms/register", array( +$title = elgg_echo("register"); + +$content = elgg_view_title($title); + +// create the registration url - including switching to https if configured +$register_url = elgg_get_site_url() . 'action/register'; +if ((isset($CONFIG->https_login)) && ($CONFIG->https_login)) { + $register_url = str_replace("http:", "https:", $register_url); +} +$form_params = array('action' => $register_url); + +$body_params = array( 'friend_guid' => $friend_guid, - 'invitecode' => $invitecode) + 'invitecode' => $invitecode ); +$content .= elgg_view_form('register', $form_params, $body_params); + +$body = elgg_view_layout("one_column_with_sidebar", array('content' => $content)); -$body = elgg_view_layout("one_column_with_sidebar", array('content' => $area1 . $area2)); -echo elgg_view_page(elgg_echo("register"), $body); +echo elgg_view_page($title, $body); -- cgit v1.2.3