Skip to content
Snippets Groups Projects
Commit 06992fec authored by Thomas Müller's avatar Thomas Müller
Browse files

slug generates uniqid in case the file/folder name contains not one single valid character

parent 09003016
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment