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:
rvelices
2006-03-30 00:37:07 +00:00
parent a2dd39df73
commit 4d322701de
10 changed files with 272 additions and 231 deletions
+28 -2
View File
@@ -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>&nbsp;';
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);
}
}
?>