[pmwiki-users] upgrade effect on menu
Patrick R. Michaud
pmichaud at pobox.com
Mon Oct 2 23:41:14 CDT 2006
On Mon, Oct 02, 2006 at 10:57:05PM -0500, JB wrote:
> > > > $Transition['abslinks'] = 1;
>
> > Also, by convention anything in PmWiki that is an "on/off"
> > switch is named "$Enable....",
>
> Should this be "$EnableTransitionABSLinks = 1;"?
If I was somehow able to do PmWiki all over again, then the
many $EnableXYZ variables would instead be written as
$Enable['XYZ'] , so that we'd have a single array for a flag
instead of a lot of global variables.
Unfortunately, by the time I realized this the $Enable...
variables were basically too far entrenched for me to be
able to change things without causing a lot of hassles,
and those hassles just don't seem to be worth the minor
benefit to be gained.
However, just because I made a poor decision with "$Enable..."
didn't make me feel as though I should repeat it again with
the $Transition flags. And, having $Transition as a separate
array means that it's straighforward for the stdconfig.php
module to decide if it needs to load scripts/transition.php --
if there aren't any $Transition[] elements set, then it doesn't
bother to load and process the script. That wouldn't be
possible if all of the transition flags were "$EnableTransition..."
and had to be checked independently .
It's good to follow a consistent standard, but it's also good
to know when other factors are more important. :-)
Pm
More information about the pmwiki-users
mailing list