]> git.mjollnir.org Git - s9y.git/commitdiff
serendipity_parseFileName didn't evaluate the correct name/ext structure for files...
authorbrockhaus <brockhaus>
Tue, 17 Jul 2007 03:46:04 +0000 (03:46 +0000)
committerbrockhaus <brockhaus>
Tue, 17 Jul 2007 03:46:04 +0000 (03:46 +0000)
include/functions.inc.php

index 410a3a326e337703a6852b74fbce1a232507cd12..243546ba2d9b1a8f12adb68a58db9eb9963cd275 100644 (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,'');
+    }
 }
 
 /**