Skip to content

Commit

Permalink
Removing deprecated methods and add missing language key (#12899)
Browse files Browse the repository at this point in the history
Also minor codestyle
  • Loading branch information
Thomas Hunziker authored and rdeutz committed Nov 16, 2016
1 parent b632863 commit e1ad2b1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
10 changes: 5 additions & 5 deletions administrator/components/com_fields/tables/field.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand All @@ -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;
}
Expand All @@ -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);
Expand Down Expand Up @@ -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)
{
Expand Down
1 change: 1 addition & 0 deletions administrator/language/en-GB/en-GB.com_fields.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit e1ad2b1

Please sign in to comment.