32
1
mirror of https://github.com/joomla-extensions/weblinks.git synced 2024-12-25 09:50:00 +00:00

makeSameAliasPossibleForDifferentLanguages (#373)

This commit is contained in:
Astrid 2017-11-06 12:56:26 +01:00 committed by Yves Hoppe
parent 08e6da7006
commit 84df598015

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);