From: mwalker Date: Mon, 24 Sep 2012 23:35:24 +0000 (-0700) Subject: Fixing bug where end limit would not be calculated X-Git-Tag: 1.31.0-rc.0~22276 X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=b5b55ec0262361874f9f5a607f8ed49dfda62a6b;p=lhc%2Fweb%2Fwiklou.git Fixing bug where end limit would not be calculated In the pager object, if the query was constructed such that the index was a fully qualified field then the 'past the end' index reference would not get computed. This is because $mIndexField stores the FQ field name but $mPastTheEndRow is indexed on the non FQ name. Therefore a warning would be generated due to a non existent array key. Change-Id: I52e1cbc8f7dad07de1ba5ba3bdfa2d107dfb4d93 --- diff --git a/includes/Pager.php b/includes/Pager.php index 96ba446e55..077430d27d 100644 --- a/includes/Pager.php +++ b/includes/Pager.php @@ -287,8 +287,7 @@ abstract class IndexPager extends ContextSource implements Pager { if ( $numRows > $this->mLimit && $numRows > 1 ) { $res->seek( $numRows - 1 ); $this->mPastTheEndRow = $res->fetchObject(); - $indexField = $this->mIndexField; - $this->mPastTheEndIndex = $this->mPastTheEndRow->$indexField; + $this->mPastTheEndIndex = $this->mPastTheEndRow->$indexColumn; $res->seek( $numRows - 2 ); $row = $res->fetchRow(); $lastIndex = $row[$indexColumn];