Issue ID 0000529 Re-Fixed.

Problem with "Options +MultiViews" .htaccess configuration.

git-svn-id: http://piwigo.org/svn/branches/branch-1_6@1689 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
rub
2007-01-02 22:30:18 +00:00
parent 09e2c295e8
commit 3169b81c76
4 changed files with 11 additions and 17 deletions
+4 -3
View File
@@ -175,9 +175,10 @@ if ($conf['gallery_locked'])
if ($user['is_the_guest'] and !$conf['guest_access']
and !in_array( script_basename(),
array('identification.php',
'password.php',
'register.php'
// Array of basename without file extention
array('identification',
'password',
'register'
)
)
)
+4 -11
View File
@@ -970,7 +970,8 @@ SELECT param,value
/**
* Return basename of the current script
* Return value are chnage to loawer case
* Lower case convertion is applied on return value
* Return value is without file extention ".php"
*
* @param void
*
@@ -982,25 +983,17 @@ function script_basename()
{
$file_name = $_SERVER['SCRIPT_NAME'];
}
else if (!empty($_SERVER['PHP_SELF']))
{
$file_name = $_SERVER['PHP_SELF'];
}
else if (!empty($_SERVER['SCRIPT_FILENAME']))
{
$file_name = $_SERVER['SCRIPT_FILENAME'];
}
else if (!empty($_SERVER['PATH_TRANSLATED']))
{
$file_name = $_SERVER['PATH_TRANSLATED'];
}
else
{
$file_name = '';
}
// $_SERVER return lower string following var ans systems
return basename(strtolower($file_name));
// $_SERVER return lower string following var and systems
return basename(strtolower($file_name), '.php');
}
?>
+1 -1
View File
@@ -177,7 +177,7 @@ WHERE id IN (' . implode(',',$page['items']) .')';
//echo ('<pre>'. var_export($calendar, true) . '</pre>');
$must_show_list = true; // true until calendar generates its own display
if (script_basename() != 'picture.php')
if (script_basename() != 'picture') // basename without file extention
{
$template->assign_block_vars('calendar', array());
+2 -2
View File
@@ -86,7 +86,7 @@ $tokens = explode(
// );
$next_token = 0;
if (script_basename() == 'picture.php')
if (script_basename() == 'picture') // basename without file extention
{ // the first token must be the identifier for the picture
if ( isset($_GET['image_id'])
and isset($_GET['cat']) and is_numeric($_GET['cat']) )
@@ -625,7 +625,7 @@ if (isset($page['chronology_field']))
$page['cat_nb_images'] = isset($page['items']) ? count($page['items']) : 0;
if (script_basename() == 'picture.php'
if (script_basename() == 'picture'
and !isset($page['image_id']) )
{
if ( !empty($page['items']) )