From 06992fec6d3d014060f8c4f4a5a75bb759d6c86e Mon Sep 17 00:00:00 2001 From: Thomas Mueller Date: Tue, 12 Mar 2013 09:24:58 +0100 Subject: slug generates uniqid in case the file/folder name contains not one single valid character --- lib/files/mapper.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/files/mapper.php b/lib/files/mapper.php index c5f1f9888db..418ef354f9c 100644 --- a/lib/files/mapper.php +++ b/lib/files/mapper.php @@ -219,10 +219,8 @@ class Mapper // remove unwanted characters $text = preg_replace('~[^-\w]+~', '', $text); - if (empty($text)) - { - // TODO: we better generate a guid in this case - return 'n-a'; + if (empty($text)) { + return uniqid(); } return $text; -- cgit v1.2.3