Re: Pager and $_SERVER['QUERY_STRING']

From: Date: Sun, 20 Mar 2005 11:49:16 +0000
Subject: Re: Pager and $_SERVER['QUERY_STRING']
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-18166@lists.php.net to get a copy of this message
"Matthew Weier O'Phinney" <matthew@garden.org> wrote in message news:slrnd3p1b0.q7p.matthew@webmaster2.garden.org... > * Torsten Roehr <roehr@zilleon.com>: > > is there a way to tell Pager to ignore the existing $_SERVER['QUERY_STRING'] > > when building the URLs? This is necessary when an action has been executed > > (e.g. index.php?userId=1&deleteUser) and should then not be part of the > > generated URLs anymore. My quick fix was manually resetting > > $_SERVER['QUERY_STRING'] to ''; > > > > This could easily be achieved with an option called 'ignoreQueryString' that > > defaults to false to keep BC. If the maintainers agree with this I would > > happily provide a patch/text diff atop the current CVS version. > > My understanding is that $_SERVER['QUERY_STRING'] *is* ignored if the > extraVars parameter has been passed to the Pager factory. You may want > to test this for yourself, though. Hi Matthew, I'm using the extraVars option and Pager just adds the vars from extraVars to the query string (overwriting existing parameters from the current query string). Please take a look at the _getLinksUrl() method in Pager/Common.php. So the problem still persists. Best regards, Torsten Roehr

« previous php.pear.general (#18166) next »