Skip to content

Commit

Permalink
Update Category.php
Browse files Browse the repository at this point in the history
Allow same alias in same parent and extension when there is a different language selected.
  • Loading branch information
artur-stepien committed May 6, 2020
1 parent b8898f8 commit 3b34bfe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/src/Table/Category.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ public function store($updateNulls = false)
// Verify that the alias is unique
$table = Table::getInstance('Category', 'JTable', array('dbo' => $this->getDbo()));

if ($table->load(array('alias' => $this->alias, 'parent_id' => (int) $this->parent_id, 'extension' => $this->extension))
if ($table->load(array('alias' => $this->alias, 'parent_id' => (int) $this->parent_id, 'extension' => $this->extension, 'language' => $this->language))
&& ($table->id != $this->id || $this->id == 0))
{
$this->setError(\JText::_('JLIB_DATABASE_ERROR_CATEGORY_UNIQUE_ALIAS'));
Expand Down

0 comments on commit 3b34bfe

Please sign in to comment.