Update myobject_card.php
This commit is contained in:
parent
ffef95d628
commit
5ee6c13974
@ -128,7 +128,9 @@ $upload_dir = $conf->mymodule->multidir_output[isset($object->entity) ? $object-
|
|||||||
|
|
||||||
$parameters = array();
|
$parameters = array();
|
||||||
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||||
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
if ($reshook < 0) {
|
||||||
|
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||||
|
}
|
||||||
|
|
||||||
if (empty($reshook)) {
|
if (empty($reshook)) {
|
||||||
$error = 0;
|
$error = 0;
|
||||||
@ -137,8 +139,11 @@ if (empty($reshook)) {
|
|||||||
|
|
||||||
if (empty($backtopage) || ($cancel && empty($id))) {
|
if (empty($backtopage) || ($cancel && empty($id))) {
|
||||||
if (empty($backtopage) || ($cancel && strpos($backtopage, '__ID__'))) {
|
if (empty($backtopage) || ($cancel && strpos($backtopage, '__ID__'))) {
|
||||||
if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) $backtopage = $backurlforlist;
|
if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) {
|
||||||
else $backtopage = dol_buildpath('/mymodule/myobject_card.php', 1).'?id='.($id > 0 ? $id : '__ID__');
|
$backtopage = $backurlforlist;
|
||||||
|
} else {
|
||||||
|
$backtopage = dol_buildpath('/mymodule/myobject_card.php', 1).'?id='.($id > 0 ? $id : '__ID__');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user