improved the table method generateAlias to only get added if there is an alias in the view

This commit is contained in:
Llewellyn committed 2018-05-03 01:26:41 +02:00
1 parent e905aa895f
commit f200e635b8
30 files changed
+94 -438

No files matched your search

+3 -16
View File
@@ -326,26 +326,13 @@ class ComponentbuilderTableLanguage extends JTable
}
/**
* Generate a valid alias from title / date.
* Remains public to be able to check for duplicated alias before saving
* This view does not actually have an alias
*
* @return string
* @return bool
*/
public function generateAlias()
{
if (empty($this->alias))
{
$this->alias = $this->name;
}
$this->alias = JApplication::stringURLSafe($this->alias);
if (trim(str_replace('-', '', $this->alias)) == '')
{
$this->alias = JFactory::getDate()->format('Y-m-d-H-i-s');
}
return $this->alias;
return false;
}
}