]> source.dussan.org Git - nextcloud-server.git/commitdiff
slug generates uniqid in case the file/folder name contains not one single valid...
authorThomas Mueller <thomas.mueller@tmit.eu>
Tue, 12 Mar 2013 08:24:58 +0000 (09:24 +0100)
committerThomas Mueller <thomas.mueller@tmit.eu>
Tue, 12 Mar 2013 08:24:58 +0000 (09:24 +0100)
lib/files/mapper.php

index c5f1f9888dbce11ab7c22eb2909787db040e8e9c..418ef354f9c85e26966daf29daa7195c0523d1b4 100644 (file)
@@ -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;