mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
always redirect on login (fixes the "i am not logged in" problem. ;))
git-svn-id: file:///svn/phpbb/trunk@4838 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
120fd6bf70
commit
7aaf5a67a4
2 changed files with 8 additions and 8 deletions
|
@ -884,10 +884,10 @@ function obtain_attach_extensions(&$extensions)
|
||||||
$extension = strtolower(trim($row['extension']));
|
$extension = strtolower(trim($row['extension']));
|
||||||
|
|
||||||
$extensions['_allowed_'][] = $extension;
|
$extensions['_allowed_'][] = $extension;
|
||||||
$extensions[$extension]['display_cat'] = intval($row['cat_id']);
|
$extensions[$extension]['display_cat'] = (int) $row['cat_id'];
|
||||||
$extensions[$extension]['download_mode'] = intval($row['download_mode']);
|
$extensions[$extension]['download_mode'] = (int) $row['download_mode'];
|
||||||
$extensions[$extension]['upload_icon'] = trim($row['upload_icon']);
|
$extensions[$extension]['upload_icon'] = trim($row['upload_icon']);
|
||||||
$extensions[$extension]['max_filesize'] = intval($row['max_filesize']);
|
$extensions[$extension]['max_filesize'] = (int) $row['max_filesize'];
|
||||||
}
|
}
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
|
@ -949,7 +949,7 @@ function meta_refresh($time, $url)
|
||||||
|
|
||||||
|
|
||||||
// Generate login box or verify password
|
// Generate login box or verify password
|
||||||
function login_box($s_action, $s_hidden_fields = '', $login_explain = '')
|
function login_box($s_action, $s_hidden_fields = '', $login_explain = '', $ucp_login = false)
|
||||||
{
|
{
|
||||||
global $SID, $db, $user, $template, $auth, $phpEx;
|
global $SID, $db, $user, $template, $auth, $phpEx;
|
||||||
|
|
||||||
|
@ -980,7 +980,7 @@ function login_box($s_action, $s_hidden_fields = '', $login_explain = '')
|
||||||
$err = ($result === 0) ? $user->lang['ACTIVE_ERROR'] : $user->lang['LOGIN_ERROR'];
|
$err = ($result === 0) ? $user->lang['ACTIVE_ERROR'] : $user->lang['LOGIN_ERROR'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$s_hidden_fields = (!empty($_SERVER['HTTP_REFERER'])) ? '<input type="hidden" name="redirect" value="' . htmlspecialchars($_SERVER['HTTP_REFERER']) . '" />' : '';
|
$s_hidden_fields .= ($ucp_login && !empty($_SERVER['HTTP_REFERER'])) ? '<input type="hidden" name="redirect" value="' . htmlspecialchars($_SERVER['HTTP_REFERER']) . '" />' : '<input type="hidden" name="redirect" value="' . $s_action . '" />';
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'LOGIN_ERROR' => $err,
|
'LOGIN_ERROR' => $err,
|
||||||
|
@ -990,7 +990,7 @@ function login_box($s_action, $s_hidden_fields = '', $login_explain = '')
|
||||||
'U_TERMS_USE' => "ucp.$phpEx$SID&mode=terms",
|
'U_TERMS_USE' => "ucp.$phpEx$SID&mode=terms",
|
||||||
'U_PRIVACY' => "ucp.$phpEx$SID&mode=privacy",
|
'U_PRIVACY' => "ucp.$phpEx$SID&mode=privacy",
|
||||||
|
|
||||||
'S_LOGIN_ACTION' => $s_action,
|
'S_LOGIN_ACTION' => "ucp.$phpEx$SID&mode=login",
|
||||||
'S_HIDDEN_FIELDS' => $s_hidden_fields)
|
'S_HIDDEN_FIELDS' => $s_hidden_fields)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -267,7 +267,7 @@ switch ($mode)
|
||||||
}
|
}
|
||||||
|
|
||||||
define('IN_LOGIN', true);
|
define('IN_LOGIN', true);
|
||||||
login_box("ucp.$phpEx$SID&mode=login");
|
login_box("ucp.$phpEx$SID&mode=login", '', '', true);
|
||||||
|
|
||||||
$redirect = request_var('redirect', "index.$phpEx$SID");
|
$redirect = request_var('redirect', "index.$phpEx$SID");
|
||||||
meta_refresh(3, $redirect);
|
meta_refresh(3, $redirect);
|
||||||
|
|
Loading…
Add table
Reference in a new issue