public static function getAliasName($name)
{
$paramsC = ComponentHelper::getParams('com_phocagallery');
$alias_iconv = $paramsC->get('alias_iconv', 0);
$iconv = 0;
if ($alias_iconv == 1) {
if (function_exists('iconv')) {
$name = preg_replace('~[^\\pL0-9_.]+~u', '-', $name);
$name = trim($name, "-");
$name = iconv("utf-8", "us-ascii//TRANSLIT", $name);
$name = strtolower($name);
$name = preg_replace('~[^-a-z0-9_.]+~', '', $name);
$iconv = 1;
} else {
$iconv = 0;
}
}
if ($iconv == 0) {
$name = OutputFilter::stringURLSafe($name);
}
if (trim(str_replace('-', '', $name)) == '') {
Factory::getDate()->format("Y-m-d-H-i-s");
}
return $name;
}