cvs: livedocs / style_mapping.php xml_classes5.php

From: Date: Tue, 21 Jun 2005 01:38:07 +0000
Subject: cvs: livedocs / style_mapping.php xml_classes5.php
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969368749@lists.php.net to get a copy of this message
iliaa Mon Jun 20 21:38:07 2005 EDT Modified files: /livedocs style_mapping.php xml_classes5.php Log: Fixed bug #32780. http://cvs.php.net/diff.php/livedocs/style_mapping.php?r1=1.28&r2=1.29&ty=u Index: livedocs/style_mapping.php diff -u livedocs/style_mapping.php:1.28 livedocs/style_mapping.php:1.29 --- livedocs/style_mapping.php:1.28 Mon Jun 20 00:04:06 2005 +++ livedocs/style_mapping.php Mon Jun 20 21:38:05 2005 @@ -18,7 +18,7 @@ // | Helper functions for formatting elements | // +----------------------------------------------------------------------+ // -// $Id: style_mapping.php,v 1.28 2005/06/20 04:04:06 iliaa Exp $ +// $Id: style_mapping.php,v 1.29 2005/06/21 01:38:05 iliaa Exp $ // almost XPATH.. ;-) $map = array( @@ -154,11 +154,17 @@ return sprintf('<div class="copyright">' . bind_entities('&livedocs.copyright;') . '</div>', implode(", ", $y), $holder); } -function format_refpurpose($node) +function format_refpurpose($node, $map=NULL) { global $current_page, $idx; - $vers = ''; + $str = $vers = ''; + + if (!$node->content && $node->children) { + foreach ($node->children as $child) { + $str .= $map ? $child->transform($map) : $child->as_xml(); + } + } if (substr($current_page, 0, 9) == 'function.') { $func_name = sqlite_escape_string(str_replace('-', '_', substr($current_page, 9))); @@ -170,7 +176,7 @@ } } - return sprintf('%s<h2 class="refpurpose">%s</h2>', $vers, $node->content); + return sprintf('%s<h2 class="refpurpose">%s</h2>', $vers, !$str ? $node->content : $str); } function format_name($node) http://cvs.php.net/diff.php/livedocs/xml_classes5.php?r1=1.11&r2=1.12&ty=u Index: livedocs/xml_classes5.php diff -u livedocs/xml_classes5.php:1.11 livedocs/xml_classes5.php:1.12 --- livedocs/xml_classes5.php:1.11 Thu Feb 10 08:04:50 2005 +++ livedocs/xml_classes5.php Mon Jun 20 21:38:05 2005 @@ -19,7 +19,7 @@ // | PHP 5 style | // +----------------------------------------------------------------------+ // -// $Id: xml_classes5.php,v 1.11 2005/02/10 13:04:50 edink Exp $ +// $Id: xml_classes5.php,v 1.12 2005/06/21 01:38:05 iliaa Exp $ class Node { /* {{{ */ @@ -57,7 +57,7 @@ } if ($match) { if (isset($GLOBALS['fl'][$mapent[1]])) { - return $mapent[1]($this); + return $mapent[1]($this, $map); } else { $tagname = $mapent[1]; }

« previous php.doc (#969368749) next »