mirror of
https://github.com/joomla-extensions/weblinks.git
synced 2024-12-25 01:45:59 +00:00
makeSameAliasPossibleForDifferentLanguages (#373)
This commit is contained in:
parent
08e6da7006
commit
84df598015
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user