[pmwiki-users] quick php question
Patrick R. Michaud
pmichaud at pobox.com
Wed Apr 25 12:30:41 CDT 2007
On Wed, Apr 25, 2007 at 06:11:18PM +0100, Hans wrote:
> Wednesday, April 25, 2007, 6:06:03 PM, Tegan wrote:
>
> > Whoops. Never mind the never mind - that doesn't work after all. I have
>
> > if($page == 'Admin.WebAdmin') $EnablePathInfo = 0;
>
> > That's no good. What should I have? Do I need some curly brackets in there
> > or something?
>
> try
>
> $page = PageVar($pagename, '$FullName');
> if($page == 'Admin.WebAdmin') {
> $EnablePathInfo = 0;
> include_once("$FarmD/cookbook/webadmin.php");
> }
Even better is to not use PageVar() to get the pagename
(since we already have it in $pagename!):
$pagename = ResolvePageName($pagename);
if ($pagename == 'Admin.WebAdmin') {
$EnablePathInfo = 0;
include_once("$FarmD/cookbook/webadmin.php");
}
Also, I'm not familiar with webadmin, but it would
seem that even easier would be to put the following into
local/Admin.WebAdmin.php :
<?php
$EnablePathInfo = 0;
include_once("$FarmD/cookbook/webadmin.php");
Pm
More information about the pmwiki-users
mailing list