[pmwiki-users] Slightly different local/config behavior . . .
Ben Wilson
dausha at gmail.com
Sat Feb 19 12:56:24 CST 2005
PM,
I'm one of those odd hold outs. While I have been a fast adopter of
the various beta releases of v2.0, I keep the same config file. So, I
am quite surprised when I roll out a brand-spanking new version (e.g.
when I install this for a new non-profit client).
I'm seeing a lot of "noise" in the new config:
if (this = that) then require_once();
How about a custom function akin to Markup?
action_require('edit', 'script.php'):
or
conditionalRequire('$action', $val, $script);
function action_require($val, $script) {
if ($action == $val) require_once($script);
}
In my last career (IT, I'm in law school now), I had the adage, if
it's done more than twice a certain way, then write it into a routine.
This suggestion also removes a bit more code out of the config.php.
Also, is there a reason for preferring multi-string quotes to a
HEREDOC? "I see a lot of multiple line strings like this one"
when<<<END
I personally prefer a HEREDOC like this. I'm assuming there's a
performance difference somewhere.
END;
--
Ben Wilson
" Mundus vult decipi, ergo decipiatur"
More information about the pmwiki-users
mailing list