/** * HTML formatting function. This takes a single row from the * akismet_edits DB table and returns an HTML string. The rows are * concatenated together by the super class. * * Overrides the function in the parent class. * * @param $row Object: database row * @return String */ function formatRow($row) { $edit_id = $row->id; $page_id = $row->page_id; $timestamp = wfTimestamp(TS_RFC2822, $row->timestamp); $username = $row->username; $difftext = $row->html_diff; return AkismetEdit::createUserJudgeHTML($edit_id, $page_id, $timestamp, $username, $difftext); }
function execute($par) { global $wgOut; $db =& wfGetDB(DB_SLAVE); $this->setHeaders(); $wgOut->addModuleStyles('mediawiki.action.history.diff'); $rowcount = AkismetEdit::getSpamEditsCount(); $specialPageCSS = $this->getPageCSS(); $wgOut->addHTML($specialPageCSS); $wgOut->addHTML(wfMsg('num-spam-edits', $rowcount) . "<br /><br />"); // The Pager provides pagination of the edits $pager = new AkismetEditPager(); if ($pager->getNumRows()) { $wgOut->addHtml('<form action="" method="post">'); $wgOut->addHTML($pager->getNavigationBar() . $pager->getBody() . $pager->getNavigationBar()); $wgOut->addHtml('<div class="spam-submit-button"><button type="submit">' . wfMsg('save') . '</button></div>'); $wgOut->addHtml('</form>'); } }