fix: possibilité de créer des sous catégories ayant le même nom
This commit is contained in:
parent
411c3c6d91
commit
d310af3f56
@ -139,10 +139,8 @@ print '<tr><td valign="top" width="30%">';
|
|||||||
echo "<p>".$langs->trans ("ErrForgotField")." \"".$langs->trans ("Label")."\"</p>";
|
echo "<p>".$langs->trans ("ErrForgotField")." \"".$langs->trans ("Label")."\"</p>";
|
||||||
$OK = false;
|
$OK = false;
|
||||||
}
|
}
|
||||||
else if ($c->already_exists($_POST["nom"])
|
else if ($c->already_exists($_POST["nom"])) // on regarde si le nom n'existe pas déjà en tant que catégorie ou sous-catégorie
|
||||||
{
|
{
|
||||||
// on regarde si le champ nom n'est pas déjà dans la table catégorie (rappel: un nom est unique dans la table catégorie
|
|
||||||
// nb a déjà été renseigné, il contient le nombre de catégories
|
|
||||||
echo "<p>".$langs->trans ("ErrCatAlreadyExists")."</p>";
|
echo "<p>".$langs->trans ("ErrCatAlreadyExists")."</p>";
|
||||||
$OK = false;
|
$OK = false;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user