Fix error message
This commit is contained in:
parent
37ca3ff230
commit
5a1a6ac095
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2018 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com>
|
* Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com>
|
||||||
* Copyright (C) 2005-2017 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2017 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||||
@ -927,6 +927,15 @@ if ($action == 'create')
|
|||||||
if ($id > 0)
|
if ($id > 0)
|
||||||
{
|
{
|
||||||
$result1=$object->fetch($id);
|
$result1=$object->fetch($id);
|
||||||
|
if ($result1 <= 0)
|
||||||
|
{
|
||||||
|
$langs->load("errors");
|
||||||
|
print $langs->trans("ErrorRecordNotFound");
|
||||||
|
|
||||||
|
llxFooter();
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
$result2=$object->fetch_thirdparty();
|
$result2=$object->fetch_thirdparty();
|
||||||
$result2=$object->fetch_projet();
|
$result2=$object->fetch_projet();
|
||||||
$result3=$object->fetch_contact();
|
$result3=$object->fetch_contact();
|
||||||
@ -957,7 +966,7 @@ if ($id > 0)
|
|||||||
$object->note = GETPOST("note",'none');
|
$object->note = GETPOST("note",'none');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($result1 < 0 || $result2 < 0 || $result3 < 0 || $result4 < 0 || $result5 < 0)
|
if ($result2 < 0 || $result3 < 0 || $result4 < 0 || $result5 < 0)
|
||||||
{
|
{
|
||||||
dol_print_error($db,$object->error);
|
dol_print_error($db,$object->error);
|
||||||
exit;
|
exit;
|
||||||
|
|||||||
@ -620,7 +620,7 @@ class ActionComm extends CommonObject
|
|||||||
$this->contact->id = $obj->fk_contact; // deprecated
|
$this->contact->id = $obj->fk_contact; // deprecated
|
||||||
|
|
||||||
$this->fk_element = $obj->elementid;
|
$this->fk_element = $obj->elementid;
|
||||||
$this->elementid = $obj->elementid;
|
$this->elementid = $obj->elementid;
|
||||||
$this->elementtype = $obj->elementtype;
|
$this->elementtype = $obj->elementtype;
|
||||||
|
|
||||||
$this->fetchResources();
|
$this->fetchResources();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user