Commit f9818ff6 authored by Robert Lyon's avatar Robert Lyon

Modified session variable setting in ADOdb adodb-pager.inc.php

Bug 1539346

Was originally part of commit 55a8deb8
but have moved it out to own patch for purposes of adodb version update

Change-Id: Ifba78f8e1cd57d9489c737fd69ee45a8218d157b
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent c7ec603c
......@@ -11,4 +11,4 @@ Modifications:
- Check for valid columns in adodb postgres64 driver MetaIndexes fn (b87d9961020a8d52a2eaf709a9197520b3c6b65b)
- add __wakeup to connection object (417077459037550239fe9b09bd20b50d4c19b57f)
- Deleted many files we're not using, including tests, docs, other drivers, other error langs
- Modified session variable setting from $_SESSION to $SESSION->set/get due to sessions now normally being closed.
......@@ -59,7 +59,7 @@ class ADODB_Pager {
//
function __construct(&$db,$sql,$id = 'adodb', $showPageLinks = false)
{
global $PHP_SELF;
global $PHP_SELF, $SESSION;
$curr_page = $id.'_curr_page';
if (!empty($PHP_SELF)) $PHP_SELF = htmlspecialchars($_SERVER['PHP_SELF']); // htmlspecialchars() to prevent XSS attacks
......@@ -72,11 +72,11 @@ class ADODB_Pager {
$next_page = $id.'_next_page';
if (isset($_GET[$next_page])) {
$_SESSION[$curr_page] = (integer) $_GET[$next_page];
$SESSION->set($curr_page, (integer) $_GET[$next_page]);
}
if (empty($_SESSION[$curr_page])) $_SESSION[$curr_page] = 1; ## at first page
if (empty($SESSION->get($curr_page))) $SESSION->set($curr_page, 1); ## at first page
$this->curr_page = $_SESSION[$curr_page];
$this->curr_page = $SESSION->get($curr_page);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment