iliaa           Wed May 26 10:24:55 2004 EDT

  Modified files:              
    /livedocs   xml_classes5.php livedoc_funcs.php 
  Log:
  Another slight optimization.
  
  
http://cvs.php.net/diff.php/livedocs/xml_classes5.php?r1=1.4&r2=1.5&ty=u
Index: livedocs/xml_classes5.php
diff -u livedocs/xml_classes5.php:1.4 livedocs/xml_classes5.php:1.5
--- livedocs/xml_classes5.php:1.4       Tue May 25 16:15:03 2004
+++ livedocs/xml_classes5.php   Wed May 26 10:24:55 2004
@@ -19,7 +19,7 @@
 // | PHP 5 style                                                          |
 // +----------------------------------------------------------------------+
 //
-// $Id: xml_classes5.php,v 1.4 2004/05/25 20:15:03 iliaa Exp $
+// $Id: xml_classes5.php,v 1.5 2004/05/26 14:24:55 iliaa Exp $
 
 class Node { /* {{{ */
 
@@ -56,8 +56,8 @@
                                        $n = $n->parent;
                                }
                                if ($match) {
-                                       if (is_callable($mapent[1])) {
-                                               return call_user_func($mapent[1], 
$this);
+                                       if (isset($GLOBALS['fl'][$mapent[1]])) {
+                                               return $mapent[1]($this);
                                        } else {
                                                $tagname = $mapent[1];
                                        }
http://cvs.php.net/diff.php/livedocs/livedoc_funcs.php?r1=1.6&r2=1.7&ty=u
Index: livedocs/livedoc_funcs.php
diff -u livedocs/livedoc_funcs.php:1.6 livedocs/livedoc_funcs.php:1.7
--- livedocs/livedoc_funcs.php:1.6      Wed May 26 10:18:15 2004
+++ livedocs/livedoc_funcs.php  Wed May 26 10:24:55 2004
@@ -2,8 +2,10 @@
 include LIVEDOC_SOURCE . '/common.php';
 if (version_compare(phpversion(), "5", "ge")) {
        include LIVEDOC_SOURCE . '/xml_classes5.php';
+       $fl_gen = true;
 } else {
        include LIVEDOC_SOURCE . '/xml_classes.php';
+       $fl_gen = false;
 }
 include LIVEDOC_SOURCE . '/style_mapping.php';
 include LIVEDOC_SOURCE . '/handlers.php';
@@ -428,6 +430,11 @@
 
        header('Location: ' . WEBBASE . 'search.php?q=' . urlencode($current_page) . 
'&l=' . $lang);
        exit;
+}
+
+if ($fl_gen) {
+       $fl = get_defined_functions();
+       $GLOBALS['fl'] = array_flip($fl['user']);
 }
 
 ?>

Reply via email to