Re: Pager and Cookies

From: Date: Thu, 27 Jan 2005 20:39:51 +0000
Subject: Re: Pager and Cookies
References: 1 2 3 4 5  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-17223@lists.php.net to get a copy of this message
Andrew Nagy wrote:
Andrew Nagy wrote:
Andrew Nagy wrote:
Lorenzo Alberton wrote:
if you have the latest release, you can set the current page number with the 'currentPage' option:
Thanks, but it still doesn't seem to work because I have a different page variable, so I would still like to use the 'urlVar' option as well.
Any ideas? Andrew
Maybe something like this: Line 1128: if (isset($_REQUEST[$this->_urlVar]) && !isset($options['currentPage'])) {
    $this->_currentPage = (int)$_REQUEST[$this->_urlVar];
}
Better yet: if (isset($_REQUEST[$this->_urlVar]) &&
    $options['currentPage'] !== null)) {
Long day, here is my diff that I have test and seems to work great RCS file: /repository/pear/Pager/Common.php,v retrieving revision 1.29 diff -r1.29 Common.php 1128c1128
<         if (isset($_REQUEST[$this->_urlVar])) {
---
        if (isset($_REQUEST[$this->_urlVar]) && ($options['currentPage'] === null)) {


« previous php.pear.general (#17223) next »