X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Flogging%2FLogPager.php;h=f79fcfa61cf50ac8aa3ec8f7ae41ba3dddd28562;hb=313dde5d06c42be1eb7da9127ec92bb5d360ddab;hp=ea28ff202e86f2d8d373e1aca6963f3be4ad67d7;hpb=967bbcf52546a6e260ec76ffff5b59c464189969;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/logging/LogPager.php b/includes/logging/LogPager.php index ea28ff202e..f79fcfa61c 100644 --- a/includes/logging/LogPager.php +++ b/includes/logging/LogPager.php @@ -2,7 +2,7 @@ /** * Contain classes to list log entries * - * Copyright © 2004 Brion Vibber , 2008 Aaron Schulz + * Copyright © 2004 Brion Vibber * https://www.mediawiki.org/ * * This program is free software; you can redistribute it and/or modify @@ -49,8 +49,6 @@ class LogPager extends ReverseChronologicalPager { public $mLogEventsList; /** - * Constructor - * * @param LogEventsList $list * @param string|array $types Log types to show * @param string $performer The user who made the log entries @@ -305,14 +303,13 @@ class LogPager extends ReverseChronologicalPager { $options = $basic['options']; $joins = $basic['join_conds']; - $index = []; # Add log_search table if there are conditions on it. # This filters the results to only include log rows that have # log_search records with the specified ls_field and ls_value values. if ( array_key_exists( 'ls_field', $this->mConds ) ) { $tables[] = 'log_search'; - $index['log_search'] = 'ls_field_val'; - $index['logging'] = 'PRIMARY'; + $options['IGNORE INDEX'] = [ 'log_search' => 'ls_log_id' ]; + $options['USE INDEX'] = [ 'logging' => 'PRIMARY' ]; if ( !$this->hasEqualsClause( 'ls_field' ) || !$this->hasEqualsClause( 'ls_value' ) ) { @@ -322,9 +319,6 @@ class LogPager extends ReverseChronologicalPager { $options[] = 'DISTINCT'; } } - if ( count( $index ) ) { - $options['USE INDEX'] = $index; - } # Don't show duplicate rows when using log_search $joins['log_search'] = [ 'INNER JOIN', 'ls_log_id=log_id' ];