Skip to content

Commit af5af66

Browse files
authored
tag alias like in J4 Ref. joomla#38576
1 parent 73fa007 commit af5af66

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

libraries/src/Table/ContentType.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,10 @@ public function store($updateNulls = false)
6969
// Verify that the alias is unique
7070
$table = Table::getInstance('Contenttype', 'JTable', array('dbo' => $this->getDbo()));
7171

72-
if ($table->load(array('type_alias' => $this->type_alias)) && ($table->type_id != $this->type_id || $this->type_id == 0))
73-
{
72+
if (
73+
$table->load(array('alias' => $this->alias, 'parent_id' => (int) $this->parent_id))
74+
&& ($table->id != $this->id || $this->id == 0)
75+
) {
7476
$this->setError(\JText::_('COM_TAGS_ERROR_UNIQUE_ALIAS'));
7577

7678
return false;

0 commit comments

Comments
 (0)