summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJehan-Guillaume (ioguix) de Rorthais2013-02-18 22:35:42 +0000
committerJehan-Guillaume (ioguix) de Rorthais2013-02-20 10:15:43 +0000
commit1127ff311bf8c935b566d20242bd9a003dd3e26a (patch)
treeb31fbc62800896104b5a9de9e487a18f05558aee
parenta206766e1fe41a3b7b39fa27eaa6fa7966cf22a4 (diff)
Fix multiple bugs related to GPC parameters pollution from code
Was introduced by me in e1a5b9c54f3ea112a0ce5b2f0f3a0ace9583a354 while trying to make parameter more plugin friendly. display.php code default code use a defined set of GPC parameter and make them persitent between two call (while paging or sorting data). Any other parameter is ignored and doesn't survive a new call. This patch attempted to make plugin specific GPC parameters persistants, but was making ALL parameters persitants, introducing a bunch of bug. This one revert part of this previous patch but keep the small house-cleaning.
-rw-r--r--display.php21
1 files changed, 17 insertions, 4 deletions
diff --git a/display.php b/display.php
index a0504dd4..242d45c5 100644
--- a/display.php
+++ b/display.php
@@ -498,10 +498,23 @@
$fkey_information =& getFKInfo();
- // Build array OF parameters for sorts/pages links
- $_gets = $_REQUEST;
- unset($_gets['query']);
- unset($_gets['MAX_FILE_SIZE']);
+ // Build strings for GETs in array
+ $_gets = array(
+ 'server' => $_REQUEST['server'],
+ 'database' => $_REQUEST['database']
+ );
+
+ if (isset($_REQUEST['schema'])) $_gets['schema'] = $_REQUEST['schema'];
+ if (isset($object)) $_gets[$subject] = $object;
+ if (isset($subject)) $_gets['subject'] = $subject;
+ if (isset($_REQUEST['query'])) $_gets['query'] = $_REQUEST['query'];
+ if (isset($_REQUEST['count'])) $_gets['count'] = $_REQUEST['count'];
+ if (isset($_REQUEST['return'])) $_gets['return'] = $_REQUEST['return'];
+ if (isset($_REQUEST['search_path'])) $_gets['search_path'] = $_REQUEST['search_path'];
+ if (isset($_REQUEST['table'])) $_gets['table'] = $_REQUEST['table'];
+ if (isset($_REQUEST['sortkey'])) $_gets['sortkey'] = $_REQUEST['sortkey'];
+ if (isset($_REQUEST['sortdir'])) $_gets['sortdir'] = $_REQUEST['sortdir'];
+ $_gets['strings'] = $_REQUEST['strings'];
if ($save_history && is_object($rs) && ($type == 'QUERY')) //{
$misc->saveScriptHistory($_REQUEST['query']);