From: Jehan-Guillaume (ioguix) de Rorthais Date: Tue, 5 Jul 2011 21:20:32 +0000 (+0200) Subject: Fix bug #3353670: Error when executing a report with paging X-Git-Tag: REL_5-0-3~4 X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=deaaf8ba59be2f72b723fc575b16655dbc0aacd5;p=phppgadmin.git Fix bug #3353670: Error when executing a report with paging --- diff --git a/display.php b/display.php index 07e62f02..c36739ae 100644 --- a/display.php +++ b/display.php @@ -438,7 +438,12 @@ $_SESSION['sqlquery'] = $_REQUEST['query']; $misc->printTitle($lang['strselect']); $type = 'SELECT'; - } else { + } + else if (isset($_REQUEST['report'])) { + $misc->printTitle($lang['strselect']); + $type = 'SELECT'; + } + else { $misc->printTitle($lang['strbrowse']); $type = 'TABLE'; } @@ -474,7 +479,7 @@ // Retrieve page from query. $max_pages is returned by reference. $rs = $data->browseQuery($type, isset($object) ? $object : null, - isset($_REQUEST['query']) ? $_REQUEST['query'] : null, + isset($_SESSION['sqlquery']) ? $_SESSION['sqlquery'] : null, $_REQUEST['sortkey'], $_REQUEST['sortdir'], $_REQUEST['page'], $conf['max_rows'], $max_pages); @@ -485,6 +490,7 @@ if (isset($object)) $gets .= "&" . urlencode($subject) . '=' . urlencode($object); if (isset($subject)) $gets .= "&subject=" . urlencode($subject); if (isset($_REQUEST['query'])) $gets .= "&query=" . urlencode($_REQUEST['query']); + if (isset($_REQUEST['report'])) $gets .= "&report=" . urlencode($_REQUEST['report']); if (isset($_REQUEST['count'])) $gets .= "&count=" . urlencode($_REQUEST['count']); if (isset($_REQUEST['return_url'])) $gets .= "&return_url=" . urlencode($_REQUEST['return_url']); if (isset($_REQUEST['return_desc'])) $gets .= "&return_desc=" . urlencode($_REQUEST['return_desc']);