Merge branch 'develop-patch34' of https://github.com/aspangaro/dolibarr
into aspangaro-develop-patch34 Conflicts: htdocs/comm/action/class/actioncomm.class.php
This commit is contained in:
commit
01fbee0e06
@ -394,11 +394,13 @@ class ActionComm extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* Load an object from its id and create a new one in database
|
* Load an object from its id and create a new one in database
|
||||||
*
|
*
|
||||||
|
* @param user $fuser Object user making action
|
||||||
|
* @param int $socid Id of thirdparty
|
||||||
* @return int New id of clone
|
* @return int New id of clone
|
||||||
*/
|
*/
|
||||||
function createFromClone()
|
function createFromClone($fuser, $socid)
|
||||||
{
|
{
|
||||||
global $db, $user,$langs,$conf,$hookmanager;
|
global $db, $user, $langs, $conf, $hookmanager;
|
||||||
|
|
||||||
$this->context['createfromclone']='createfromclone';
|
$this->context['createfromclone']='createfromclone';
|
||||||
|
|
||||||
@ -416,7 +418,7 @@ class ActionComm extends CommonObject
|
|||||||
$this->id=0;
|
$this->id=0;
|
||||||
|
|
||||||
// Create clone
|
// Create clone
|
||||||
$result=$this->add($user);
|
$result=$this->add($fuser);
|
||||||
if ($result < 0) $error++;
|
if ($result < 0) $error++;
|
||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
@ -431,7 +433,7 @@ class ActionComm extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Call trigger
|
// Call trigger
|
||||||
$result=$this->call_trigger('ACTION_CLONE',$user);
|
$result=$this->call_trigger('ACTION_CLONE', $fuser);
|
||||||
if ($result < 0) { $error++; }
|
if ($result < 0) { $error++; }
|
||||||
// End call triggers
|
// End call triggers
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user