Fixed problem when editing a bookmark and failing
This commit is contained in:
parent
52eb4943e2
commit
373bdcf5d7
@ -50,6 +50,13 @@ $backtopage=GETPOST('backtopage','alpha');
|
|||||||
|
|
||||||
if ($action == 'add' || $action == 'addproduct' || $action == 'update')
|
if ($action == 'add' || $action == 'addproduct' || $action == 'update')
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if ($action == 'update') {
|
||||||
|
$invertedaction = 'edit';
|
||||||
|
} else {
|
||||||
|
$invertedaction = 'create';
|
||||||
|
}
|
||||||
|
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
if (GETPOST("cancel"))
|
if (GETPOST("cancel"))
|
||||||
@ -101,12 +108,12 @@ if ($action == 'add' || $action == 'addproduct' || $action == 'update')
|
|||||||
{
|
{
|
||||||
setEventMessage($bookmark->error, 'errors');
|
setEventMessage($bookmark->error, 'errors');
|
||||||
}
|
}
|
||||||
$action='create';
|
$action = $invertedaction;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$action='create';
|
$action = $invertedaction;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user