[Pmwiki-users] is "Main" a group, or isn't it?

Patrick R. Michaud pmichaud
Sat Oct 16 16:15:12 CDT 2004


On Sat, Oct 16, 2004 at 12:14:29PM -0400, Robert P. J. Day wrote:
> 
>   i'm a little confused as to how to interpret references to the
> group(?) Main.  is Main an actual group, or isn't it?

It's an actual group, but you're correct that $DefaultGroup gets
handled a little strangely in that it's group configuration is loaded 
whenever the current group doesn't have a configuration file.  This
is there primarily for historical reasons.

>   i don't understand that last part -- why would the customization
> process consult, as a last resort, the Main group for any
> customization?  

Only because I ran into a situation where I needed to have a customization
that was executed only if no other group-level customization files were
present.

>   am i reading this the right way?  wouldn't it make more sense to
> have top-level customization done by some kind of abstract, non-group
> identifier, like "All" or something, that doesn't correspond to an
> actual, physical group?

Well, the top-top level customization is performed by local/config.php,
which is applied to all groups and pages.  The loading of the 
DefaultGroup's configuration remains in PmWiki 1.0 for historical
/compatibility reasons with previous versions of PmWiki.

In PmWiki 2.0 the behavior has been changed so that $DefaultGroup's
configuration is no longer loaded, and instead a "default.php" file
is loaded if no per-group or per-page customization file was found.

Pm



More information about the pmwiki-users mailing list