r2007 + keep some tab triggers profiling code around
authorDenis Ovsienko <infrastation@yandex.ru>
Fri, 27 Jun 2008 14:19:18 +0000 (14:19 +0000)
committerDenis Ovsienko <infrastation@yandex.ru>
Fri, 27 Jun 2008 14:19:18 +0000 (14:19 +0000)
inc/navigation.php

index ed819ab9fcf57cf68b6d94391c1d701192d35dfc..1bcc295df0cdf405bf7aaaff519e8aebd617b6a9 100644 (file)
@@ -430,12 +430,15 @@ function showTabs ($pageno, $tabno)
                if (!permitted ($pageno, $tabidx))
                        continue;
                // Dynamic tabs should only be shown in certain cases (trigger exists and returns true).
-               if
-               (
-                       isset ($trigger[$pageno][$tabidx]) &&
-                       $trigger[$pageno][$tabidx] () != TRUE
-               )
-                       continue;
+               if (isset ($trigger[$pageno][$tabidx]))
+               {
+//                     $t1 = microtime (TRUE);
+                       $ok = $trigger[$pageno][$tabidx] ();
+//                     $t2 = microtime (TRUE);
+//                     echo 'DEBUG: ' . $trigger[$pageno][$tabidx] . ': ' . sprintf ('%0.4f', $t2 - $t1) . '<br>';
+                       if (!$ok)
+                               continue;
+               }
                $class = ($tabidx == $tabno) ? 'current' : 'std';
                $extra = (isset ($tabextraclass[$pageno][$tabidx])) ? $tabextraclass[$pageno][$tabidx] : '';
                echo "<li><a class=${class}{$extra}";