Commit 9a4fb33b authored by Robert Lyon's avatar Robert Lyon Committed by Cecilia Vela Gurovic
Browse files

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

Bug 1672867

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

(cherry-picked from f9818ff6

)

behatnotneeded

Change-Id: Ie76bbe5b6b015246937b90b2782c0398243a69b8
Signed-off-by: Cecilia Vela Gurovic's avatarCecilia Vela Gurovic <ceciliavg@catalyst.net.nz>
parent aebf3060
...@@ -59,7 +59,7 @@ class ADODB_Pager { ...@@ -59,7 +59,7 @@ class ADODB_Pager {
// //
function __construct(&$db,$sql,$id = 'adodb', $showPageLinks = false) function __construct(&$db,$sql,$id = 'adodb', $showPageLinks = false)
{ {
global $PHP_SELF; global $PHP_SELF, $SESSION;
$curr_page = $id.'_curr_page'; $curr_page = $id.'_curr_page';
if (!empty($PHP_SELF)) $PHP_SELF = htmlspecialchars($_SERVER['PHP_SELF']); // htmlspecialchars() to prevent XSS attacks if (!empty($PHP_SELF)) $PHP_SELF = htmlspecialchars($_SERVER['PHP_SELF']); // htmlspecialchars() to prevent XSS attacks
...@@ -72,11 +72,11 @@ class ADODB_Pager { ...@@ -72,11 +72,11 @@ class ADODB_Pager {
$next_page = $id.'_next_page'; $next_page = $id.'_next_page';
if (isset($_GET[$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);
} }
......
Supports Markdown
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