mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-05 09:22:21 +02:00
Merge branch '2.8'
This commit is contained in:
@@ -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> ';
|
||||
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user