From e1ad2b1dc86a56a67b0b057218f041fe9cf0ecb6 Mon Sep 17 00:00:00 2001 From: Thomas Hunziker Date: Wed, 16 Nov 2016 20:29:27 +0100 Subject: [PATCH] Removing deprecated methods and add missing language key (#12899) Also minor codestyle --- administrator/components/com_fields/tables/field.php | 10 +++++----- administrator/language/en-GB/en-GB.com_fields.ini | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/administrator/components/com_fields/tables/field.php b/administrator/components/com_fields/tables/field.php index a6301b8cf865d..b3c7c80d7f073 100644 --- a/administrator/components/com_fields/tables/field.php +++ b/administrator/components/com_fields/tables/field.php @@ -63,7 +63,7 @@ public function bind($src, $ignore = '') // Bind the rules. if (isset($src['rules']) && is_array($src['rules'])) { - $rules = new JRules($src['rules']); + $rules = new JAccessRules($src['rules']); $this->setRules($rules); } @@ -86,7 +86,7 @@ public function check() // Check for valid name if (trim($this->title) == '') { - $this->setError(JText::_('COM_FIELDS_LOCATION_ERR_TABLES_TITLE')); + $this->setError(JText::_('COM_FIELDS_MUSTCONTAIN_A_TITLE_FIELD')); return false; } @@ -96,11 +96,11 @@ public function check() $this->alias = $this->title; } - $this->alias = JApplication::stringURLSafe($this->alias); + $this->alias = JApplicationHelper::stringURLSafe($this->alias); if (trim(str_replace('-', '', $this->alias)) == '') { - $this->alias = JString::increment($alias, 'dash'); + $this->alias = Joomla\String\StringHelper::increment($alias, 'dash'); } $this->alias = str_replace(',', '-', $this->alias); @@ -221,7 +221,7 @@ protected function _getAssetParentId(JTable $table = null, $id = null) * * @return number|boolean * - * since __DEPLOY_VERSION__ + * @since __DEPLOY_VERSION__ */ private function getAssetId($name) { diff --git a/administrator/language/en-GB/en-GB.com_fields.ini b/administrator/language/en-GB/en-GB.com_fields.ini index aef4636b11083..f21c06afb2b52 100644 --- a/administrator/language/en-GB/en-GB.com_fields.ini +++ b/administrator/language/en-GB/en-GB.com_fields.ini @@ -47,6 +47,7 @@ COM_FIELDS_FIELD_SHOW_ON_BOTH="Both" COM_FIELDS_FIELD_SHOW_ON_DESC="On which part of the site should the field be shown." COM_FIELDS_FIELD_SHOW_ON_LABEL="Show On" COM_FIELDS_FIELD_SHOW_ON_SITE="Site" +COM_FIELDS_MUSTCONTAIN_A_TITLE_FIELD="Field must have a title." COM_FIELDS_FIELD_TYPE_DESC="The type of the field." COM_FIELDS_FIELD_TYPE_LABEL="Type" COM_FIELDS_N_ITEMS_ARCHIVED="%d fields successfully archived"