r2628 - interpretPredicate(): make use of pre-built predicate table
authorDenis Ovsienko <infrastation@yandex.ru>
Sat, 11 Apr 2009 13:30:54 +0000 (13:30 +0000)
committerDenis Ovsienko <infrastation@yandex.ru>
Sat, 11 Apr 2009 13:30:54 +0000 (13:30 +0000)
inc/functions.php

index fac3273a0daee62e60b2ea78ec2993750070ce5c..94f415a40a065f7765247fb6aa02fb04e5f3c48d 100644 (file)
@@ -1978,12 +1978,10 @@ function interpretPredicate ($pname)
 {
        if ($pname == '_')
                return array();
 {
        if ($pname == '_')
                return array();
-       global $rackCode;
-       $ret = NULL;
-       foreach ($rackCode as $sentence)
-               if ($sentence['type'] == 'SYNT_DEFINITION' and $sentence['term'] == $pname)
-                       $ret = $sentence['definition'];
-       return $ret;
+       global $pTable;
+       if (isset ($pTable[$pname]))
+               return $pTable[$pname];
+       return NULL;
 }
 
 // Tell, if a constraint from config option permits given record.
 }
 
 // Tell, if a constraint from config option permits given record.