]> git.mjollnir.org Git - s9y.git/commitdiff
don't allow empty permalinks, should help with some i18n trouble
authorgarvinhicking <garvinhicking>
Mon, 14 Nov 2005 09:04:18 +0000 (09:04 +0000)
committergarvinhicking <garvinhicking>
Mon, 14 Nov 2005 09:04:18 +0000 (09:04 +0000)
include/functions_permalinks.inc.php

index 328789d48c6724cea0639ebd56223e0df08bfc19..7d2fb688a0af051f402f90bc7a62d3c2f1a1092d 100644 (file)
@@ -117,6 +117,14 @@ function serendipity_makeFilename($str, $stripDots = false) {
 
     // Remove excess separators
     $str = trim($str, $to[0]);
+    
+    if (empty($str)) {
+        if (isset($GLOBALS['i18n_unknown'])) {
+            $str = $GLOBALS['i18n_unknown'];
+        } else {
+            $str = 'unknown';
+        }
+    }
 
     return $str;
 }