#25159 [Fbk->Opn]: getPerPageSelectBox doesn't works

From: Date: Tue, 02 Sep 2003 12:23:37 +0000
Subject: #25159 [Fbk->Opn]: getPerPageSelectBox doesn't works
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-20988@lists.php.net to get a copy of this message
ID: 25159 User updated by: maka3d at yahoo dot com dot br Reported By: maka3d at yahoo dot com dot br -Status: Feedback +Status: Open Bug Type: PEAR related Operating System: WINXP PHP Version: 4.3.2 Assigned To: quipo New Comment: Very Thanks, I'll try it now. Previous Comments: ------------------------------------------------------------------------ [2003-09-01 17:10:59] quipo@php.net please check CVS version. The _perPage var should be stored in the session now. ------------------------------------------------------------------------ [2003-09-01 09:31:42] quipo@php.net I've just come back home. I'll have a look ASAP. ------------------------------------------------------------------------ [2003-08-20 13:18:12] maka3d at yahoo dot com dot br what about a solution for getPerPageSelectBox? ------------------------------------------------------------------------ [2003-08-20 04:01:48] nicos@php.net Index: Sliding.php =================================================================== RCS file: /repository/pear/Pager_Sliding/Sliding.php,v retrieving revision 1.15 diff -u -u -r1.15 Sliding.php --- Sliding.php 15 Jul 2003 22:25:33 -0000 1.15 +++ Sliding.php 20 Aug 2003 08:58:26 -0000 @@ -895,7 +895,7 @@ } //prevent URL manual modification - $this->_currentPage = min($this->_currentPage, $this->_totalPages); + $this->_currentPage = min($this->_currentPage, $this->_totalPages); } @@ -930,8 +930,6 @@ */ function _getLinksUrl() { - global $_SERVER; - // Sort out query string to prevent messy urls $querystring = array(); $qs = array(); @@ -985,8 +983,6 @@ */ function _setOptions($options) { - global $_GET, $_REQUEST, $_SESSION; - $allowed_options = array( 'totalItems', 'perPage', @@ -1079,4 +1075,4 @@ // }}} } -?> \ No newline at end of file +?> Btw I wonder if Lorenzo Alberton knows that if (!empty($_SESSION["$this->_sessionVar"])) is just stupid, it should be if (!empty($_SESSION[$this->_sessionVar]))... Everywhere. ------------------------------------------------------------------------ [2003-08-19 16:57:43] maka3d at yahoo dot com dot br Description: ------------ The getPerPageSelectBox method of Pager_Sliding Class doesn't memorize the _perPage inside a session Reproduce code: --------------- function _setOptions($options){ session_start(); // should have a session_start to be able to read and write the $_SESSION array global $_GET, $_REQUEST, $_SESSION; // and should take off this line or put it before session_start() cause it rewrite the $_SESSION array created before with session_start() ... session_write_close() // and add a session_write_close() at the end of the method ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=25159&edit=1

« previous php.pear.dev (#20988) next »