PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » HTML » Pager » Bug #1263

default for getPerPageSelectBox only from session

Details

Submitted2004-04-22 16:32 UTC
Fromtobias dot nix at web dot de
Assignedquipo
StatusClosed
PackagePager
PHP VersionIrrelevant
OSIrrelevant
Roadmaps(Not assigned)

Comments

[2004-04-22 16:32 UTC] tobias dot nix at web dot de

Description:
------------
In function getPerPageSelectBox the select default only comes from $_Session or $start.

if (!empty($_SESSION[$this->_sessionVar])) {
$selected = (int)$_SESSION[$this->_sessionVar];
} else {
$selected = $start;
}

it should be:

if (!empty($_SESSION[$this->_sessionVar])) {
$selected = (int)$_SESSION[$this->_sessionVar];
} else {
$selected = $this->_perPage;
}

to work without sessions.

Reproduce code:
---------------
Do not use session and the selectbox will always be the start value from functioncall.

Expected result:
----------------
change : $selected = $start;
to : $selected = $this->_perPage;

Actual result:
--------------
no default select value without sessions.