X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FSpecialLog.php;h=76cfd5ef8091568b3854d9f355d646f6da5e60b6;hb=3f7fe13247c19fc02e48c9b50bafb9e1c0d07700;hp=6d6dbbb3f2bef5546075540f01e1de61c1882b8b;hpb=64ac6b8e775dd8582ea9cc5f24235488f076c5b3;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/SpecialLog.php b/includes/SpecialLog.php index 6d6dbbb3f2..76cfd5ef80 100644 --- a/includes/SpecialLog.php +++ b/includes/SpecialLog.php @@ -146,7 +146,7 @@ class LogReader { $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 ); } @@ -231,12 +231,13 @@ class LogViewer { * @param OutputPage $out where to send output */ function showList( &$out ) { - $html = ""; + $html = "\n\n"; $out->addHTML( $html ); } @@ -249,20 +250,17 @@ class LogViewer { 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 = '(' . $this->skin->formatComment( $s->log_comment ) . ')'; - } + $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 = "
  • $time $userLink $action $comment
  • \n"; return $out; } @@ -318,7 +316,7 @@ class LogViewer { */ function getUserInput() { $user = htmlspecialchars( $this->reader->queryUser() ); - return "User: \n"; + return wfMsg('specialloguserlabel') . "\n"; } /** @@ -327,7 +325,7 @@ class LogViewer { */ function getTitleInput() { $title = htmlspecialchars( $this->reader->queryTitle() ); - return "Title: \n"; + return wfMsg('speciallogtitlelabel') . "\n"; } /** @@ -335,13 +333,13 @@ class LogViewer { * @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