private function addToQG($tipId, $articleId, $tip) { $title = Title::newFromID($articleId); if ($title) { $article = new Article($title); if ($article) { //Add it to the QG queue $l = new QCRuleTip($article, $tipId); $qcId = $l->process(); //log it $logPage = new LogPage('newtips', false); $logData = array($tipId); $logMsg = wfMessage('newtips-sentToQG-logentry', $title->getFullText(), $tip)->text(); $logS = $logPage->addEntry("Approved", $title, $logMsg, $logData); } } return $qcId; }
private function addToQG($tipId, $articleId, $tip, &$result) { $title = Title::newFromID($articleId); if ($title) { $article = new Article($title); if ($article) { //Add it to the QG queue $l = new QCRuleTip($article, $tipId); $l->process(); //remove it from Tips Patrol queue $dbw = wfGetDB(DB_MASTER); $dbw->delete('tipsandwarnings', array('tw_id' => $tipId), __METHOD__); //log it $logPage = new LogPage('newtips', false); $logData = array($tipId); $logMsg = wfMsg('newtips-sentToQG-logentry', $title->getFullText(), $tip); $logS = $logPage->addEntry("Approved", $title, $logMsg, $logData); $result['debug'][] = "processed"; } } return; }