[dokuwiki] Re: Is $_GET documented - if so where?

  • From: Luis Machuca Bezzaza <ryan.chappelle@xxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Sat, 18 Dec 2010 15:34:03 -0300

Chris G escribió:
> I'm using $_GET to retrieve the parameters after a link:-
> 
>     somespace:somepage?p1=aaa&p2=bbb&p3=ccc
> 
> If I do something like:
> 
>             foreach ($_GET as $k => $g)
>             {
>                 <do something with variable $k>
>             }
> 
> in the render() method of a plugin will I see more than just the
> parameters that have been passed in the link to the page where the
> plugin syntax is found?  Currently I just see the values for 'p1', 'p2'
> and 'p3'.  If other plugins (on the same page) set/use $_GET will I see
> their values too?
> 

I don't know, but I'd venture that yeah, you'll see whatever is stored at
the GETs, no matter who put it up there. That's actually good design IMHO,
as the alternative is that you'll only see what others have put minus what
others have removed (yes, _GET can be played upon), which would make your
GETs code dependant on the availability, behaviour and runtime ordering of
/all/ other plugins.

Unless there's an even less documented GET api somewhere...

-- 
----
Luis Machuca Bezzaza <luis.machuca [at] gmail.com>
http://informatica.temuco.udelmar.cl/~lmachuca/
----

-- 
DokuWiki mailing list - more info at
http://www.dokuwiki.org/mailinglist

Other related posts: