diff options
author | Thomas Mueller <thomas.mueller@tmit.eu> | 2013-03-12 09:24:58 +0100 |
---|---|---|
committer | Thomas Mueller <thomas.mueller@tmit.eu> | 2013-03-12 09:24:58 +0100 |
commit | 06992fec6d3d014060f8c4f4a5a75bb759d6c86e (patch) | |
tree | f7c79c5b92eeff696c39a52ee663bc0ba5e1e654 /lib | |
parent | 09003016686eea2ff674136792e09db49a1f925c (diff) | |
download | nextcloud-server-06992fec6d3d014060f8c4f4a5a75bb759d6c86e.tar.gz nextcloud-server-06992fec6d3d014060f8c4f4a5a75bb759d6c86e.zip |
slug generates uniqid in case the file/folder name contains not one single valid character
Diffstat (limited to 'lib')
-rw-r--r-- | lib/files/mapper.php | 6 |
1 files changed, 2 insertions, 4 deletions
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; |