Exemple #1
0
 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;
 }