Merge pull request #21200 from leninrivas/patch-5
Save usermodid to updatePercent
This commit is contained in:
commit
a48b032dd8
@ -2513,14 +2513,16 @@ class ActionComm extends CommonObject
|
|||||||
*
|
*
|
||||||
* @param int $id The id of the event
|
* @param int $id The id of the event
|
||||||
* @param int $percent The new percent value for 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
|
* @return int 1 when update of the event was suscessfull, otherwise -1
|
||||||
*/
|
*/
|
||||||
public function updatePercent($id, $percent)
|
public function updatePercent($id, $percent, $usermodid = 0)
|
||||||
{
|
{
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."actioncomm ";
|
$sql = "UPDATE ".MAIN_DB_PREFIX."actioncomm ";
|
||||||
$sql .= " SET percent = ".(int) $percent;
|
$sql .= " SET percent = ".(int) $percent;
|
||||||
|
if ($usermodid > 0) $sql .= ", fk_user_mod = ".$usermodid;
|
||||||
$sql .= " WHERE id = ".((int) $id);
|
$sql .= " WHERE id = ".((int) $id);
|
||||||
|
|
||||||
if ($this->db->query($sql)) {
|
if ($this->db->query($sql)) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user