aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions.inc.php
diff options
context:
space:
mode:
authorrub <rub@piwigo.org>2007-01-02 22:37:08 +0000
committerrub <rub@piwigo.org>2007-01-02 22:37:08 +0000
commit481188f7ea77418b46100d66a383f9a98f4cd029 (patch)
treed4e9a452ebac29e2907440838787e276dcbacb03 /include/functions.inc.php
parent0f2b554608c15cf92e3619dadfff188257f4f8e1 (diff)
Issue ID 0000529 Re-Fixed.
Problem with "Options +MultiViews" .htaccess configuration. Merge branch-1_6 1688:1689 into BSF git-svn-id: http://piwigo.org/svn/trunk@1690 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/functions.inc.php')
-rw-r--r--include/functions.inc.php15
1 files changed, 4 insertions, 11 deletions
diff --git a/include/functions.inc.php b/include/functions.inc.php
index e5d26f63e..3593652e0 100644
--- a/include/functions.inc.php
+++ b/include/functions.inc.php
@@ -1111,7 +1111,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
*
@@ -1123,25 +1124,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');
}
?>