[dev] patch to Horde::addParameter()
David Ulevitch
davidu@everydns.net
Fri, 5 Jul 2002 18:28:23 -0700 (PDT)
<quote who="Michael M Slusarz">
> Quoting David Ulevitch <davidu@everydns.net>:
>
> | Here's a small patch to let Horde::addParameter support alternate
> output | delim's.
> |
> | The change is a switch from: & to ini_get('arg_separator.output').
>
> I think this is a good idea. Unfortunately, we don't (in a _whole_ lot
> of places) use addParameter to build URLs. That could conceivably mean
> that a URL could have a combination of separator characters (e.g. '&'
> and ';') which is not good.
>
> I've been trying to clean this up (using Horde::addParameter())
> everywhere I see it, but since I mainly deal with IMP and Horde there
> are many other places that haven't been touched yet.
True enough but consider this:
1) If someone sets their arg_separator.output to ';' it is save to assume
they have set their arg_separator.input to ';' and often ';&' to support
both. And so mixed URL's would still work for them (despite being ugly).
2) If someone has not changed their arg_separator.output then they will
see no change in any of the applications and so this patch will not hurt
them.
3) There are some people (or just me) who are not using any horde
applications and are simply using the framework to write my own
application and thus the benefit of this patch is great as I have total
control over my application and know that I only generate url's with ;.
4) Once changed, people who do use ; can quickly find all the places in
the code that are hard coded and fix them.
As to performance issues, I am not totally sure but I would guess the
impact would not be noticable because arg_separator is not allowed to be
changed from within PHP, only in the php.ini and read on server startup.
-davidu
--
"Never doubt that a small group of thoughtful citizens can change the
world. Indeed, it is the only thing that ever has." --Margaret Mead