aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions.inc.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2006-11-01 05:04:24 +0000
committerrvelices <rv-github@modusoptimus.com>2006-11-01 05:04:24 +0000
commit525c9bc40ab6a99c44292388ce4385574057da86 (patch)
tree6e336766919f308bb490fcd92c9f50152adaa031 /include/functions.inc.php
parent5aeff9b233863456a04b0616fd099bc497283ce6 (diff)
fix: get_filename_wo_extension (check for ===false) and template make_filename
improvement: can retrieve template output outside the template git-svn-id: http://piwigo.org/svn/trunk@1589 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--include/functions.inc.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/functions.inc.php b/include/functions.inc.php
index 3b7c88bc6..973bd2fbe 100644
--- a/include/functions.inc.php
+++ b/include/functions.inc.php
@@ -184,7 +184,8 @@ function get_extension( $filename )
// get_filename_wo_extension( 'test.tar.gz' ) -> 'test.tar'
function get_filename_wo_extension( $filename )
{
- return substr( $filename, 0, strrpos( $filename, '.' ) );
+ $pos = strrpos( $filename, '.' );
+ return ($pos===false) ? $filename : substr( $filename, 0, $pos);
}
/**