From: Aaron Schulz Date: Tue, 27 May 2008 00:13:06 +0000 (+0000) Subject: Actually offset correctly X-Git-Tag: 1.31.0-rc.0~47366 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/modifier.php?a=commitdiff_plain;h=f220f39fc0660337fd684cdbb47d8019ac15f504;p=lhc%2Fweb%2Fwiklou.git Actually offset correctly --- diff --git a/includes/SpecialWhatlinkshere.php b/includes/SpecialWhatlinkshere.php index b7eec6e4d2..f5e6ca3bea 100644 --- a/includes/SpecialWhatlinkshere.php +++ b/includes/SpecialWhatlinkshere.php @@ -380,6 +380,7 @@ class WhatLinksHerePager extends AlphabeticPager { $conds = isset( $info['conds'] ) ? $info['conds'] : array(); $options = isset( $info['options'] ) ? $info['options'] : array(); $join_conds = isset( $info['join_conds'] ) ? $info['join_conds'] : array(); + $pagefield = $options['ORDER BY']; if ( $descending ) { $operator = '>'; } else { @@ -387,7 +388,7 @@ class WhatLinksHerePager extends AlphabeticPager { $operator = '<'; } if ( $offset != '' ) { - $conds[] = $this->mIndexField . $operator . $this->mDb->addQuotes( $offset ); + $conds[] = $pagefield . $operator . $this->mDb->addQuotes( $offset ); } $options['LIMIT'] = intval( $limit ); $SQLqueries[] = '('.$this->mDb->selectSQLText( $tables, $fields, $conds, $fname, $options, $join_conds ).')';