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

This commit is contained in:
2018-05-03 01:26:41 +02:00
parent e905aa895f
commit f200e635b8
30 changed files with 94 additions and 438 deletions

View File

@ -326,26 +326,13 @@ class ComponentbuilderTableComponent_custom_admin_menus 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->joomla_component;
}
$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;
}
}