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

This commit is contained in:
Thomas Mueller 2013-03-12 09:24:58 +01:00
parent 0900301668
commit 06992fec6d
1 changed files with 2 additions and 4 deletions

View 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;