diff options
-rw-r--r-- | pmwiki.php | 2 | ||||
-rw-r--r-- | pub/guiedit/pmwiki.syntax.js | 2 | ||||
-rw-r--r-- | scripts/stdmarkup.php | 1 |
3 files changed, 4 insertions, 1 deletions
@@ -246,6 +246,8 @@ $Conditions['group'] = "(boolean)MatchPageNames(\$pagename, FixGlob(\$condparm, '$1$2.*'))"; $Conditions['name'] = "(boolean)MatchPageNames(\$pagename, FixGlob(\$condparm, '$1*.$2'))"; +$Conditions['action'] = + "(boolean)MatchNames(\$GLOBALS['action'], \$condparm, false)"; $Conditions['match'] = 'preg_match("!$condparm!",$pagename)'; $Conditions['authid'] = 'NoCache(@$GLOBALS["AuthId"] > "")'; $Conditions['equal'] = 'CompareArgs($condparm) == 0'; diff --git a/pub/guiedit/pmwiki.syntax.js b/pub/guiedit/pmwiki.syntax.js index 025744f3..62e13a79 100644 --- a/pub/guiedit/pmwiki.syntax.js +++ b/pub/guiedit/pmwiki.syntax.js @@ -72,7 +72,7 @@ ['meta2', '=meta', /(\(:(?:title|description|keywords))(.*?)(:\))/gi], ['meta3', '=meta>keyword>*attr>*keyword', /(\(:(?:(?:else\d*)?if\d*))(.*?)(:\))/ig, - /\b(expr|e_preview|enabled|auth(id)?|name|group|true|false|attachments|date|equal|match|exists|ontrail)\b/g, + /\b(expr|e_preview|enabled|auth(id)?|action|name|group|true|false|attachments|date|equal|match|exists|ontrail)\b/g, special, /[[\]()]+/g ], ['tmpl', '!meta>=keyword', /(\(:template[^\S\r\n]+)(\S.*?)(:\))/g, /^([ !]*)(each|first|last|defaults?|requires?|none)/], diff --git a/scripts/stdmarkup.php b/scripts/stdmarkup.php index 2afe852d..c368f1ca 100644 --- a/scripts/stdmarkup.php +++ b/scripts/stdmarkup.php @@ -114,6 +114,7 @@ function CondText2($pagename, $text, $code = '') { if (!isset($Conditions[$condname])) return preg_replace_callback($CondTextPattern, $repl, $condtext); + $tf = @eval("return ({$Conditions[$condname]});"); if ($tf xor $not) return preg_replace_callback($CondTextPattern, $repl, $condtext); |