We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a3c2c68 commit 6df33c9Copy full SHA for 6df33c9
1 file changed
modules/attributi_combinazioni/actions.php
@@ -25,18 +25,15 @@
25
26
switch (filter('op')) {
27
case 'add':
28
- $descrizione = post('nome');
29
$title = post('titolo');
30
- $attributo_new = (new Attributo())->getByField('title', $descrizione);
+ $attributo_new = (new Attributo())->getByField('title', $title);
31
32
- if ($stato_new) {
+ if ($attributo_new) {
33
flash()->error(tr('Questo nome è già stato utilizzato per un altro attributo.'));
34
} else {
35
$attributo = Attributo::build();
36
$id_record = $dbo->lastInsertedID();
37
- $attributo->setTranslation('title', $descrizione);
38
$attributo->setTranslation('title', $title);
39
- $attributo->save();
40
41
flash()->info(tr('Nuovo attributo creato correttamente!'));
42
}
0 commit comments