Merge branch '3.2' of ssh://git@github.com/Dolibarr/dolibarr.git into 3.2

This commit is contained in:
Laurent Destailleur
2012-05-29 22:18:45 +02:00
2 changed files with 5 additions and 6 deletions

View File

@@ -380,9 +380,6 @@ class Societe extends CommonObject
dol_syslog(get_class($this)."::Update id=".$id." call_trigger=".$call_trigger." allowmodcodeclient=".$allowmodcodeclient." allowmodcodefournisseur=".$allowmodcodefournisseur);
// For triggers
if ($call_trigger) $this->oldobject = dol_clone($this);
$now=dol_now();
// Clean parameters

View File

@@ -102,7 +102,11 @@ if (empty($reshook))
{
require_once(DOL_DOCUMENT_ROOT."/core/lib/functions2.lib.php");
if ($action == 'update') $object->fetch($socid);
if ($action == 'update')
{
$ret=$object->fetch($socid);
$object->oldcopy=dol_clone($object);
}
else $object->canvas=$canvas;
if (GETPOST("private") == 1)
@@ -317,8 +321,6 @@ if (empty($reshook))
exit;
}
$object->oldcopy=dol_clone($object);
// To not set code if third party is not concerned. But if it had values, we keep them.
if (empty($object->client) && empty($object->oldcopy->code_client)) $object->code_client='';
if (empty($object->fournisseur)&& empty($object->oldcopy->code_fournisseur)) $object->code_fournisseur='';