cvs: livedocs / handlers.php livedoc.php livedoc_funcs.php

From: Date: Thu, 02 Sep 2004 19:03:15 +0000
Subject: cvs: livedocs / handlers.php livedoc.php livedoc_funcs.php
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969363738@lists.php.net to get a copy of this message
goba Thu Sep 2 15:03:15 2004 EDT Modified files: /livedocs handlers.php livedoc.php livedoc_funcs.php Log: separate function group toc generation, so we can go deeper in these sections to give better overviews http://cvs.php.net/diff.php/livedocs/handlers.php?r1=1.8&r2=1.9&ty=u Index: livedocs/handlers.php diff -u livedocs/handlers.php:1.8 livedocs/handlers.php:1.9 --- livedocs/handlers.php:1.8 Sat Aug 14 17:43:08 2004 +++ livedocs/handlers.php Thu Sep 2 15:03:14 2004 @@ -18,14 +18,14 @@ // | Special Handlers for $aliases | // +----------------------------------------------------------------------+ // -// $Id: handlers.php,v 1.8 2004/08/14 21:43:08 iliaa Exp $ +// $Id: handlers.php,v 1.9 2004/09/02 19:03:14 goba Exp $ /*********************************** Appendixes & Function Reference ************************************/ -function handle_appendixes_funcref() +function handle_appendixes() { global $title, $children, $lang; @@ -38,6 +38,11 @@ } +function handle_funcref_groups() +{ + return "<h1>$title</h1>\n" . do_contents($GLOBALS['current_page'], 0) . "<br /><br />"; + +} /******************* First Page http://cvs.php.net/diff.php/livedocs/livedoc.php?r1=1.109&r2=1.110&ty=u Index: livedocs/livedoc.php diff -u livedocs/livedoc.php:1.109 livedocs/livedoc.php:1.110 --- livedocs/livedoc.php:1.109 Thu Sep 2 12:45:33 2004 +++ livedocs/livedoc.php Thu Sep 2 15:03:14 2004 @@ -18,7 +18,7 @@ // | Generate an HTML version of a phpdoc/docbook page on the fly | // +----------------------------------------------------------------------+ // -// $Id: livedoc.php,v 1.109 2004/09/02 16:45:33 goba Exp $ +// $Id: livedoc.php,v 1.110 2004/09/02 19:03:14 goba Exp $ define('LIVEDOC_SOURCE', dirname(__FILE__)); include LIVEDOC_SOURCE . '/livedoc_funcs.php'; @@ -60,7 +60,7 @@ case 'api.functions': case 'language.custom.functions': case 'language.basic.syntax': - case 'language.variables': return 'handle_appendixes_funcref'; + case 'language.variables': return 'handle_appendixes'; case 'manual': return 'handle_contents'; } } elseif (BUILD_TYPE == 'phpdoc') { @@ -69,17 +69,17 @@ case 'appendixes': case 'faq': case 'features': - case 'funcref': return 'handle_appendixes_funcref'; + case 'funcref': return 'handle_funcref_groups'; case 'getting-started': return 'introduction'; case 'install': - case 'langref': return 'handle_appendixes_funcref'; + case 'langref': return 'handle_appendixes'; case 'manual': return 'handle_contents'; - case 'security': return 'handle_appendixes_funcref'; + case 'security': return 'handle_appendixes'; case 'indexes': return 'handle_index'; } // Handle all reference groups if (strncmp($key, "refs.", 5) == 0) { - return 'handle_appendixes_funcref'; + return 'handle_funcref_groups'; } } return false; http://cvs.php.net/diff.php/livedocs/livedoc_funcs.php?r1=1.13&r2=1.14&ty=u Index: livedocs/livedoc_funcs.php diff -u livedocs/livedoc_funcs.php:1.13 livedocs/livedoc_funcs.php:1.14 --- livedocs/livedoc_funcs.php:1.13 Thu Sep 2 13:54:05 2004 +++ livedocs/livedoc_funcs.php Thu Sep 2 15:03:14 2004 @@ -348,8 +348,10 @@ { global $lang; + $parent_selector = (is_numeric($id)) ? $parent_selector = 'parent_id =' . $id : 'parent_docbook_id = "' . sqlite_escape_string($id) . '"'; + $ret = ''; - if (($r = sqlite_array_query($GLOBALS['idx'], "SELECT id, docbook_id FROM toc WHERE parent_id = ".$id, SQLITE_NUM))) { + if (($r = sqlite_array_query($GLOBALS['idx'], "SELECT id, docbook_id FROM toc WHERE ". $parent_selector, SQLITE_NUM))) { foreach($r as $row) { $ret .= "<li>";

« previous php.doc (#969363738) next »