r32947 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r32946‎ | r32947 | r32948 >
Date:08:46, 8 April 2008
Author:aaron
Status:old
Tags:
Comment:
Force index
Modified paths:
  • /trunk/phase3/includes/LogEventsList.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/LogEventsList.php
@@ -493,12 +493,20 @@
494494 # Hack this until live
495495 global $wgAllowLogDeletion;
496496 $log_id = $wgAllowLogDeletion ? 'log_id' : '0 AS log_id';
 497+ # Don't use the wrong logging index
 498+ if( $this->user ) {
 499+ $index = array( 'USE INDEX' => array( 'logging' => 'user_time' ) );
 500+ } else if( $this->title || $this->pattern ) {
 501+ $index = array( 'USE INDEX' => array( 'logging' => 'page_time' ) );
 502+ } else {
 503+ $index = array( 'USE INDEX' => array( 'logging' => 'times' ) );
 504+ }
497505 return array(
498506 'tables' => array( 'logging', 'user' ),
499507 'fields' => array( 'log_type', 'log_action', 'log_user', 'log_namespace', 'log_title',
500508 'log_params', 'log_comment', $log_id, 'log_deleted', 'log_timestamp', 'user_name' ),
501509 'conds' => $this->mConds,
502 - 'options' => array()
 510+ 'options' => $index
503511 );
504512 }
505513

Status & tagging log