nlopess         Sat May  1 06:16:12 2004 EDT

  Modified files:              
    /livedocs   livedoc.php 
  Log:
  even better title lookup: fix bug in OO and better performance
  
http://cvs.php.net/diff.php/livedocs/livedoc.php?r1=1.95&r2=1.96&ty=u
Index: livedocs/livedoc.php
diff -u livedocs/livedoc.php:1.95 livedocs/livedoc.php:1.96
--- livedocs/livedoc.php:1.95   Sat May  1 06:08:22 2004
+++ livedocs/livedoc.php        Sat May  1 06:16:12 2004
@@ -18,7 +18,7 @@
 // | Generate an HTML version of a phpdoc/docbook page on the fly         |
 // +----------------------------------------------------------------------+
 //
-// $Id: livedoc.php,v 1.95 2004/05/01 10:08:22 nlopess Exp $
+// $Id: livedoc.php,v 1.96 2004/05/01 10:16:12 nlopess Exp $
 
 define('LIVEDOC_SOURCE', dirname(__FILE__));
 include LIVEDOC_SOURCE . '/common.php';
@@ -477,19 +477,13 @@
                $func_name = 'Unknown ??';
        }
        
-       $title = lookup_title($id);
-       if (!$title) {
-               $title = $ref . ' [?]';
-       }
-
-       if ($title == $func_name) {
+       if($parts[3] == 'class') {
+               $title = ' - ' . lookup_title($id) . ' class';
+       } else {
                $q = sqlite_unbuffered_query($GLOBALS['idx'], "SELECT descr from toc 
where docbook_id='$id'");
                $title = ' - ' . sqlite_fetch_single($q);
-       } elseif ($parts[3] == 'class') {
-               $title = " - $title class";
-       } else {
-               $title = " - $title";
        }
+
        return "<div class=\"function_link\"><$stag>$func_name</$etag>$title</div>";
 }
 

Reply via email to