Merge pull request #17257 from ibuiv/patch-4
Fix Infinite Loop in trigger
This commit is contained in:
commit
7e4dcde089
@ -1556,9 +1556,10 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
*
|
*
|
||||||
* @param User $user User making the clone
|
* @param User $user User making the clone
|
||||||
* @param int $socid Id of thirdparty
|
* @param int $socid Id of thirdparty
|
||||||
|
* @param int $notrigger Disable all triggers
|
||||||
* @return int New id of clone
|
* @return int New id of clone
|
||||||
*/
|
*/
|
||||||
public function createFromClone(User $user, $socid = 0)
|
public function createFromClone(User $user, $socid = 0, $notrigger = 0)
|
||||||
{
|
{
|
||||||
global $conf, $user, $hookmanager;
|
global $conf, $user, $hookmanager;
|
||||||
|
|
||||||
@ -1605,7 +1606,7 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
|
|
||||||
// Create clone
|
// Create clone
|
||||||
$this->context['createfromclone'] = 'createfromclone';
|
$this->context['createfromclone'] = 'createfromclone';
|
||||||
$result = $this->create($user);
|
$result = $this->create($user, $notrigger);
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user