diff --git a/phpBB/admin/admin_users.php b/phpBB/admin/admin_users.php index ee53ddd3d5..81f8aa9877 100644 --- a/phpBB/admin/admin_users.php +++ b/phpBB/admin/admin_users.php @@ -30,7 +30,7 @@ if( !empty($setmodules) ) return; } -$phpbb_root_path = "./../"; +$phpbb_root_path = './../'; require($phpbb_root_path . 'extension.inc'); require('./pagestart.' . $phpEx); require($phpbb_root_path . 'includes/bbcode.'.$phpEx); @@ -56,14 +56,14 @@ else // // Begin program // -if( $mode == 'edit' || $mode == 'save' && ( isset($HTTP_POST_VARS['username']) || isset($HTTP_GET_VARS[POST_USERS_URL]) || isset( $HTTP_POST_VARS[POST_USERS_URL]) ) ) +if ( $mode == 'edit' || $mode == 'save' && ( isset($HTTP_POST_VARS['username']) || isset($HTTP_GET_VARS[POST_USERS_URL]) || isset( $HTTP_POST_VARS[POST_USERS_URL]) ) ) { // // Ok, the profile has been modified and submitted, let's update // - if( ( $mode == 'save' && isset( $HTTP_POST_VARS['submit'] ) ) || isset( $HTTP_POST_VARS['avatargallery'] ) || isset( $HTTP_POST_VARS['submitavatar'] ) || isset( $HTTP_POST_VARS['cancelavatar'] ) ) + if ( ( $mode == 'save' && isset( $HTTP_POST_VARS['submit'] ) ) || isset( $HTTP_POST_VARS['avatargallery'] ) || isset( $HTTP_POST_VARS['submitavatar'] ) || isset( $HTTP_POST_VARS['cancelavatar'] ) ) { - $user_id = intval( $HTTP_POST_VARS['id'] ); + $user_id = intval($HTTP_POST_VARS['id']); if (!($this_userdata = get_userdata($user_id))) { @@ -304,24 +304,28 @@ if( $mode == 'edit' || $mode == 'save' && ( isset($HTTP_POST_VARS['username']) | $error = FALSE; - if( stripslashes($username) != $this_userdata['username'] ) + if (stripslashes($username) != $this_userdata['username']) { unset($rename_user); - $result = validate_username($username); - if ( $result['error'] ) + if ( stripslashes(strtolower($username)) != strtolower($this_userdata['username']) ) { - $error = TRUE; - $error_msg .= ( ( isset($error_msg) ) ? '
' : '' ) . $result['error_msg']; + $result = validate_username($username); + if ( $result['error'] ) + { + $error = TRUE; + $error_msg .= ( ( isset($error_msg) ) ? '
' : '' ) . $result['error_msg']; + } } - else + + if (!$error) { $username_sql = "username = '" . str_replace("\'", "''", $username) . "', "; $rename_user = $username; // Used for renaming usergroup } } - $passwd_sql = ""; + $passwd_sql = ''; if( !empty($password) && !empty($password_confirm) ) { // @@ -349,7 +353,7 @@ if( $mode == 'edit' || $mode == 'save' && ( isset($HTTP_POST_VARS['username']) | $error_msg .= ( ( isset($error_msg) ) ? '
' : '' ) . $lang['Password_mismatch']; } - if( $signature != "" ) + if ($signature != '') { $sig_length_check = preg_replace('/(\[.*?)(=.*?)\]/is', '\\1]', stripslashes($signature)); if ( $allowhtml ) @@ -1127,4 +1131,4 @@ else include('./page_footer_admin.'.$phpEx); -?> +?> \ No newline at end of file diff --git a/phpBB/includes/usercp_register.php b/phpBB/includes/usercp_register.php index 2d5c056bb5..adbf975e9f 100644 --- a/phpBB/includes/usercp_register.php +++ b/phpBB/includes/usercp_register.php @@ -960,4 +960,4 @@ $template->pparse('body'); include($phpbb_root_path . 'includes/page_tail.'.$phpEx); -?> +?> \ No newline at end of file diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index 0c1405c97e..cf0b724615 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -117,7 +117,7 @@ $template->assign_vars(array( switch( $mode ) { case 'joined': - $order_by = "user_regdate ASC LIMIT $start, " . $board_config['topics_per_page']; + $order_by = "user_regdate $sort_order LIMIT $start, " . $board_config['topics_per_page']; break; case 'username': $order_by = "username $sort_order LIMIT $start, " . $board_config['topics_per_page']; @@ -306,4 +306,4 @@ $template->pparse('body'); include($phpbb_root_path . 'includes/page_tail.'.$phpEx); -?> +?> \ No newline at end of file diff --git a/phpBB/templates/subSilver/index_body.tpl b/phpBB/templates/subSilver/index_body.tpl index c073d22b5a..705fb108f7 100644 --- a/phpBB/templates/subSilver/index_body.tpl +++ b/phpBB/templates/subSilver/index_body.tpl @@ -61,7 +61,9 @@ + +
{L_ONLINE_EXPLAIN}