From f200e635b8fcdc70a3876e56d4ec770f99263073 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Thu, 3 May 2018 01:26:41 +0200 Subject: [PATCH] improved the table method generateAlias to only get added if there is an alias in the view --- README.md | 2 +- admin/README.txt | 2 +- admin/helpers/compiler/e_Interpretation.php | 15 +++++++++++---- admin/tables/admin_fields.php | 19 +++---------------- admin/tables/admin_fields_conditions.php | 19 +++---------------- admin/tables/component_admin_views.php | 19 +++---------------- admin/tables/component_config.php | 19 +++---------------- admin/tables/component_custom_admin_menus.php | 19 +++---------------- admin/tables/component_custom_admin_views.php | 19 +++---------------- admin/tables/component_dashboard.php | 19 +++---------------- admin/tables/component_files_folders.php | 19 +++---------------- admin/tables/component_mysql_tweaks.php | 19 +++---------------- admin/tables/component_site_views.php | 19 +++---------------- admin/tables/component_updates.php | 19 +++---------------- admin/tables/custom_admin_view.php | 19 +++---------------- admin/tables/custom_code.php | 19 +++---------------- admin/tables/dynamic_get.php | 19 +++---------------- admin/tables/field.php | 19 +++---------------- admin/tables/fieldtype.php | 19 +++---------------- admin/tables/joomla_component.php | 19 +++---------------- admin/tables/language.php | 19 +++---------------- admin/tables/language_translation.php | 19 +++---------------- admin/tables/library.php | 19 +++---------------- admin/tables/library_config.php | 19 +++---------------- admin/tables/library_files_folders_urls.php | 19 +++---------------- admin/tables/server.php | 19 +++---------------- admin/tables/site_view.php | 19 +++---------------- admin/tables/snippet.php | 19 +++---------------- admin/tables/snippet_type.php | 19 +++---------------- admin/tables/validation_rule.php | 19 +++---------------- 30 files changed, 94 insertions(+), 438 deletions(-) diff --git a/README.md b/README.md index 27a1f929f..21d6acd21 100644 --- a/README.md +++ b/README.md @@ -130,7 +130,7 @@ Component Builder is mapped as a component in itself on my local development env + *Version*: 2.7.7 + *Copyright*: Copyright (C) 2015. All Rights Reserved + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html -+ *Line count*: **193953** ++ *Line count*: **193602** + *Field count*: **1027** + *File count*: **1201** + *Folder count*: **193** diff --git a/admin/README.txt b/admin/README.txt index 27a1f929f..21d6acd21 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -130,7 +130,7 @@ Component Builder is mapped as a component in itself on my local development env + *Version*: 2.7.7 + *Copyright*: Copyright (C) 2015. All Rights Reserved + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html -+ *Line count*: **193953** ++ *Line count*: **193602** + *Field count*: **1027** + *File count*: **1201** + *Folder count*: **193** diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index b12efcd1f..c7a042b6e 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -5757,23 +5757,30 @@ class Interpretation extends Fields public function setGenerateNewAlias($viewName_single) { // make sure this view has an alias - if (isset($this->customAliasBuilder[$viewName_single]) || isset($this->titleBuilder[$viewName_single])) + if (isset($this->aliasBuilder[$viewName_single])) { // set the title stuff if (isset($this->customAliasBuilder[$viewName_single])) { $titles = array_values($this->customAliasBuilder[$viewName_single]); } - else + elseif (isset($this->titleBuilder[$viewName_single])) { $titles = array($this->titleBuilder[$viewName_single]); } // reset the bucket $titleData = array(); // load the dynamic title builder - foreach ($titles as $title) + if (isset($titles) && ComponentbuilderHelper::checkArray($titles)) { - $titleData[] = "\$this->" . $title; + foreach ($titles as $title) + { + $titleData[] = "\$this->" . $title; + } + } + else + { + $titleData = array("''"); // just incase some mad man does not set a title/customAlias (we fall back on the date) } // rest the new function $newFunction = array(); diff --git a/admin/tables/admin_fields.php b/admin/tables/admin_fields.php index 0094f10f2..ea86a2c3c 100644 --- a/admin/tables/admin_fields.php +++ b/admin/tables/admin_fields.php @@ -326,26 +326,13 @@ class ComponentbuilderTableAdmin_fields 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->admin_view; - } - - $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; } } diff --git a/admin/tables/admin_fields_conditions.php b/admin/tables/admin_fields_conditions.php index fac375eb1..ca14005bb 100644 --- a/admin/tables/admin_fields_conditions.php +++ b/admin/tables/admin_fields_conditions.php @@ -326,26 +326,13 @@ class ComponentbuilderTableAdmin_fields_conditions 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->admin_view; - } - - $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; } } diff --git a/admin/tables/component_admin_views.php b/admin/tables/component_admin_views.php index eb7df6f76..7356acec2 100644 --- a/admin/tables/component_admin_views.php +++ b/admin/tables/component_admin_views.php @@ -326,26 +326,13 @@ class ComponentbuilderTableComponent_admin_views 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; } } diff --git a/admin/tables/component_config.php b/admin/tables/component_config.php index a3ebe9bd2..af3afc18e 100644 --- a/admin/tables/component_config.php +++ b/admin/tables/component_config.php @@ -326,26 +326,13 @@ class ComponentbuilderTableComponent_config 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; } } diff --git a/admin/tables/component_custom_admin_menus.php b/admin/tables/component_custom_admin_menus.php index f9781c7e3..b350ea89f 100644 --- a/admin/tables/component_custom_admin_menus.php +++ b/admin/tables/component_custom_admin_menus.php @@ -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; } } diff --git a/admin/tables/component_custom_admin_views.php b/admin/tables/component_custom_admin_views.php index 7914997d2..7eb8a79e9 100644 --- a/admin/tables/component_custom_admin_views.php +++ b/admin/tables/component_custom_admin_views.php @@ -326,26 +326,13 @@ class ComponentbuilderTableComponent_custom_admin_views 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; } } diff --git a/admin/tables/component_dashboard.php b/admin/tables/component_dashboard.php index 271a12897..98ce570e9 100644 --- a/admin/tables/component_dashboard.php +++ b/admin/tables/component_dashboard.php @@ -326,26 +326,13 @@ class ComponentbuilderTableComponent_dashboard 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; } } diff --git a/admin/tables/component_files_folders.php b/admin/tables/component_files_folders.php index 0949c388e..93a87c74f 100644 --- a/admin/tables/component_files_folders.php +++ b/admin/tables/component_files_folders.php @@ -326,26 +326,13 @@ class ComponentbuilderTableComponent_files_folders 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; } } diff --git a/admin/tables/component_mysql_tweaks.php b/admin/tables/component_mysql_tweaks.php index 351386e3e..29fb03c1d 100644 --- a/admin/tables/component_mysql_tweaks.php +++ b/admin/tables/component_mysql_tweaks.php @@ -326,26 +326,13 @@ class ComponentbuilderTableComponent_mysql_tweaks 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; } } diff --git a/admin/tables/component_site_views.php b/admin/tables/component_site_views.php index f5ba92714..755e09b42 100644 --- a/admin/tables/component_site_views.php +++ b/admin/tables/component_site_views.php @@ -326,26 +326,13 @@ class ComponentbuilderTableComponent_site_views 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; } } diff --git a/admin/tables/component_updates.php b/admin/tables/component_updates.php index 9716e9b5c..3b554cc9d 100644 --- a/admin/tables/component_updates.php +++ b/admin/tables/component_updates.php @@ -326,26 +326,13 @@ class ComponentbuilderTableComponent_updates 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; } } diff --git a/admin/tables/custom_admin_view.php b/admin/tables/custom_admin_view.php index fc8eeb041..01e12dca1 100644 --- a/admin/tables/custom_admin_view.php +++ b/admin/tables/custom_admin_view.php @@ -326,26 +326,13 @@ class ComponentbuilderTableCustom_admin_view 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; } } diff --git a/admin/tables/custom_code.php b/admin/tables/custom_code.php index 3d2e54383..0c503e051 100644 --- a/admin/tables/custom_code.php +++ b/admin/tables/custom_code.php @@ -326,26 +326,13 @@ class ComponentbuilderTableCustom_code 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->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; } } diff --git a/admin/tables/dynamic_get.php b/admin/tables/dynamic_get.php index 35d71c724..13cce4e12 100644 --- a/admin/tables/dynamic_get.php +++ b/admin/tables/dynamic_get.php @@ -326,26 +326,13 @@ class ComponentbuilderTableDynamic_get 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; } } diff --git a/admin/tables/field.php b/admin/tables/field.php index 7f661ee12..36076d802 100644 --- a/admin/tables/field.php +++ b/admin/tables/field.php @@ -326,26 +326,13 @@ class ComponentbuilderTableField 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; } } diff --git a/admin/tables/fieldtype.php b/admin/tables/fieldtype.php index 929c03a22..5faf0559e 100644 --- a/admin/tables/fieldtype.php +++ b/admin/tables/fieldtype.php @@ -326,26 +326,13 @@ class ComponentbuilderTableFieldtype 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; } } diff --git a/admin/tables/joomla_component.php b/admin/tables/joomla_component.php index 23621995b..b44df58dc 100644 --- a/admin/tables/joomla_component.php +++ b/admin/tables/joomla_component.php @@ -326,26 +326,13 @@ class ComponentbuilderTableJoomla_component 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->system_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; } } diff --git a/admin/tables/language.php b/admin/tables/language.php index ad416b5da..69768494e 100644 --- a/admin/tables/language.php +++ b/admin/tables/language.php @@ -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; } } diff --git a/admin/tables/language_translation.php b/admin/tables/language_translation.php index 675e45c78..848567bbe 100644 --- a/admin/tables/language_translation.php +++ b/admin/tables/language_translation.php @@ -326,26 +326,13 @@ class ComponentbuilderTableLanguage_translation 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->source; - } - - $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; } } diff --git a/admin/tables/library.php b/admin/tables/library.php index 8713e0052..598f04b5e 100644 --- a/admin/tables/library.php +++ b/admin/tables/library.php @@ -326,26 +326,13 @@ class ComponentbuilderTableLibrary 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; } } diff --git a/admin/tables/library_config.php b/admin/tables/library_config.php index fe401acea..2616c24fc 100644 --- a/admin/tables/library_config.php +++ b/admin/tables/library_config.php @@ -326,26 +326,13 @@ class ComponentbuilderTableLibrary_config 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->library; - } - - $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; } } diff --git a/admin/tables/library_files_folders_urls.php b/admin/tables/library_files_folders_urls.php index 062348c73..ecbad6a8b 100644 --- a/admin/tables/library_files_folders_urls.php +++ b/admin/tables/library_files_folders_urls.php @@ -326,26 +326,13 @@ class ComponentbuilderTableLibrary_files_folders_urls 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->library; - } - - $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; } } diff --git a/admin/tables/server.php b/admin/tables/server.php index fc8dbe6b1..ec6d96e81 100644 --- a/admin/tables/server.php +++ b/admin/tables/server.php @@ -326,26 +326,13 @@ class ComponentbuilderTableServer 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; } } diff --git a/admin/tables/site_view.php b/admin/tables/site_view.php index 3dd937b80..5e50f0c0b 100644 --- a/admin/tables/site_view.php +++ b/admin/tables/site_view.php @@ -326,26 +326,13 @@ class ComponentbuilderTableSite_view 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; } } diff --git a/admin/tables/snippet.php b/admin/tables/snippet.php index f2e407d91..9b8a7c420 100644 --- a/admin/tables/snippet.php +++ b/admin/tables/snippet.php @@ -326,26 +326,13 @@ class ComponentbuilderTableSnippet 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; } } diff --git a/admin/tables/snippet_type.php b/admin/tables/snippet_type.php index 392c3c56a..0c85abd04 100644 --- a/admin/tables/snippet_type.php +++ b/admin/tables/snippet_type.php @@ -326,26 +326,13 @@ class ComponentbuilderTableSnippet_type 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; } } diff --git a/admin/tables/validation_rule.php b/admin/tables/validation_rule.php index c62e199bd..d0ca86176 100644 --- a/admin/tables/validation_rule.php +++ b/admin/tables/validation_rule.php @@ -326,26 +326,13 @@ class ComponentbuilderTableValidation_rule 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; } }