Re: Pager and Cookies
| From: | Andrew Nagy | 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:if you have the latest release, you can set the current page number with the 'currentPage' option:Lorenzo Alberton wrote: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.
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 1128c1128Better yet: if (isset($_REQUEST[$this->_urlVar]) &&Any ideas? AndrewMaybe something like this: Line 1128: if (isset($_REQUEST[$this->_urlVar]) && !isset($options['currentPage'])) {$this->_currentPage = (int)$_REQUEST[$this->_urlVar];}$options['currentPage'] !== null)) {
< if (isset($_REQUEST[$this->_urlVar])) {
---
if (isset($_REQUEST[$this->_urlVar]) && ($options['currentPage'] === null)) {