cvs: pear /PhpDocumentor/phpDocumentor Converter.inc

From: Date: Sat, 25 Feb 2006 02:40:21 +0000
Subject: cvs: pear /PhpDocumentor/phpDocumentor Converter.inc
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-38570@lists.php.net to get a copy of this message
cellog Sat Feb 25 02:40:21 2006 UTC Modified files: /pear/PhpDocumentor/phpDocumentor Converter.inc Log: clean up some GHASTLY WS/CS http://cvs.php.net/viewcvs.cgi/pear/PhpDocumentor/phpDocumentor/Converter.inc?r1=1.9&r2=1.10&diff_format=u Index: pear/PhpDocumentor/phpDocumentor/Converter.inc diff -u pear/PhpDocumentor/phpDocumentor/Converter.inc:1.9 pear/PhpDocumentor/phpDocumentor/Converter.inc:1.10 --- pear/PhpDocumentor/phpDocumentor/Converter.inc:1.9 Fri Feb 24 03:28:48 2006 +++ pear/PhpDocumentor/phpDocumentor/Converter.inc Sat Feb 25 02:40:21 2006 @@ -22,7 +22,7 @@ * @package Converters * @author Greg Beaver <cellog@users.sourceforge.net> * @since 1.0rc1 - * @version $Id: Converter.inc,v 1.9 2006/02/24 03:28:48 cellog Exp $ + * @version $Id: Converter.inc,v 1.10 2006/02/25 02:40:21 cellog Exp $ */ /** * Smarty template files @@ -56,7 +56,7 @@ * @abstract * @author Greg Beaver <cellog@users.sourceforge.net> * @since 1.0rc1 - * @version $Id: Converter.inc,v 1.9 2006/02/24 03:28:48 cellog Exp $ + * @version $Id: Converter.inc,v 1.10 2006/02/25 02:40:21 cellog Exp $ */ class Converter { @@ -2041,8 +2041,9 @@ */ function _setupTutorialTree($parent = false) { - if (! isset($this->processed_tutorials)) - $this->processed_tutorials = array(); + if (! isset($this->processed_tutorials)) { + $this->processed_tutorials = array(); + } $tree = array(); if (!$parent) { @@ -2056,17 +2057,18 @@ { if (!$tutorial->parent) { - $child_path = $this->_tutorial_path($tutorial,$tutorial,$tutorial); - if (! isset($this->processed_tutorials[$child_path])) - { - $this->processed_tutorials[$child_path] = $tutorial; - //debug("parent ".$tutorial->name); - $ret = $this->_setupTutorialTree($tutorial); - if (!count($tree)) - $tree = $ret; - else - $tree = array_merge($tree,$ret); - } + $child_path = $this->_tutorial_path($tutorial,$tutorial,$tutorial); + if (!isset($this->processed_tutorials[$child_path])) + { + $this->processed_tutorials[$child_path] = $tutorial; + //debug("parent ".$tutorial->name); + $ret = $this->_setupTutorialTree($tutorial); + if (!count($tree)) { + $tree = $ret; + } else { + $tree = array_merge($tree,$ret); + } + } } } } @@ -2074,39 +2076,45 @@ } return $tree; } - $parent_path = $this->_tutorial_path($parent); + $parent_path = $this->_tutorial_path($parent); $tree[$parent_path]['tutorial'] = $parent; // process all child tutorials, and insert them in order if ($parent->ini) { foreach($parent->ini['Linked Tutorials'] as $child) { - if (isset($this->tutorials[$parent->package][$parent->subpackage][$parent->tutorial_type][$child . '.' . $parent->tutorial_type])) - // remove the child from the list of remaining tutorials - $tute = $this->tutorials[$parent->package][$parent->subpackage][$parent->tutorial_type][$child . '.' . $parent->tutorial_type]; - else - $tute = false; + if (isset($this->tutorials[$parent->package][$parent->subpackage] + [$parent->tutorial_type][$child . '.' . + $parent->tutorial_type])) { + // remove the child from the list of remaining tutorials + $tute = $this->tutorials[$parent->package][$parent->subpackage] + [$parent->tutorial_type][$child . '.' . + $parent->tutorial_type]; + } else { + $tute = false; + } - if ($tute) - { - $child_path = $this->_tutorial_path($parent,$parent,$tute); - if (! isset($this->processed_tutorials[$child_path])) - { - $this->processed_tutorials[$child_path] = $tute; - if ($tute->name == $child . '.' . $parent->tutorial_type) - { -// echo "Adding [$child_path] to [$parent_path]<br>"; - $tree[$parent_path]['child'][$this->_tutorial_path($parent,$parent,$tute)]['tutorial'] = $tute; - if ($tute->ini) - { - // add all the child's child tutorials to the list - if (!isset($tree[$parent_path]['child'])) - $tree[$parent_path]['child'] = $this->_setupTutorialTree($tute); - else - $tree[$parent_path]['child'] = array_merge($tree[$parent_path]['child'],$this->_setupTutorialTree($tute)); - } - } - } + if ($tute) { + $child_path = $this->_tutorial_path($parent,$parent,$tute); + if (!isset($this->processed_tutorials[$child_path])) + { + $this->processed_tutorials[$child_path] = $tute; + if ($tute->name == $child . '.' . $parent->tutorial_type) + { + //echo "Adding [$child_path] to [$parent_path]<br>"; + $tree[$parent_path]['child'][$this->_tutorial_path($parent,$parent,$tute)] + ['tutorial'] = $tute; + if ($tute->ini) + { + // add all the child's child tutorials to the list + if (!isset($tree[$parent_path]['child'])) { + $tree[$parent_path]['child'] = $this->_setupTutorialTree($tute); + } else { + $tree[$parent_path]['child'] = array_merge($tree[$parent_path]['child'], + $this->_setupTutorialTree($tute)); + } + } + } } } }

« previous php.pear.cvs (#38570) next »