From 1fabaea9309f8f2e55bf877292b452862c82c16a Mon Sep 17 00:00:00 2001 From: hjonathan Date: Fri, 25 Aug 2017 12:07:35 -0400 Subject: [PATCH] HOR-3796 update update udpate --- .../classes/model/ListParticipatedLast.php | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/workflow/engine/classes/model/ListParticipatedLast.php b/workflow/engine/classes/model/ListParticipatedLast.php index aba75b537..56962c98e 100644 --- a/workflow/engine/classes/model/ListParticipatedLast.php +++ b/workflow/engine/classes/model/ListParticipatedLast.php @@ -503,4 +503,26 @@ class ListParticipatedLast extends BaseListParticipatedLast return (int) $aRow['TOTAL']; } + + /** + * @deprecated This function is deprecated, it hasn’t been removed because of its compatibility with the External Registration plugin + * @param $where + * @param $set + * @return void + */ + public function updateCurrentUser($where, $set) + { + $con = Propel::getConnection('workflow'); + //Update - WHERE + $criteriaWhere = new Criteria('workflow'); + $criteriaWhere->add(ListParticipatedLastPeer::APP_UID, $where['APP_UID'], Criteria::EQUAL); + $criteriaWhere->add(ListParticipatedLastPeer::USR_UID, $where['USR_UID'], Criteria::EQUAL); + $criteriaWhere->add(ListParticipatedLastPeer::DEL_INDEX, $where['DEL_INDEX'], Criteria::EQUAL); + //Update - SET + $criteriaSet = new Criteria('workflow'); + foreach ($set as $k => $v) { + eval('$criteriaSet->add( ListParticipatedLastPeer::' . $k . ',$v, Criteria::EQUAL);'); + } + BasePeer::doUpdate($criteriaWhere, $criteriaSet, $con); + } }