[dokuwiki] Re: $INFO

  • From: TNHarris <telliamed@xxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Thu, 19 Nov 2009 21:00:19 -0500

On Fri, 20 Nov 2009 00:06:34 +0100
Andreas Gohr <andi@xxxxxxxxxxxxxx> wrote:
> 
> I don't really like the idea of introducing a config variable for
> completely disabling this export because I think some of this data
> will become really useful for DokuWiki's core functionality, too.
> 
> Maybe we should condense the array and instead exporting all of $INFO,
> export just selected keys. But which?
> 

Make it plugin-controllable. The global variable $EXPORT is an array
with the keys from $INFO (and other info?) that need to be sent to the
client. The default keys are just those required for standard DW, for
the sake of security and also not to clutter the HTML with redundant
data. If some plugin wants a key it can add it to $EXPORT. I don't think
there needs to be a new event, there are plenty of chances to set the
key before the arrays are exported.

So there's still a centralized way of sending global variables to the
client, but DW doesn't send more information than necessary. And it's
up to the plugins to do the Right Thing.

-- tom
telliamed@xxxxxxxxxxxxx
-- 
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: