[pmwiki-users] Bug in functions PageTextVar or Qualify?

Hans design5 at softflow.co.uk
Sun Apr 27 05:43:08 CDT 2008


Sunday, April 27, 2008, 8:55:24 AM, Petko Yotov wrote:

> This is not a bug but the expected behavior. We are expecting, by convention:

>   {*$FullName} = the page that is being viewed, even if this piece of
>       code comes from an included/sidebar/header/footer page.

>   {$FullName} = the physical page where the code is written, the
>      included/sidebar/header/footer page if the piece of code is there.
>      That's why it is expanded to {Group.Page$FullName} as if, 
>      in the page, you wrote it this way yourself.

Sorry to disagree!

{*$FullName} and {$FullName} in the content of a page called
Group.Page is shown as Group.Page in both cases.

But when loading page text variables with values of
'{*$FullName}' and '{$FullName}' into an input control
then no change should take place in both cases. It should be the
value as written in the page: '{*$FullName}' and '{$FullName}'.
There should be no substitution, and no Qualify.

And if Qualify would do a substitution/evaluation of '{*$FullName}'
and '{$FullName}', i would expect it being in both cases 'Group.Name'.
But I think it really should not substitute anything, and calling
PageTextVar for a variable with '{$FullName}' as part of the string
should not generate '{Group.Page$FullName}'

Instead of using a form and (:input defaults source=.... :)
one could see the same by using a markup for testing like

Markup('showptv', 'directives',
  '/\\(:showptv\\s(.*?):\\)/e',
  "PageTextVar(\$pagename, PSS('$1'))");

to bring to attention the output of the PageTextVar function.


  ~Hans




More information about the pmwiki-users mailing list