$sql = "SELECT log_type, log_action, log_timestamp,
log_user, user_name,
log_namespace, log_title, page_id,
- log_comment FROM $user, $logging ";
+ log_comment, log_params FROM $user, $logging ";
if( !empty( $this->joinClauses ) ) {
$sql .= implode( ',', $this->joinClauses );
}
* @param OutputPage $out where to send output
*/
function showList( &$out ) {
- $html = "";
+ $html = "\n<ul>\n";
$result = $this->reader->getRows();
while( $s = $result->fetchObject() ) {
$html .= $this->logLine( $s );
}
$result->free();
+ $html .= "\n</ul>\n";
$out->addHTML( $html );
}
global $wgLang;
$title = Title::makeTitle( $s->log_namespace, $s->log_title );
$user = Title::makeTitleSafe( NS_USER, $s->user_name );
- $time = $wgLang->timeanddate( $s->log_timestamp );
+ $time = $wgLang->timeanddate( $s->log_timestamp, true );
if( $s->page_id ) {
$titleLink = $this->skin->makeKnownLinkObj( $title );
} else {
$titleLink = $this->skin->makeBrokenLinkObj( $title );
}
$userLink = $this->skin->makeLinkObj( $user, htmlspecialchars( $s->user_name ) );
- if( '' === $s->log_comment ) {
- $comment = '';
- } else {
- $comment = '(<em>' . $this->skin->formatComment( $s->log_comment ) . '</em>)';
- }
+ $comment = $this->skin->commentBlock( $s->log_comment );
+ $paramArray = LogPage::extractParams( $s->log_params );
- $action = LogPage::actionText( $s->log_type, $s->log_action, $titleLink );
+ $action = LogPage::actionText( $s->log_type, $s->log_action, $titleLink, $paramArray );
$out = "<li>$time $userLink $action $comment</li>\n";
return $out;
}
*/
function getUserInput() {
$user = htmlspecialchars( $this->reader->queryUser() );
- return "User: <input type='text' name='user' size='12' value=\"$user\" />\n";
+ return wfMsg('specialloguserlabel') . "<input type='text' name='user' size='12' value=\"$user\" />\n";
}
/**
*/
function getTitleInput() {
$title = htmlspecialchars( $this->reader->queryTitle() );
- return "Title: <input type='text' name='page' size='20' value=\"$title\" />\n";
+ return wfMsg('speciallogtitlelabel') . "<input type='text' name='page' size='20' value=\"$title\" />\n";
}
/**
* @private
*/
function showPrevNext( &$out ) {
- global $wgContLang;
+ global $wgContLang,$wgRequest;
$pieces = array();
$pieces[] = 'type=' . htmlspecialchars( $this->reader->queryType() );
$pieces[] = 'user=' . htmlspecialchars( $this->reader->queryUser() );
$pieces[] = 'page=' . htmlspecialchars( $this->reader->queryTitle() );
$bits = implode( '&', $pieces );
- $offset = 0; $limit = 50;
+ list( $limit, $offset ) = $wgRequest->getLimitOffset();
# TODO: use timestamps instead of offsets to make it more natural
# to go huge distances in time