Fix: more better of better
This commit is contained in:
parent
4dd8119a9e
commit
dcfc34e64e
@ -96,12 +96,24 @@ $object = new Propal($db);
|
|||||||
if ($id > 0 || ! empty($ref))
|
if ($id > 0 || ! empty($ref))
|
||||||
{
|
{
|
||||||
$ret=$object->fetch($id, $ref);
|
$ret=$object->fetch($id, $ref);
|
||||||
|
if ($ret == 0)
|
||||||
|
{
|
||||||
|
$langs->load("errors");
|
||||||
|
setEventMessage($langs->trans('ErrorRecordNotFound'), 'errors');
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
|
else if ($ret < 0)
|
||||||
|
{
|
||||||
|
setEventMessage($object->error, 'errors');
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (! $error)
|
||||||
|
{
|
||||||
$object->fetch_thirdparty();
|
$object->fetch_thirdparty();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$langs->load("errors");
|
|
||||||
setEventMessage($langs->trans('ErrorRecordNotFound'), 'errors');
|
|
||||||
Header('Location: '.DOL_URL_ROOT.'/comm/propal/list.php');
|
Header('Location: '.DOL_URL_ROOT.'/comm/propal/list.php');
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -51,12 +51,24 @@ $object = new Propal($db);
|
|||||||
if ($id > 0 || ! empty($ref))
|
if ($id > 0 || ! empty($ref))
|
||||||
{
|
{
|
||||||
$ret=$object->fetch($id, $ref);
|
$ret=$object->fetch($id, $ref);
|
||||||
|
if ($ret == 0)
|
||||||
|
{
|
||||||
|
$langs->load("errors");
|
||||||
|
setEventMessage($langs->trans('ErrorRecordNotFound'), 'errors');
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
|
else if ($ret < 0)
|
||||||
|
{
|
||||||
|
setEventMessage($object->error, 'errors');
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (! $error)
|
||||||
|
{
|
||||||
$object->fetch_thirdparty();
|
$object->fetch_thirdparty();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$langs->load("errors");
|
|
||||||
setEventMessage($langs->trans('ErrorRecordNotFound'), 'errors');
|
|
||||||
Header('Location: '.DOL_URL_ROOT.'/comm/propal/list.php');
|
Header('Location: '.DOL_URL_ROOT.'/comm/propal/list.php');
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user