/** * Convenience function to build an HTML radio button with a label * @return string HTML */ function wfRadioLabel($label, $name, $value, $id, $checked = false, $attribs = array()) { return wfRadio($name, $checked, $value, array('id' => $id) + $attribs) . ' ' . wfLabel($label, $id); }
function formatRevisionRow($row) { global $wgUser, $wgLang; $rev = new Revision($row); $stxt = ''; $last = $this->message['last']; $ts = wfTimestamp(TS_MW, $row->rev_timestamp); $checkBox = wfRadio("mergepoint", $ts, false); $pageLink = $this->sk->makeKnownLinkObj($rev->getTitle(), htmlspecialchars($wgLang->timeanddate($ts)), 'oldid=' . $rev->getID()); if ($rev->isDeleted(Revision::DELETED_TEXT)) { $pageLink = '<span class="history-deleted">' . $pageLink . '</span>'; } # Last link if (!$rev->userCan(Revision::DELETED_TEXT)) { $last = $this->message['last']; } else { if (isset($this->prevId[$row->rev_id])) { $last = $this->sk->makeKnownLinkObj($rev->getTitle(), $this->message['last'], "&diff=" . $row->rev_id . "&oldid=" . $this->prevId[$row->rev_id]); } } $userLink = $this->sk->revUserTools($rev); if (!is_null($size = $row->rev_len)) { if ($size == 0) { $stxt = wfMsgHtml('historyempty'); } else { $stxt = wfMsgHtml('historysize', $wgLang->formatNum($size)); } } $comment = $this->sk->revComment($rev); return "<li>{$checkBox} ({$last}) {$pageLink} . . {$userLink} {$stxt} {$comment}</li>"; }