protected function showQueues() { global $wgAccountRequestTypes; $out = $this->getOutput(); $out->addWikiMsg('confirmaccount-maintext'); $out->wrapWikiMsg("<p><strong>\$1</strong></p>", 'confirmaccount-types'); # List each queue and some information about it... $out->addHTML('<ul>'); foreach ($wgAccountRequestTypes as $i => $params) { $titleObj = SpecialPage::getTitleFor('ConfirmAccounts', $params[0]); $counts = ConfirmAccount::getOpenRequestCount($i); $open = '<b>'; $open .= Linker::makeKnownLinkObj($titleObj, $this->msg('confirmaccount-q-open')->escaped(), 'wpShowHeld=0'); $open .= '</b> [' . $counts['open'] . ']'; $held = Linker::makeKnownLinkObj($titleObj, $this->msg('confirmaccount-q-held')->escaped(), 'wpShowHeld=1'); $held .= ' [' . $counts['held'] . ']'; $rejects = Linker::makeKnownLinkObj($titleObj, $this->msg('confirmaccount-q-rej')->escaped(), 'wpShowRejects=1'); $rejects .= ' [' . $counts['rejected'] . ']'; $stale = '<i>'; $stale .= Linker::makeKnownLinkObj($titleObj, $this->msg('confirmaccount-q-stale')->escaped(), 'wpShowStale=1'); $stale .= '</i>'; // Give grep a chance to find the usages: confirmaccount-type-0, confirmaccount-type-1 $out->addHTML("<li><i>" . $this->msg("confirmaccount-type-{$i}")->escaped() . "</i>"); $out->addHTML($this->msg('word-separator')->plain()); $params = $this->getLanguage()->pipeList(array($open, $held, $rejects, $stale)); $out->addHTML($this->msg('parentheses')->rawParams($params)->escaped()); $out->addHTML('</li>'); } $out->addHTML('</ul>'); }
protected function showQueues() { global $wgAccountRequestTypes; $out = $this->getOutput(); $out->addWikiMsg('confirmaccount-maintext'); $out->addHTML('<p><strong>' . wfMsgHtml('confirmaccount-types') . '</strong></p>'); # List each queue and some information about it... $out->addHTML('<ul>'); foreach ($wgAccountRequestTypes as $i => $params) { $titleObj = SpecialPage::getTitleFor('ConfirmAccounts', $params[0]); $counts = ConfirmAccount::getOpenRequestCount($i); $open = '<b>' . Linker::makeKnownLinkObj($titleObj, wfMsgHtml('confirmaccount-q-open'), wfArrayToCGI(array('wpShowHeld' => 0))) . '</b>'; $open .= ' [' . $counts['open'] . ']'; $held = Linker::makeKnownLinkObj($titleObj, wfMsgHtml('confirmaccount-q-held'), wfArrayToCGI(array('wpShowHeld' => 1))); $held .= ' [' . $counts['held'] . ']'; $rejects = Linker::makeKnownLinkObj($titleObj, wfMsgHtml('confirmaccount-q-rej'), wfArrayToCGI(array('wpShowRejects' => 1))); $rejects .= ' [' . $counts['rejected'] . ']'; $stale = '<i>' . Linker::makeKnownLinkObj($titleObj, wfMsgHtml('confirmaccount-q-stale'), wfArrayToCGI(array('wpShowStale' => 1))) . '</i>'; $out->addHTML("<li><i>" . wfMsgHtml("confirmaccount-type-{$i}") . "</i> (" . $this->getLang()->pipeList(array($open, $held, $rejects, $stale)) . ")</li>"); } $out->addHTML('</ul>'); }