From f69ec5c8e8baa35c94b7553d607e1338c8d2f0c6 Mon Sep 17 00:00:00 2001 From: Bart van Bragt Date: Sun, 24 Mar 2002 20:03:20 +0000 Subject: [PATCH] Some extra comments and removed a redundant if git-svn-id: file:///svn/phpbb/trunk@2424 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/usercp_register.php | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/phpBB/includes/usercp_register.php b/phpBB/includes/usercp_register.php index 92be87f63c..312767006e 100644 --- a/phpBB/includes/usercp_register.php +++ b/phpBB/includes/usercp_register.php @@ -63,20 +63,24 @@ $page_title = ( $mode == 'editprofile' ) ? $lang['Edit_profile'] : $lang['Regist if ( $mode == 'register' && !isset($HTTP_POST_VARS['agreed']) && !isset($HTTP_GET_VARS['agreed']) ) { - if ( !isset($HTTP_POST_VARS['agreed']) && !isset($HTTP_GET_VARS['agreed']) ) - { - include($phpbb_root_path . 'includes/page_header.'.$phpEx); + include($phpbb_root_path . 'includes/page_header.'.$phpEx); - show_coppa($coppa); + show_coppa($coppa); - include($phpbb_root_path . 'includes/page_tail.'.$phpEx); - - } + include($phpbb_root_path . 'includes/page_tail.'.$phpEx); } $coppa = ( ( !$HTTP_POST_VARS['coppa'] && !$HTTP_GET_VARS['coppa'] ) || $mode == 'register' ) ? 0 : TRUE; -if ( isset($HTTP_POST_VARS['submit']) || isset($HTTP_POST_VARS['avatargallery']) || isset($HTTP_POST_VARS['submitavatar']) || isset($HTTP_POST_VARS['cancelavatar']) || $mode == 'register' ) +// +// Check and initialize some variables if needed +// +if ( + isset($HTTP_POST_VARS['submit']) || + isset($HTTP_POST_VARS['avatargallery']) || + isset($HTTP_POST_VARS['submitavatar']) || + isset($HTTP_POST_VARS['cancelavatar']) || + $mode == 'register' ) { include($phpbb_root_path . 'includes/functions_validate.'.$phpEx); include($phpbb_root_path . 'includes/bbcode.'.$phpEx); @@ -185,6 +189,9 @@ if ( isset($HTTP_POST_VARS['submit']) || isset($HTTP_POST_VARS['avatargallery']) } } +// +// Did the user submit? In this case build a query to update the users profile in the DB +// if ( isset($HTTP_POST_VARS['submit']) ) { include($phpbb_root_path . 'includes/usercp_avatar.'.$phpEx); @@ -585,7 +592,8 @@ if ( isset($HTTP_POST_VARS['submit']) ) message_die(GENERAL_MESSAGE, $message); } // if mode == register } -} +} // End of submit + if ( $error ) { @@ -911,4 +919,4 @@ $template->pparse('body'); include($phpbb_root_path . 'includes/page_tail.'.$phpEx); -?> \ No newline at end of file +?>