diff -r 9bcc185dc151 -r 85f91037cd4f includes/sessions.php --- a/includes/sessions.php Tue Jan 29 17:29:08 2008 -0500 +++ b/includes/sessions.php Tue Jan 29 23:15:44 2008 -0500 @@ -398,13 +398,13 @@ { case 'none': default: - $solution = 'Your account was most likely deactivated by an administrator. Please contact the site administration for further assistance.'; + $solution = $lang->get('user_login_noact_solution_none'); break; case 'user': - $solution = 'Please check your e-mail; you should have been sent a message with instructions on how to activate your account. If you do not receive an e-mail from this site within 24 hours, please contact the site administration for further assistance.'; + $solution = $lang->get('user_login_noact_solution_user'); break; case 'admin': - $solution = 'This website has been configured so that all user accounts must be activated by the administrator before they can be used, so your account will most likely be activated the next time an administrator visits the site.'; + $solution = $lang->get('user_login_noact_solution_admin'); break; } @@ -425,14 +425,14 @@ $this->auth_level = USER_LEVEL_MEMBER; $this->user_level = USER_LEVEL_MEMBER; $this->logout(); - redirect(scriptPath . '/', 'Logged out', 'You have successfully been logged out. All cookies cleared.', 4); + redirect(scriptPath . '/', $lang->get('user_login_noact_msg_logout_success_title'), $lang->get('user_login_noact_msg_logout_success_body'), 5); } if ( $can_request && !isset($_POST['activation_request']) ) { - $form = '
If you are having trouble or did not receive the e-mail, you can request account activation from the administrators of this site.
+ $form = '' . $lang->get('user_login_noact_msg_ask_admins') . '
'; } else @@ -440,21 +440,21 @@ if ( $can_request && isset($_POST['activation_request']) ) { $this->admin_activation_request($userdata['username']); - $form = 'A request has just been sent to the administrators of this site. They will be able to activate your account or send you another activation e-mail if needed.
+ $form = '' . $lang->get('user_login_noact_msg_admins_just_asked') . '
'; } else { - $form = 'There is an active request in the administrators\' control panel for your account to be activated.
+ $form = '' . $lang->get('user_login_noact_msg_admins_asked') . '
'; } } - die_semicritical('Account error', 'It appears that your user account has not yet been activated. '.$solution.'
' . $form); + die_semicritical($lang->get('user_login_noact_title'), '' . $lang->get('user_login_noact_msg_intro') . ' '.$solution.'
' . $form); } $this->sid = $_COOKIE['sid']; @@ -712,7 +712,7 @@ eval($cmd); } - redirect($url, 'Login sucessful', 'Please wait while you are transferred to the Password Reset form.'); + redirect($url, '', '', 0); exit; } } @@ -1582,6 +1582,8 @@ function check_banlist() { global $db, $session, $paths, $template, $plugins; // Common objects + global $lang; + $col_reason = ( $this->compat ) ? '"No reason entered (session manager is in compatibility mode)" AS reason' : 'reason'; $banned = false; if ( $this->user_logged_in ) @@ -1612,7 +1614,7 @@ $q = $this->sql($sql); if ( $db->numrows() > 0 ) { - while ( list($reason, $ban_value, $ban_type, $is_regex) = $db->fetchrow_num() ) + while ( list($reason_temp, $ban_value, $ban_type, $is_regex) = $db->fetchrow_num() ) { if ( $ban_type == BAN_IP && $row['is_regex'] != 1 ) { @@ -1624,6 +1626,7 @@ } if ( preg_match("/$regexp/", $_SERVER['REMOTE_ADDR']) ) { + $reason = $reason_temp; $banned = true; } } @@ -1631,6 +1634,7 @@ { // User is banned $banned = true; + $reason = $reason_temp; } } } @@ -1656,7 +1660,7 @@ $q = $this->sql($sql); if ( $db->numrows() > 0 ) { - while ( list($reason, $ban_value, $ban_type, $is_regex) = $db->fetchrow_num() ) + while ( list($reason_temp, $ban_value, $ban_type, $is_regex) = $db->fetchrow_num() ) { if ( $ban_type == BAN_IP && $row['is_regex'] != 1 ) { @@ -1666,12 +1670,14 @@ continue; if ( preg_match("/$regexp/", $_SERVER['REMOTE_ADDR']) ) { + $reason = $reason_temp; $banned = true; } } else { // User is banned + $reason = $reason_temp; $banned = true; } } @@ -1681,7 +1687,7 @@ if ( $banned && $paths->get_pageid_from_url() != $paths->nslist['Special'].'CSS' ) { // This guy is banned - kill the session, kill the database connection, bail out, and be pretty about it - die_semicritical('Ban notice', '' . $lang->get('user_ban_msg_body') . '