r4336 new function judgeContext introduced.
authorAlexey Andriyanov <alan@al-an.info>
Tue, 15 Mar 2011 10:51:42 +0000 (10:51 +0000)
committerAlexey Andriyanov <alan@al-an.info>
Tue, 15 Mar 2011 10:51:42 +0000 (10:51 +0000)
wwwroot/inc/functions.php

index 647a5b5b744b199c3d6a7f8359bcf042fac092a6..20940414e6af6912185a135990ea8acb085f1096 100644 (file)
@@ -2576,6 +2576,23 @@ function judgeCell ($cell, $expression)
        );
 }
 
+function judgeContext ($expression)
+{
+       global $pTable, $expl_tags, $impl_tags, $auto_tags;
+       return eval_expression
+       (
+               $expression,
+               array_merge
+               (
+                       $expl_tags,
+                       $impl_tags,
+                       $auto_tags
+               ),
+               $pTable,
+               TRUE
+       );
+}
+
 // Tell, if a constraint from config option permits given record.
 function considerConfiguredConstraint ($cell, $varname)
 {