function applyChange($qcid) { //grab tip data from tip id $dbr = wfGetDB(DB_SLAVE); $tipid = $dbr->selectField('qc', array('qc_extra'), array('qc_id' => $qcid)); list($tip_user, $the_tip, $tip_page) = self::getTipData($tipid); //use TipsPatrol's functions $res = TipsPatrol::keepTip($tipid, $tip_page, $the_tip); if ($res) { TipsPatrol::deleteTip($tipid, $tip_page, $the_tip, true, true); } return $res; }
function applyChange($qcid) { //grab tip data from tip id $dbr = wfGetDB(DB_SLAVE); $res = $dbr->select('qc', array('qc_extra', 'qc_user'), array('qc_id' => $qcid), __METHOD__); foreach ($res as $row) { $tipId = $row->qc_extra; $tipUserId = $row->qc_user; } $tipData = TipsPatrol::getTipData($tipId, $tipUserId); $tipText = $tipData['tw_tip']; $tipPage = $tipData['tw_page']; //use TipsPatrol's functions $res = TipsPatrol::keepTip($tipId, $tipPage, $tipText); if ($res) { TipsPatrol::deleteTipFromLog($tipId); } return $res; }