Index: branches/robchurch/logs/includes/SpecialLog.php |
— | — | @@ -285,6 +285,9 @@ |
286 | 286 | // Fetch results and form a batch link existence query |
287 | 287 | $batch = new LinkBatch; |
288 | 288 | while ( $s = $result->fetchObject() ) { |
| 289 | + // Target title |
| 290 | + $batch->addObj( Title::makeTitleSafe( $s->log_namespace, $s->log_title ) ); |
| 291 | + |
289 | 292 | // User link |
290 | 293 | $batch->addObj( Title::makeTitleSafe( NS_USER, $s->user_name ) ); |
291 | 294 | $batch->addObj( Title::makeTitleSafe( NS_USER_TALK, $s->user_name ) ); |
— | — | @@ -348,34 +351,19 @@ |
349 | 352 | } |
350 | 353 | |
351 | 354 | /** |
352 | | - * @param Object $s a single row from the result set |
353 | | - * @return string Formatted HTML list item |
354 | | - * @private |
| 355 | + * Format a single result row |
| 356 | + * |
| 357 | + * @param object $row Result row |
| 358 | + * @return string |
355 | 359 | */ |
| 360 | + private function logLine( $row ) { |
| 361 | + $line = LogItem::newFromRow( $row ); |
| 362 | + return $line->format( LogFormatter::NO_DATE ); |
| 363 | + } |
| 364 | + |
| 365 | + /** |
356 | 366 | function logLine( $s ) { |
357 | 367 | |
358 | | - $line = LogItem::newFromRow( $s ); |
359 | | - return $line->format( LogFormatter::NO_DATE ); |
360 | | - |
361 | | - global $wgLang, $wgUser;; |
362 | | - $skin = $wgUser->getSkin(); |
363 | | - $title = Title::makeTitle( $s->log_namespace, $s->log_title ); |
364 | | - $time = $wgLang->time( wfTimestamp(TS_MW, $s->log_timestamp), true ); |
365 | | - |
366 | | - // Enter the existence or non-existence of this page into the link cache, |
367 | | - // for faster makeLinkObj() in LogPage::actionText() |
368 | | - $linkCache =& LinkCache::singleton(); |
369 | | - if( $s->page_id ) { |
370 | | - $linkCache->addGoodLinkObj( $s->page_id, $title ); |
371 | | - } else { |
372 | | - $linkCache->addBadLinkObj( $title ); |
373 | | - } |
374 | | - |
375 | | - $userLink = $this->skin->userLink( $s->log_user, $s->user_name ) . $this->skin->userToolLinksRedContribs( $s->log_user, $s->user_name ); |
376 | | - $comment = $this->skin->commentBlock( $s->log_comment ); |
377 | | - $paramArray = LogPage::extractParams( $s->log_params ); |
378 | | - $revert = ''; |
379 | | - // show revertmove link |
380 | 368 | if ( $s->log_type == 'move' && isset( $paramArray[0] ) ) { |
381 | 369 | $destTitle = Title::newFromText( $paramArray[0] ); |
382 | 370 | if ( $destTitle ) { |
— | — | @@ -411,7 +399,7 @@ |
412 | 400 | $action = LogPage::actionText( $s->log_type, $s->log_action, $title, $this->skin, $paramArray, true, true ); |
413 | 401 | $out = "$time $userLink $action $comment $revert"; |
414 | 402 | return $out; |
415 | | - } |
| 403 | + }*/ |
416 | 404 | |
417 | 405 | /** |
418 | 406 | * @param OutputPage &$out where to send output |