[pmwiki-users] conditional change of variable (sectionedit)
Patrick R. Michaud
pmichaud at pobox.com
Sun Apr 2 16:54:23 CDT 2006
On Sun, Apr 02, 2006 at 02:37:46PM -0700, H. Fox wrote:
> On 4/2/06, noskule <noskule at gmx.net> wrote:
> > hi list
> > I would like to do a farmconfig entry that means:
> > if !auth edit
> > $SectionEditWithoutHeaders = true;
> >
> > this sould automaticly disables all sectionedit links if the
> > user has no edit permission.
> >
> > Is this possible? If yes, could please some php crack provide
> > my with a codesnip
>
> If any of your default passwords are in local/config.php, then code
> like that can't happen in farmconfig.php.
Actually, it can -- farmconfig.php can always do the following
at the end:
# get the local configuration
include_once('local/config.php');
$pagename = ResolvePageName($pagename);
$page = RetrieveAuthPage($pagename, 'read', false, READPAGE_CURRENT);
if (!@$page['=auth']['edit'])
$SectionEditWithoutHeaders = true;
Pm
More information about the pmwiki-users
mailing list