forked from joomla/Component-Builder
Fixed gh-272 by updating the table method generateAlias to also make use of the custom alias builder values.
This commit is contained in:
parent
2f4f9ff0a3
commit
e905aa895f
@ -130,7 +130,7 @@ Component Builder is mapped as a component in itself on my local development env
|
|||||||
+ *Version*: 2.7.7
|
+ *Version*: 2.7.7
|
||||||
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
|
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
|
||||||
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
+ *Line count*: **193966**
|
+ *Line count*: **193953**
|
||||||
+ *Field count*: **1027**
|
+ *Field count*: **1027**
|
||||||
+ *File count*: **1201**
|
+ *File count*: **1201**
|
||||||
+ *Folder count*: **193**
|
+ *Folder count*: **193**
|
||||||
|
@ -130,7 +130,7 @@ Component Builder is mapped as a component in itself on my local development env
|
|||||||
+ *Version*: 2.7.7
|
+ *Version*: 2.7.7
|
||||||
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
|
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
|
||||||
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
+ *Line count*: **193966**
|
+ *Line count*: **193953**
|
||||||
+ *Field count*: **1027**
|
+ *Field count*: **1027**
|
||||||
+ *File count*: **1201**
|
+ *File count*: **1201**
|
||||||
+ *Folder count*: **193**
|
+ *Folder count*: **193**
|
||||||
|
@ -323,29 +323,6 @@ class ###Component###Table###View### extends JTable
|
|||||||
$asset->loadByName('com_###component###');
|
$asset->loadByName('com_###component###');
|
||||||
|
|
||||||
return $asset->id;
|
return $asset->id;
|
||||||
}
|
}###GENERATENEWALIAS###
|
||||||
|
|
||||||
/**
|
|
||||||
* Generate a valid alias from title / date.
|
|
||||||
* Remains public to be able to check for duplicated alias before saving
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -5754,6 +5754,64 @@ class Interpretation extends Fields
|
|||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function setGenerateNewAlias($viewName_single)
|
||||||
|
{
|
||||||
|
// make sure this view has an alias
|
||||||
|
if (isset($this->customAliasBuilder[$viewName_single]) || isset($this->titleBuilder[$viewName_single]))
|
||||||
|
{
|
||||||
|
// set the title stuff
|
||||||
|
if (isset($this->customAliasBuilder[$viewName_single]))
|
||||||
|
{
|
||||||
|
$titles = array_values($this->customAliasBuilder[$viewName_single]);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$titles = array($this->titleBuilder[$viewName_single]);
|
||||||
|
}
|
||||||
|
// reset the bucket
|
||||||
|
$titleData = array();
|
||||||
|
// load the dynamic title builder
|
||||||
|
foreach ($titles as $title)
|
||||||
|
{
|
||||||
|
$titleData[] = "\$this->" . $title;
|
||||||
|
}
|
||||||
|
// rest the new function
|
||||||
|
$newFunction = array();
|
||||||
|
$newFunction[] = PHP_EOL . PHP_EOL . "\t/**";
|
||||||
|
$newFunction[] = "\t* Generate a valid alias from title / date.";
|
||||||
|
$newFunction[] = "\t* Remains public to be able to check for duplicated alias before saving";
|
||||||
|
$newFunction[] = "\t*";
|
||||||
|
$newFunction[] = "\t* @return string";
|
||||||
|
$newFunction[] = "\t*/";
|
||||||
|
$newFunction[] = "\tpublic function generateAlias()";
|
||||||
|
$newFunction[] = "\t{";
|
||||||
|
$newFunction[] = "\t\tif (empty(\$this->alias))";
|
||||||
|
$newFunction[] = "\t\t{";
|
||||||
|
$newFunction[] = "\t\t\t\$this->alias = ".implode(".' '.",$titleData).';';
|
||||||
|
$newFunction[] = "\t\t}";
|
||||||
|
$newFunction[] = PHP_EOL ."\t\t\$this->alias = JApplication::stringURLSafe(\$this->alias);";
|
||||||
|
$newFunction[] = PHP_EOL ."\t\tif (trim(str_replace('-', '', \$this->alias)) == '')";
|
||||||
|
$newFunction[] = "\t\t{";
|
||||||
|
$newFunction[] = "\t\t\t\$this->alias = JFactory::getDate()->format('Y-m-d-H-i-s');";
|
||||||
|
$newFunction[] = "\t\t}";
|
||||||
|
$newFunction[] = PHP_EOL ."\t\treturn \$this->alias;";
|
||||||
|
$newFunction[] = "\t}";
|
||||||
|
return implode(PHP_EOL, $newFunction);
|
||||||
|
}
|
||||||
|
// rest the new function
|
||||||
|
$newFunction = array();
|
||||||
|
$newFunction[] = PHP_EOL . PHP_EOL . "\t/**";
|
||||||
|
$newFunction[] = "\t* This view does not actually have an alias";
|
||||||
|
$newFunction[] = "\t*";
|
||||||
|
$newFunction[] = "\t* @return bool";
|
||||||
|
$newFunction[] = "\t*/";
|
||||||
|
$newFunction[] = "\tpublic function generateAlias()";
|
||||||
|
$newFunction[] = "\t{";
|
||||||
|
$newFunction[] = "\t\treturn false;";
|
||||||
|
$newFunction[] = "\t}";
|
||||||
|
return implode(PHP_EOL, $newFunction);
|
||||||
|
}
|
||||||
|
|
||||||
public function setInstall()
|
public function setInstall()
|
||||||
{
|
{
|
||||||
if (isset($this->queryBuilder) && ComponentbuilderHelper::checkArray($this->queryBuilder))
|
if (isset($this->queryBuilder) && ComponentbuilderHelper::checkArray($this->queryBuilder))
|
||||||
|
@ -514,6 +514,9 @@ class Infusion extends Interpretation
|
|||||||
// ###GENERATENEWTITLE### <<<DYNAMIC>>>
|
// ###GENERATENEWTITLE### <<<DYNAMIC>>>
|
||||||
$this->fileContentDynamic[$viewName_single]['###GENERATENEWTITLE###'] = $this->setGenerateNewTitle($viewName_single);
|
$this->fileContentDynamic[$viewName_single]['###GENERATENEWTITLE###'] = $this->setGenerateNewTitle($viewName_single);
|
||||||
|
|
||||||
|
// ###GENERATENEWALIAS### <<<DYNAMIC>>>
|
||||||
|
$this->fileContentDynamic[$viewName_single]['###GENERATENEWALIAS###'] = $this->setGenerateNewAlias($viewName_single);
|
||||||
|
|
||||||
// ###MODEL_BATCH_COPY### <<<DYNAMIC>>>
|
// ###MODEL_BATCH_COPY### <<<DYNAMIC>>>
|
||||||
$this->fileContentDynamic[$viewName_single]['###MODEL_BATCH_COPY###'] = $this->setBatchCopy($viewName_single);
|
$this->fileContentDynamic[$viewName_single]['###MODEL_BATCH_COPY###'] = $this->setBatchCopy($viewName_single);
|
||||||
|
|
||||||
|
@ -326,23 +326,23 @@ class ComponentbuilderTableAdmin_fields extends JTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate a valid alias from title / date.
|
* Generate a valid alias from title / date.
|
||||||
* Remains public to be able to check for duplicated alias before saving
|
* Remains public to be able to check for duplicated alias before saving
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function generateAlias()
|
public function generateAlias()
|
||||||
{
|
{
|
||||||
if (empty($this->alias))
|
if (empty($this->alias))
|
||||||
{
|
{
|
||||||
$this->alias = $this->name;
|
$this->alias = $this->admin_view;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||||
|
|
||||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||||
{
|
{
|
||||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
$this->alias = JFactory::getDate()->format('Y-m-d-H-i-s');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->alias;
|
return $this->alias;
|
||||||
|
@ -326,23 +326,23 @@ class ComponentbuilderTableAdmin_fields_conditions extends JTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate a valid alias from title / date.
|
* Generate a valid alias from title / date.
|
||||||
* Remains public to be able to check for duplicated alias before saving
|
* Remains public to be able to check for duplicated alias before saving
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function generateAlias()
|
public function generateAlias()
|
||||||
{
|
{
|
||||||
if (empty($this->alias))
|
if (empty($this->alias))
|
||||||
{
|
{
|
||||||
$this->alias = $this->name;
|
$this->alias = $this->admin_view;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||||
|
|
||||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||||
{
|
{
|
||||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
$this->alias = JFactory::getDate()->format('Y-m-d-H-i-s');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->alias;
|
return $this->alias;
|
||||||
|
@ -326,26 +326,13 @@ class ComponentbuilderTableAdmin_view extends JTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate a valid alias from title / date.
|
* This view does not actually have an alias
|
||||||
* Remains public to be able to check for duplicated alias before saving
|
*
|
||||||
*
|
* @return bool
|
||||||
* @return string
|
*/
|
||||||
*/
|
|
||||||
public function generateAlias()
|
public function generateAlias()
|
||||||
{
|
{
|
||||||
if (empty($this->alias))
|
return false;
|
||||||
{
|
|
||||||
$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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -326,23 +326,23 @@ class ComponentbuilderTableComponent_admin_views extends JTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate a valid alias from title / date.
|
* Generate a valid alias from title / date.
|
||||||
* Remains public to be able to check for duplicated alias before saving
|
* Remains public to be able to check for duplicated alias before saving
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function generateAlias()
|
public function generateAlias()
|
||||||
{
|
{
|
||||||
if (empty($this->alias))
|
if (empty($this->alias))
|
||||||
{
|
{
|
||||||
$this->alias = $this->name;
|
$this->alias = $this->joomla_component;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||||
|
|
||||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||||
{
|
{
|
||||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
$this->alias = JFactory::getDate()->format('Y-m-d-H-i-s');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->alias;
|
return $this->alias;
|
||||||
|
@ -326,23 +326,23 @@ class ComponentbuilderTableComponent_config extends JTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate a valid alias from title / date.
|
* Generate a valid alias from title / date.
|
||||||
* Remains public to be able to check for duplicated alias before saving
|
* Remains public to be able to check for duplicated alias before saving
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function generateAlias()
|
public function generateAlias()
|
||||||
{
|
{
|
||||||
if (empty($this->alias))
|
if (empty($this->alias))
|
||||||
{
|
{
|
||||||
$this->alias = $this->name;
|
$this->alias = $this->joomla_component;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||||
|
|
||||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||||
{
|
{
|
||||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
$this->alias = JFactory::getDate()->format('Y-m-d-H-i-s');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->alias;
|
return $this->alias;
|
||||||
|
@ -326,23 +326,23 @@ class ComponentbuilderTableComponent_custom_admin_menus extends JTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate a valid alias from title / date.
|
* Generate a valid alias from title / date.
|
||||||
* Remains public to be able to check for duplicated alias before saving
|
* Remains public to be able to check for duplicated alias before saving
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function generateAlias()
|
public function generateAlias()
|
||||||
{
|
{
|
||||||
if (empty($this->alias))
|
if (empty($this->alias))
|
||||||
{
|
{
|
||||||
$this->alias = $this->name;
|
$this->alias = $this->joomla_component;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||||
|
|
||||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||||
{
|
{
|
||||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
$this->alias = JFactory::getDate()->format('Y-m-d-H-i-s');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->alias;
|
return $this->alias;
|
||||||
|
@ -326,23 +326,23 @@ class ComponentbuilderTableComponent_custom_admin_views extends JTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate a valid alias from title / date.
|
* Generate a valid alias from title / date.
|
||||||
* Remains public to be able to check for duplicated alias before saving
|
* Remains public to be able to check for duplicated alias before saving
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function generateAlias()
|
public function generateAlias()
|
||||||
{
|
{
|
||||||
if (empty($this->alias))
|
if (empty($this->alias))
|
||||||
{
|
{
|
||||||
$this->alias = $this->name;
|
$this->alias = $this->joomla_component;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||||
|
|
||||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||||
{
|
{
|
||||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
$this->alias = JFactory::getDate()->format('Y-m-d-H-i-s');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->alias;
|
return $this->alias;
|
||||||
|
@ -326,23 +326,23 @@ class ComponentbuilderTableComponent_dashboard extends JTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate a valid alias from title / date.
|
* Generate a valid alias from title / date.
|
||||||
* Remains public to be able to check for duplicated alias before saving
|
* Remains public to be able to check for duplicated alias before saving
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function generateAlias()
|
public function generateAlias()
|
||||||
{
|
{
|
||||||
if (empty($this->alias))
|
if (empty($this->alias))
|
||||||
{
|
{
|
||||||
$this->alias = $this->name;
|
$this->alias = $this->joomla_component;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||||
|
|
||||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||||
{
|
{
|
||||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
$this->alias = JFactory::getDate()->format('Y-m-d-H-i-s');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->alias;
|
return $this->alias;
|
||||||
|
@ -326,23 +326,23 @@ class ComponentbuilderTableComponent_files_folders extends JTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate a valid alias from title / date.
|
* Generate a valid alias from title / date.
|
||||||
* Remains public to be able to check for duplicated alias before saving
|
* Remains public to be able to check for duplicated alias before saving
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function generateAlias()
|
public function generateAlias()
|
||||||
{
|
{
|
||||||
if (empty($this->alias))
|
if (empty($this->alias))
|
||||||
{
|
{
|
||||||
$this->alias = $this->name;
|
$this->alias = $this->joomla_component;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||||
|
|
||||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||||
{
|
{
|
||||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
$this->alias = JFactory::getDate()->format('Y-m-d-H-i-s');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->alias;
|
return $this->alias;
|
||||||
|
@ -326,23 +326,23 @@ class ComponentbuilderTableComponent_mysql_tweaks extends JTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate a valid alias from title / date.
|
* Generate a valid alias from title / date.
|
||||||
* Remains public to be able to check for duplicated alias before saving
|
* Remains public to be able to check for duplicated alias before saving
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function generateAlias()
|
public function generateAlias()
|
||||||
{
|
{
|
||||||
if (empty($this->alias))
|
if (empty($this->alias))
|
||||||
{
|
{
|
||||||
$this->alias = $this->name;
|
$this->alias = $this->joomla_component;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||||
|
|
||||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||||
{
|
{
|
||||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
$this->alias = JFactory::getDate()->format('Y-m-d-H-i-s');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->alias;
|
return $this->alias;
|
||||||
|
@ -326,23 +326,23 @@ class ComponentbuilderTableComponent_site_views extends JTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate a valid alias from title / date.
|
* Generate a valid alias from title / date.
|
||||||
* Remains public to be able to check for duplicated alias before saving
|
* Remains public to be able to check for duplicated alias before saving
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function generateAlias()
|
public function generateAlias()
|
||||||
{
|
{
|
||||||
if (empty($this->alias))
|
if (empty($this->alias))
|
||||||
{
|
{
|
||||||
$this->alias = $this->name;
|
$this->alias = $this->joomla_component;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||||
|
|
||||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||||
{
|
{
|
||||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
$this->alias = JFactory::getDate()->format('Y-m-d-H-i-s');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->alias;
|
return $this->alias;
|
||||||
|
@ -326,23 +326,23 @@ class ComponentbuilderTableComponent_updates extends JTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate a valid alias from title / date.
|
* Generate a valid alias from title / date.
|
||||||
* Remains public to be able to check for duplicated alias before saving
|
* Remains public to be able to check for duplicated alias before saving
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function generateAlias()
|
public function generateAlias()
|
||||||
{
|
{
|
||||||
if (empty($this->alias))
|
if (empty($this->alias))
|
||||||
{
|
{
|
||||||
$this->alias = $this->name;
|
$this->alias = $this->joomla_component;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||||
|
|
||||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||||
{
|
{
|
||||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
$this->alias = JFactory::getDate()->format('Y-m-d-H-i-s');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->alias;
|
return $this->alias;
|
||||||
|
@ -326,11 +326,11 @@ class ComponentbuilderTableCustom_admin_view extends JTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate a valid alias from title / date.
|
* Generate a valid alias from title / date.
|
||||||
* Remains public to be able to check for duplicated alias before saving
|
* Remains public to be able to check for duplicated alias before saving
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function generateAlias()
|
public function generateAlias()
|
||||||
{
|
{
|
||||||
if (empty($this->alias))
|
if (empty($this->alias))
|
||||||
@ -342,7 +342,7 @@ class ComponentbuilderTableCustom_admin_view extends JTable
|
|||||||
|
|
||||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||||
{
|
{
|
||||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
$this->alias = JFactory::getDate()->format('Y-m-d-H-i-s');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->alias;
|
return $this->alias;
|
||||||
|
@ -326,23 +326,23 @@ class ComponentbuilderTableCustom_code extends JTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate a valid alias from title / date.
|
* Generate a valid alias from title / date.
|
||||||
* Remains public to be able to check for duplicated alias before saving
|
* Remains public to be able to check for duplicated alias before saving
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function generateAlias()
|
public function generateAlias()
|
||||||
{
|
{
|
||||||
if (empty($this->alias))
|
if (empty($this->alias))
|
||||||
{
|
{
|
||||||
$this->alias = $this->name;
|
$this->alias = $this->component;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||||
|
|
||||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||||
{
|
{
|
||||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
$this->alias = JFactory::getDate()->format('Y-m-d-H-i-s');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->alias;
|
return $this->alias;
|
||||||
|
@ -326,11 +326,11 @@ class ComponentbuilderTableDynamic_get extends JTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate a valid alias from title / date.
|
* Generate a valid alias from title / date.
|
||||||
* Remains public to be able to check for duplicated alias before saving
|
* Remains public to be able to check for duplicated alias before saving
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function generateAlias()
|
public function generateAlias()
|
||||||
{
|
{
|
||||||
if (empty($this->alias))
|
if (empty($this->alias))
|
||||||
@ -342,7 +342,7 @@ class ComponentbuilderTableDynamic_get extends JTable
|
|||||||
|
|
||||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||||
{
|
{
|
||||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
$this->alias = JFactory::getDate()->format('Y-m-d-H-i-s');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->alias;
|
return $this->alias;
|
||||||
|
@ -326,11 +326,11 @@ class ComponentbuilderTableField extends JTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate a valid alias from title / date.
|
* Generate a valid alias from title / date.
|
||||||
* Remains public to be able to check for duplicated alias before saving
|
* Remains public to be able to check for duplicated alias before saving
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function generateAlias()
|
public function generateAlias()
|
||||||
{
|
{
|
||||||
if (empty($this->alias))
|
if (empty($this->alias))
|
||||||
@ -342,7 +342,7 @@ class ComponentbuilderTableField extends JTable
|
|||||||
|
|
||||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||||
{
|
{
|
||||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
$this->alias = JFactory::getDate()->format('Y-m-d-H-i-s');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->alias;
|
return $this->alias;
|
||||||
|
@ -326,11 +326,11 @@ class ComponentbuilderTableFieldtype extends JTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate a valid alias from title / date.
|
* Generate a valid alias from title / date.
|
||||||
* Remains public to be able to check for duplicated alias before saving
|
* Remains public to be able to check for duplicated alias before saving
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function generateAlias()
|
public function generateAlias()
|
||||||
{
|
{
|
||||||
if (empty($this->alias))
|
if (empty($this->alias))
|
||||||
@ -342,7 +342,7 @@ class ComponentbuilderTableFieldtype extends JTable
|
|||||||
|
|
||||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||||
{
|
{
|
||||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
$this->alias = JFactory::getDate()->format('Y-m-d-H-i-s');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->alias;
|
return $this->alias;
|
||||||
|
@ -326,23 +326,23 @@ class ComponentbuilderTableHelp_document extends JTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate a valid alias from title / date.
|
* Generate a valid alias from title / date.
|
||||||
* Remains public to be able to check for duplicated alias before saving
|
* Remains public to be able to check for duplicated alias before saving
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function generateAlias()
|
public function generateAlias()
|
||||||
{
|
{
|
||||||
if (empty($this->alias))
|
if (empty($this->alias))
|
||||||
{
|
{
|
||||||
$this->alias = $this->name;
|
$this->alias = $this->title;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||||
|
|
||||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||||
{
|
{
|
||||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
$this->alias = JFactory::getDate()->format('Y-m-d-H-i-s');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->alias;
|
return $this->alias;
|
||||||
|
@ -326,23 +326,23 @@ class ComponentbuilderTableJoomla_component extends JTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate a valid alias from title / date.
|
* Generate a valid alias from title / date.
|
||||||
* Remains public to be able to check for duplicated alias before saving
|
* Remains public to be able to check for duplicated alias before saving
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function generateAlias()
|
public function generateAlias()
|
||||||
{
|
{
|
||||||
if (empty($this->alias))
|
if (empty($this->alias))
|
||||||
{
|
{
|
||||||
$this->alias = $this->name;
|
$this->alias = $this->system_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||||
|
|
||||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||||
{
|
{
|
||||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
$this->alias = JFactory::getDate()->format('Y-m-d-H-i-s');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->alias;
|
return $this->alias;
|
||||||
|
@ -326,11 +326,11 @@ class ComponentbuilderTableLanguage extends JTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate a valid alias from title / date.
|
* Generate a valid alias from title / date.
|
||||||
* Remains public to be able to check for duplicated alias before saving
|
* Remains public to be able to check for duplicated alias before saving
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function generateAlias()
|
public function generateAlias()
|
||||||
{
|
{
|
||||||
if (empty($this->alias))
|
if (empty($this->alias))
|
||||||
@ -342,7 +342,7 @@ class ComponentbuilderTableLanguage extends JTable
|
|||||||
|
|
||||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||||
{
|
{
|
||||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
$this->alias = JFactory::getDate()->format('Y-m-d-H-i-s');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->alias;
|
return $this->alias;
|
||||||
|
@ -326,23 +326,23 @@ class ComponentbuilderTableLanguage_translation extends JTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate a valid alias from title / date.
|
* Generate a valid alias from title / date.
|
||||||
* Remains public to be able to check for duplicated alias before saving
|
* Remains public to be able to check for duplicated alias before saving
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function generateAlias()
|
public function generateAlias()
|
||||||
{
|
{
|
||||||
if (empty($this->alias))
|
if (empty($this->alias))
|
||||||
{
|
{
|
||||||
$this->alias = $this->name;
|
$this->alias = $this->source;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||||
|
|
||||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||||
{
|
{
|
||||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
$this->alias = JFactory::getDate()->format('Y-m-d-H-i-s');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->alias;
|
return $this->alias;
|
||||||
|
@ -326,11 +326,11 @@ class ComponentbuilderTableLayout extends JTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate a valid alias from title / date.
|
* Generate a valid alias from title / date.
|
||||||
* Remains public to be able to check for duplicated alias before saving
|
* Remains public to be able to check for duplicated alias before saving
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function generateAlias()
|
public function generateAlias()
|
||||||
{
|
{
|
||||||
if (empty($this->alias))
|
if (empty($this->alias))
|
||||||
@ -342,7 +342,7 @@ class ComponentbuilderTableLayout extends JTable
|
|||||||
|
|
||||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||||
{
|
{
|
||||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
$this->alias = JFactory::getDate()->format('Y-m-d-H-i-s');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->alias;
|
return $this->alias;
|
||||||
|
@ -326,11 +326,11 @@ class ComponentbuilderTableLibrary extends JTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate a valid alias from title / date.
|
* Generate a valid alias from title / date.
|
||||||
* Remains public to be able to check for duplicated alias before saving
|
* Remains public to be able to check for duplicated alias before saving
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function generateAlias()
|
public function generateAlias()
|
||||||
{
|
{
|
||||||
if (empty($this->alias))
|
if (empty($this->alias))
|
||||||
@ -342,7 +342,7 @@ class ComponentbuilderTableLibrary extends JTable
|
|||||||
|
|
||||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||||
{
|
{
|
||||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
$this->alias = JFactory::getDate()->format('Y-m-d-H-i-s');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->alias;
|
return $this->alias;
|
||||||
|
@ -326,23 +326,23 @@ class ComponentbuilderTableLibrary_config extends JTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate a valid alias from title / date.
|
* Generate a valid alias from title / date.
|
||||||
* Remains public to be able to check for duplicated alias before saving
|
* Remains public to be able to check for duplicated alias before saving
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function generateAlias()
|
public function generateAlias()
|
||||||
{
|
{
|
||||||
if (empty($this->alias))
|
if (empty($this->alias))
|
||||||
{
|
{
|
||||||
$this->alias = $this->name;
|
$this->alias = $this->library;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||||
|
|
||||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||||
{
|
{
|
||||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
$this->alias = JFactory::getDate()->format('Y-m-d-H-i-s');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->alias;
|
return $this->alias;
|
||||||
|
@ -326,23 +326,23 @@ class ComponentbuilderTableLibrary_files_folders_urls extends JTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate a valid alias from title / date.
|
* Generate a valid alias from title / date.
|
||||||
* Remains public to be able to check for duplicated alias before saving
|
* Remains public to be able to check for duplicated alias before saving
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function generateAlias()
|
public function generateAlias()
|
||||||
{
|
{
|
||||||
if (empty($this->alias))
|
if (empty($this->alias))
|
||||||
{
|
{
|
||||||
$this->alias = $this->name;
|
$this->alias = $this->library;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->alias = JApplication::stringURLSafe($this->alias);
|
$this->alias = JApplication::stringURLSafe($this->alias);
|
||||||
|
|
||||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||||
{
|
{
|
||||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
$this->alias = JFactory::getDate()->format('Y-m-d-H-i-s');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->alias;
|
return $this->alias;
|
||||||
|
@ -326,11 +326,11 @@ class ComponentbuilderTableServer extends JTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate a valid alias from title / date.
|
* Generate a valid alias from title / date.
|
||||||
* Remains public to be able to check for duplicated alias before saving
|
* Remains public to be able to check for duplicated alias before saving
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function generateAlias()
|
public function generateAlias()
|
||||||
{
|
{
|
||||||
if (empty($this->alias))
|
if (empty($this->alias))
|
||||||
@ -342,7 +342,7 @@ class ComponentbuilderTableServer extends JTable
|
|||||||
|
|
||||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||||
{
|
{
|
||||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
$this->alias = JFactory::getDate()->format('Y-m-d-H-i-s');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->alias;
|
return $this->alias;
|
||||||
|
@ -326,11 +326,11 @@ class ComponentbuilderTableSite_view extends JTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate a valid alias from title / date.
|
* Generate a valid alias from title / date.
|
||||||
* Remains public to be able to check for duplicated alias before saving
|
* Remains public to be able to check for duplicated alias before saving
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function generateAlias()
|
public function generateAlias()
|
||||||
{
|
{
|
||||||
if (empty($this->alias))
|
if (empty($this->alias))
|
||||||
@ -342,7 +342,7 @@ class ComponentbuilderTableSite_view extends JTable
|
|||||||
|
|
||||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||||
{
|
{
|
||||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
$this->alias = JFactory::getDate()->format('Y-m-d-H-i-s');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->alias;
|
return $this->alias;
|
||||||
|
@ -326,11 +326,11 @@ class ComponentbuilderTableSnippet extends JTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate a valid alias from title / date.
|
* Generate a valid alias from title / date.
|
||||||
* Remains public to be able to check for duplicated alias before saving
|
* Remains public to be able to check for duplicated alias before saving
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function generateAlias()
|
public function generateAlias()
|
||||||
{
|
{
|
||||||
if (empty($this->alias))
|
if (empty($this->alias))
|
||||||
@ -342,7 +342,7 @@ class ComponentbuilderTableSnippet extends JTable
|
|||||||
|
|
||||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||||
{
|
{
|
||||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
$this->alias = JFactory::getDate()->format('Y-m-d-H-i-s');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->alias;
|
return $this->alias;
|
||||||
|
@ -326,11 +326,11 @@ class ComponentbuilderTableSnippet_type extends JTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate a valid alias from title / date.
|
* Generate a valid alias from title / date.
|
||||||
* Remains public to be able to check for duplicated alias before saving
|
* Remains public to be able to check for duplicated alias before saving
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function generateAlias()
|
public function generateAlias()
|
||||||
{
|
{
|
||||||
if (empty($this->alias))
|
if (empty($this->alias))
|
||||||
@ -342,7 +342,7 @@ class ComponentbuilderTableSnippet_type extends JTable
|
|||||||
|
|
||||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||||
{
|
{
|
||||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
$this->alias = JFactory::getDate()->format('Y-m-d-H-i-s');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->alias;
|
return $this->alias;
|
||||||
|
@ -326,11 +326,11 @@ class ComponentbuilderTableTemplate extends JTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate a valid alias from title / date.
|
* Generate a valid alias from title / date.
|
||||||
* Remains public to be able to check for duplicated alias before saving
|
* Remains public to be able to check for duplicated alias before saving
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function generateAlias()
|
public function generateAlias()
|
||||||
{
|
{
|
||||||
if (empty($this->alias))
|
if (empty($this->alias))
|
||||||
@ -342,7 +342,7 @@ class ComponentbuilderTableTemplate extends JTable
|
|||||||
|
|
||||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||||
{
|
{
|
||||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
$this->alias = JFactory::getDate()->format('Y-m-d-H-i-s');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->alias;
|
return $this->alias;
|
||||||
|
@ -326,11 +326,11 @@ class ComponentbuilderTableValidation_rule extends JTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate a valid alias from title / date.
|
* Generate a valid alias from title / date.
|
||||||
* Remains public to be able to check for duplicated alias before saving
|
* Remains public to be able to check for duplicated alias before saving
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function generateAlias()
|
public function generateAlias()
|
||||||
{
|
{
|
||||||
if (empty($this->alias))
|
if (empty($this->alias))
|
||||||
@ -342,7 +342,7 @@ class ComponentbuilderTableValidation_rule extends JTable
|
|||||||
|
|
||||||
if (trim(str_replace('-', '', $this->alias)) == '')
|
if (trim(str_replace('-', '', $this->alias)) == '')
|
||||||
{
|
{
|
||||||
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
|
$this->alias = JFactory::getDate()->format('Y-m-d-H-i-s');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->alias;
|
return $this->alias;
|
||||||
|
Loading…
Reference in New Issue
Block a user