From ed3b7f7bcedbcb0761c15a866fd6f0b510c36259 Mon Sep 17 00:00:00 2001 From: garvinhicking Date: Mon, 14 Nov 2005 09:04:18 +0000 Subject: [PATCH] don't allow empty permalinks, should help with some i18n trouble --- include/functions_permalinks.inc.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/functions_permalinks.inc.php b/include/functions_permalinks.inc.php index 328789d..7d2fb68 100644 --- a/include/functions_permalinks.inc.php +++ b/include/functions_permalinks.inc.php @@ -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; } -- 2.39.5