[pmwiki-users] EnableRelativePageVars in beta releases

Scott Connard connard at dsg-inc.com
Fri Dec 8 12:22:38 CST 2006


On Dec 8, 2006, at 12:57 PM, Patrick R. Michaud wrote:

> On Fri, Dec 08, 2006 at 10:22:23AM -0500, Scott Connard wrote:
>> I was wondering why you didn't add conditional code to your beta
>> release pages so that people could run with those pages regardless of
>> their setting of $EnableRelativePageVars.
>
> The pages that come with the beta release distribution already
> work regardless of the setting of $EnableRelativePageVars --
> at least, they're supposed to.  Could you give an example
> where they aren't working?
>
> Looking at one of your examples:
>
>     wikilib.d/Site.PageNotFound:
>     7c7,8
>     < (:if auth edit:)%rel=nofollow% ([[{$FullName}?action=edit |  
> Create
>     {$FullName}]])
>     ---
>> (:if ( ! enabled EnableRelativePageVars && auth edit ) :)% 
>> rel=nofollow% ([[{$FullName}?action=edit | Create {$FullName}]])
>> (:if ( enabled EnableRelativePageVars && auth edit ) :)% 
>> rel=nofollow% ([[{*$FullName}?action=edit | Create {*$FullName}]])
>
> The test for EnableRelativePageVars isn't needed.  {*$FullName}
> always gives the correct answer, even if $EnableRelativePageVars
> is disabled.
>
> Or, stated differently, if $EnableRelativePageVars isn't set,
> then {*$FullName} and {$FullName} produce the same results, so
> in 2.2.0 one can always use {*$FullName} to mean "currently
> browsed page".
>
> Pm
>

Yes, but... The {*$FullName} code isn't in the 2.1.26 release, so you  
can't have a Site.PageNotFound that works with both the 2.1.26  
release AND the 2.2.0 beta release unless you use the conditional  
code.  Anybody wanting to repeatedly move an existing site between  
2.1.26 and 2.2.0 beta has to continually modify these certain files  
or add conditional code.

Scott.





More information about the pmwiki-users mailing list