From b57a9d589645a7f06891c129be7369d5968e948a Mon Sep 17 00:00:00 2001 From: Lenin Rivas <53640168+leninrivas@users.noreply.github.com> Date: Fri, 10 Jun 2022 05:58:01 -0500 Subject: [PATCH 1/2] Save usermodid to updatePercent --- htdocs/comm/action/class/actioncomm.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 19eb35376cd..831c64d2553 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -2515,12 +2515,13 @@ class ActionComm extends CommonObject * @param int $percent The new percent value for the event * @return int 1 when update of the event was suscessfull, otherwise -1 */ - public function updatePercent($id, $percent) + public function updatePercent($id, $percent, $usermodid) { $this->db->begin(); $sql = "UPDATE ".MAIN_DB_PREFIX."actioncomm "; $sql .= " SET percent = ".(int) $percent; + if ($usermodid > 0) $sql .= ", fk_user_mod = ".$usermodid; $sql .= " WHERE id = ".((int) $id); if ($this->db->query($sql)) { From 503a5cdc82713b86e425a89efc2ab61197991833 Mon Sep 17 00:00:00 2001 From: Lenin Rivas <53640168+leninrivas@users.noreply.github.com> Date: Sun, 12 Jun 2022 06:33:42 -0500 Subject: [PATCH 2/2] Add user who modified the percent --- htdocs/comm/action/class/actioncomm.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 831c64d2553..156d5573ae8 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -2513,9 +2513,10 @@ class ActionComm extends CommonObject * * @param int $id The id of the event * @param int $percent The new percent value for the event + * @param int $usermodid The user who modified the percent * @return int 1 when update of the event was suscessfull, otherwise -1 */ - public function updatePercent($id, $percent, $usermodid) + public function updatePercent($id, $percent, $usermodid = 0) { $this->db->begin();