aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2016-07-07 18:22:22 +0200
committerplegall <plg@piwigo.org>2016-07-07 18:22:22 +0200
commitee737aeed714ea28de9c1b475f76abb078385fcc (patch)
tree2f933785ead7bfde2acf8ef5345c2dd76b597f41 /include
parent724befb35d0edb0727ec511f9cf8086b36e12f8d (diff)
parentc72a414a4832d2f768161b87188f16cb151f6cc9 (diff)
Merge branch '2.8'
Diffstat (limited to 'include')
-rw-r--r--include/functions_html.inc.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/include/functions_html.inc.php b/include/functions_html.inc.php
index b0f123a14..5af5c1862 100644
--- a/include/functions_html.inc.php
+++ b/include/functions_html.inc.php
@@ -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()
}
}
-?> \ No newline at end of file
+?>