Index: trunk/phase3/includes/LogEventsList.php |
— | — | @@ -158,19 +158,15 @@ |
159 | 159 | */ |
160 | 160 | public function logLine( $row ) { |
161 | 161 | global $wgLang, $wgUser, $wgContLang; |
162 | | - $skin = $wgUser->getSkin(); |
| 162 | + |
163 | 163 | $title = Title::makeTitle( $row->log_namespace, $row->log_title ); |
164 | 164 | $time = $wgLang->timeanddate( wfTimestamp(TS_MW, $row->log_timestamp), true ); |
165 | | - // Enter the existence or non-existence of this page into the link cache, |
166 | | - // for faster makeLinkObj() in LogPage::actionText() |
167 | | - $linkCache =& LinkCache::singleton(); |
168 | | - $linkCache->addLinkObj( $title ); |
169 | 165 | // User links |
170 | 166 | if( self::isDeleted($row,LogPage::DELETED_USER) ) { |
171 | 167 | $userLink = '<span class="history-deleted">' . wfMsgHtml( 'rev-deleted-user' ) . '</span>'; |
172 | 168 | } else { |
173 | | - $userLink = $this->skin->userLink( $row->log_user, $row->user_name ) . |
174 | | - $this->skin->userToolLinksRedContribs( $row->log_user, $row->user_name ); |
| 169 | + $userLink = $this->skin->userLink( $row->log_user, $row->user_name ); |
| 170 | + $this->skin->userToolLinks( $row->log_user, $row->user_name ); |
175 | 171 | } |
176 | 172 | // Comment |
177 | 173 | if( self::isDeleted($row,LogPage::DELETED_COMMENT) ) { |
— | — | @@ -496,10 +492,8 @@ |
497 | 493 | global $wgAllowLogDeletion; |
498 | 494 | $log_id = $wgAllowLogDeletion ? 'log_id' : '0 AS log_id'; |
499 | 495 | # Don't use the wrong logging index |
500 | | - if( $this->title || $this->pattern ) { |
501 | | - $index = array( 'USE INDEX' => array( 'logging' => 'page_time' ) ); |
502 | | - } else if( $this->user ) { |
503 | | - $index = array( 'USE INDEX' => array( 'logging' => 'user_time' ) ); |
| 496 | + if( $this->title || $this->pattern || $this->user ) { |
| 497 | + $index = array( 'USE INDEX' => array( 'logging' => array('page_time','user_time') ) ); |
504 | 498 | } else if( $this->type ) { |
505 | 499 | $index = array( 'USE INDEX' => array( 'logging' => 'type_time' ) ); |
506 | 500 | } else { |
— | — | @@ -517,6 +511,21 @@ |
518 | 512 | function getIndexField() { |
519 | 513 | return 'log_timestamp'; |
520 | 514 | } |
| 515 | + |
| 516 | + function getStartBody() { |
| 517 | + wfProfileIn( __METHOD__ ); |
| 518 | + # Do a link batch query |
| 519 | + $lb = new LinkBatch; |
| 520 | + while( $row = $this->mResult->fetchObject() ) { |
| 521 | + $lb->add( $row->log_namespace, $row->log_title ); |
| 522 | + $lb->addObj( Title::makeTitleSafe( NS_USER, $row->user_name ) ); |
| 523 | + $lb->addObj( Title::makeTitleSafe( NS_USER_TALK, $row->user_name ) ); |
| 524 | + } |
| 525 | + $lb->execute(); |
| 526 | + $this->mResult->seek( 0 ); |
| 527 | + wfProfileOut( __METHOD__ ); |
| 528 | + return ''; |
| 529 | + } |
521 | 530 | |
522 | 531 | function formatRow( $row ) { |
523 | 532 | return $this->mLogEventsList->logLine( $row ); |