Merge branch '2.8'

This commit is contained in:
plegall
2016-07-07 18:22:22 +02:00
10 changed files with 160 additions and 22 deletions
+8 -3
View File
@@ -273,15 +273,16 @@ function tag_alpha_compare($a, $b)
*/
function access_denied()
{
global $user;
global $user, $conf;
$login_url =
get_root_url().'identification.php?redirect='
.urlencode(urlencode($_SERVER['REQUEST_URI']));
set_status_header(401);
if ( isset($user) and !is_a_guest() )
{
set_status_header(401);
echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">';
echo '<div style="text-align:center;">'.l10n('You are not authorized to access the requested page').'<br>';
echo '<a href="'.get_root_url().'identification.php">'.l10n('Identification').'</a>&nbsp;';
@@ -289,6 +290,10 @@ function access_denied()
echo str_repeat( ' ', 512); //IE6 doesn't error output if below a size
exit();
}
elseif (!$conf['guest_access'] and is_a_guest())
{
redirect_http($login_url);
}
else
{
redirect_html($login_url);
@@ -648,4 +653,4 @@ function flush_page_messages()
}
}
?>
?>