mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-07 17:23:04 +02:00
fix: image_order cookie path fixed for url rewriting
improve: add function access_denied called when check_status or check_restrictions fail fix: french language correction fix: remove php warnings in clean_iptc_value split search functions into include/functions_search.inc.php git-svn-id: http://piwigo.org/svn/trunk@1113 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
// | Copyright (C) 2003-2005 PhpWebGallery Team - http://phpwebgallery.net |
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | branch : BSF (Best So Far)
|
||||
// | file : $RCSfile$
|
||||
// | file : $Id$
|
||||
// | last update : $Date$
|
||||
// | last modifier : $Author$
|
||||
// | revision : $Revision$
|
||||
@@ -493,4 +493,30 @@ function get_cat_display_name_from_id($cat_id,
|
||||
$cat_info = get_cat_info($cat_id);
|
||||
return get_cat_display_name($cat_info['name'], $url, $replace_space);
|
||||
}
|
||||
?>
|
||||
|
||||
/**
|
||||
* exits the current script (either exit or redirect)
|
||||
*/
|
||||
function access_denied()
|
||||
{
|
||||
global $user, $lang;
|
||||
|
||||
$login_url =
|
||||
get_root_url().'identification.php?redirect='
|
||||
.urlencode(urlencode($_SERVER['REQUEST_URI']));
|
||||
|
||||
if ( isset($user['is_the_guest']) and !$user['is_the_guest'] )
|
||||
{
|
||||
echo '<div style="text-align:center;">'.$lang['access_forbiden'].'<br />';
|
||||
echo '<a href="'.get_root_url().'identification.php">'.$lang['identification'].'</a> ';
|
||||
echo '<a href="'.make_index_url().'">'.$lang['home'].'</a></div>';
|
||||
exit();
|
||||
}
|
||||
else
|
||||
{
|
||||
header('HTTP/1.1 401 Authorization required');
|
||||
header('Status: 401 Authorization required');
|
||||
redirect($login_url);
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user