Exemplo n.º 1
0
 function getNextInnards($qc_type, $by_username)
 {
     // grab the next check
     $result = array();
     $c = QCRule::getNextToPatrol($qc_type, $by_username);
     if ($c) {
         // qc_vote, qc_skip
         $result['title'] = "<a href='{$c->mTitle->getLocalURL()}'>{$c->mTitle->getText()}</a>";
         $result['question'] = $c->getPrompt();
         $result['qctabs'] = $this->getTabs($qc_type);
         $result['choices'] = $this->getSubmenu();
         $result['buttons'] = $this->getButtons();
         $result['quickedit'] = $this->getQuickEditLink($c->mTitle);
         $result['html'] = $c->getNextToPatrolHTML();
         $result['qc_id'] = $c->mResult->qc_id;
         $result['sql'] = $c->sql;
     } else {
         $result['done'] = 1;
         $result['title'] = wfMsg('quality_control');
         $result['qctabs'] = $this->getTabs($qc_type);
         $result['msg'] = "<div id='qg_submenu'><div id='qg_options'></div></div>\n\t\t\t\t\t\t\t\t\t\t<div id='qc_head' class='tool_header'>\n\t\t\t\t\t\t\t\t\t\t<p class='qc_alldone'>" . wfMsg('qc_congrats') . "</p>\n\t\t\t\t\t\t\t\t\t\t<p>" . wfMsg('qc_congrats_2') . "</p>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div id='qc_box'></div>";
     }
     return $result;
 }
Exemplo n.º 2
0
 private function getNext()
 {
     wfProfileIn(__METHOD__);
     $qgItem = QCRule::getNextToPatrol('changedintroimage', null);
     if ($qgItem) {
         $this->qgItem = $qgItem;
         $revId = $qgItem->mResult->qc_rev_id;
         $this->r = Revision::newFromId($revId);
     }
     wfProfileOut(__METHOD__);
     return $qgItem;
 }