Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Mueller <thomas.mueller@tmit.eu>2013-03-12 12:24:58 +0400
committerThomas Mueller <thomas.mueller@tmit.eu>2013-03-12 12:24:58 +0400
commit06992fec6d3d014060f8c4f4a5a75bb759d6c86e (patch)
treef7c79c5b92eeff696c39a52ee663bc0ba5e1e654 /lib/files/mapper.php
parent09003016686eea2ff674136792e09db49a1f925c (diff)
slug generates uniqid in case the file/folder name contains not one single valid character
Diffstat (limited to 'lib/files/mapper.php')
-rw-r--r--lib/files/mapper.php6
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;