[Pmwiki-users] Re: Wiki farm question
Patrick R. Michaud
pmichaud
Mon Jun 7 16:04:03 CDT 2004
On Tue, Jun 08, 2004 at 09:22:03AM +1200, John Rankin wrote:
> But I have a question:
> What's the reason for the load order being
> $FarmD/local/farmconfig.php,
> local/config.php,
> $FarmD/scripts/stdconfig.php
> It seems to me that it would make more sense to load wiki
> field local customisations, then farm-wide customisations,
> then standard features.
>
> I realise the administrator can over-ride this, but I'd
> like to understand the logic.
The logic is precisely to give the farm administrator the
opportunity to override field local customizations:
- In farmconfig.php the farm admin can set $EnableLocalConfig=0
to turn off field customizations entirely.
- If the farm administrator wants to do things after the field's
local/config.php, then he simply adds include_once('local/config.php')
into farmconfig.php at an appropriate place in the farm's
configuration sequence.
With this sequence, the farm administrator can easily implement
the equivalent of $EnableFamilyFarm:
## farmconfig.php
# ...pre-field configurations here...
include_once('local/config.php');
if (!$EnableFamilyFarm) return;
# ...rest of farmconfig here...
The other way, with the field's local/config.php being called first,
the farm admin has less opportunity to control/influence the configuration
process before the field gets control. This is especially important if
the farm needs to be able to set up farm-specific defaults ($ScriptUrl,
$FarmPubDirUrl) that may be needed by the field configs.
Pm
More information about the pmwiki-users
mailing list