makeSameAliasPossibleForDifferentLanguages (#373)

This commit is contained in:
Astrid 2017-11-06 12:56:26 +01:00 committed by Yves Hoppe
parent 08e6da7006
commit 84df598015
1 changed files with 2 additions and 1 deletions

View File

@ -93,7 +93,7 @@ class WeblinksTableWeblink extends JTable
// Verify that the alias is unique
$table = JTable::getInstance('Weblink', 'WeblinksTable');
if ($table->load(array('alias' => $this->alias, 'catid' => $this->catid)) && ($table->id != $this->id || $this->id == 0))
if ($table->load(array('language' => $this->language, 'alias' => $this->alias, 'catid' => $this->catid)) && ($table->id != $this->id || $this->id == 0))
{
$this->setError(JText::_('COM_WEBLINKS_ERROR_UNIQUE_ALIAS'));
@ -136,6 +136,7 @@ class WeblinksTableWeblink extends JTable
->select($db->quoteName('id'))
->from($db->quoteName('#__weblinks'))
->where($db->quoteName('title') . ' = ' . $db->quote($this->title))
->where($db->quoteName('language') . ' = ' . $db->quote($this->language))
->where($db->quoteName('catid') . ' = ' . (int) $this->catid);
$db->setQuery($query);