From 9b682e095f02d78f937e1f2bf49b4d9400e19fbd Mon Sep 17 00:00:00 2001 From: phf Date: Wed, 13 Jan 2016 14:41:32 +0100 Subject: [PATCH] FIX can't clone event --- htdocs/comm/action/class/actioncomm.class.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 27cdedc4e1e..2e20005420c 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -418,6 +418,20 @@ class ActionComm extends CommonObject $this->id=0; + if (!is_object($fuser)) + { + if ($fuser > 0) + { + $u = new User($db); + $u->fetch($fuser); + $fuser = $u; + } + else + { + $fuser = $user; + } + } + // Create clone $result=$this->add($fuser); if ($result < 0) $error++;