|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-08-19 16:57 UTC] 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
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 21:00:01 2025 UTC |
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.