From f220f39fc0660337fd684cdbb47d8019ac15f504 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Tue, 27 May 2008 00:13:06 +0000 Subject: [PATCH] Actually offset correctly --- includes/SpecialWhatlinkshere.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 ).')'; -- 2.20.1