serendipity_parseFileName didn't evaluate the correct name/ext structure for files without extension

This commit is contained in:
Grischa Brockhaus 2007-07-17 03:46:04 +00:00
parent a05d7146cc
commit 398287ea06

View File

@ -666,9 +666,14 @@ function serendipity_fetchAuthor($author) {
*/
function serendipity_parseFileName($file) {
$x = explode('.', $file);
$suf = array_pop($x);
$f = @implode('.', $x);
return array($f, $suf);
if (count($x)>1){
$suf = array_pop($x);
$f = @implode('.', $x);
return array($f, $suf);
}
else {
return array($file,'');
}
}
/**