[pmwiki-users] {$Action} broken?

Bart pmwiki-users at mediamatrix.nl
Tue Aug 22 05:43:50 CDT 2006

Hi Michael, 

Thanks for your input. Still I think this somehow odd behavior. 
In pmwiki.php $Actions is set to $GLOBALS["action"]

In http://pmwiki.org/wiki/PITS/00696 Pm writes:

It seems to me that using {$Action} in this way might be more generic and
useful in other contexts besides simply conditionals.

Also note that $_GET['action'] is technically not correct, since the action=
parameter can come from a 'POST' request or could be modified by a recipe or
local customization. Better is probably $GLOBALS['action']. 

I like to use $Action for hiding and showing links in the PageAction menu
and ran into odd behavior of (:if action ACTION:) at the bottom of
http://pmwiki.org/wiki/Cookbook/ConditionalMarkupSamples and was able to
track this down to $GLOBALS["action"] which is passed to $Action in

So if I modify the example from that section to:
(:if ( ! action print ) :)
  * %item class=browse accesskey='$[ak_print]'%[[{$FullName} | $[Print] ]]

and put $Conditions['action'] = '\$GLOBALS["action"]==\$condparm';
in my config.php

It doesn't work like expected. The print link doesn't disappear when I my
URL ends with: ?action=print Which according to mentioned in the Markup
samples should be the case. Somehow "print" gets  lost 

To me this looks like a minor bug.
Any suggestions?

Best regards, Bart 

On Tue, Aug 22, 2006 at 09:08:26AM +0200, Michael Brenner wrote:
| Hello Bart,
| the same is in my wiki. I think requesting action=print simply changes skin 
| temporary to print and then executes normal browse-output.
| Bye
| Am Dienstag, 22. August 2006 04:10 schrieb Bart:
| > Hi,
| >
| >
| > When I put {$Action} into my Site/PageActions page it displays all the
| > action in progress. Only not when action=print it then displays: "browse"
| > instead of "print"
| >
| > I think this is a odd behavior especially in my situation where  I use the
| > standard skin with the sidebar disabled for action=print and like to show
| > my visitors and editors in with mode they are working, by using:
| >
| > Current action = {$Action}
| >
| >
| > So what do you think is this somehow (why?) intended behavior or did I ran
| > into a small bug?
| >
| >
| > Thanks and best regards,
| > Bart
| > The Netherlands
| >
| >
| > _______________________________________________
| > pmwiki-users mailing list
| > pmwiki-users at pmichaud.com
| > http://host.pmichaud.com/mailman/listinfo/pmwiki-users
| _______________________________________________
| pmwiki-users mailing list
| pmwiki-users at pmichaud.com
| http://host.pmichaud.com/mailman/listinfo/pmwiki-users

More information about the pmwiki-users mailing list