Re: Re: Bug #18676 [Com]: Cluster doesn't show if there's no nodes inside.

From: Date: Sat, 25 Feb 2012 17:08:24 +0000
Subject: Re: Re: Bug #18676 [Com]: Cluster doesn't show if there's no nodes inside.
Groups: php.pear.qa 
Request: Send a blank email to pear-qa+get-6034@lists.php.net to get a copy of this message
Hello, Are you meaning to send replies on these bug reports? It seems like the mailing list gets an empty reply from you each time you read the original bug update message that the mailing list sent to you. See below, how the only "reply" included is "Mobile@root". ashnazg ----- Reply message ----- From: "lin Jim" <jimgreen8@me.com> Date: Sat, Feb 25, 2012 9:32 am Subject: [PEAR-QA] Re: [PEAR-BUGS] [PEAR-BUG] Bug #18676 [Com]: Cluster doesn't show if there's no nodes inside. To: "fgmarand@gmail.com" <pear-qa@lists.php.net> Cc: "Google | System App | experts Engine | administrator" <lpeng564@gmail.com> Mobile@root On 2012年2月10日, at 下午12:48, "fgmarand@gmail.com" <pear-qa@lists.php.net> wrote: > Edit report at > https://pear.php.net/bugs/bug.php?id=18676&edit=1 > > ID: 18676 > Comment by: fgmarand@gmail.com > Reported By: redvex at me dot com > Summary: Cluster doesn't show if there's no nodes inside. > Status: Open > Type: Bug > Package: Image_GraphViz > Operating System: Debian 4.0 > Package Version: 1.3.0 > PHP Version: 5.2.0 > Roadmap Versions: > New Comment: > > I just rolled this proposition as a patch against 1.3.0. It does not fix > the bug for me, though. Try this: > > <?php > include 'Image/GraphViz.php'; > $g = new Image_Graphviz(); > $g->addcluster('c1', 'c1', array('label' => 'A > cluster!')); > $g->image(); > > The warning is gone, but the graph is still empty and unlabeled, while > this works normally, displaying both node and cluster label. > > <?php > include 'Image/GraphViz.php'; > $g = new Image_Graphviz(); > $g->addcluster('c1', 'c1', array('label' => 'A > cluster!')); > $g->addNode('n', array(), 'c1'); > $g->image(); > > > Previous Comments: > ------------------------------------------------------------------------ > > [2012-02-10 16:45:34] fgm > > Added #patch > bug:18676;patch:clsuter_no_nodes-18676;revision:1328892334;. > > ------------------------------------------------------------------------ > > [2011-07-30 11:43:43] doconnor > > -Type: Feature/Change Request > +Type: Bug > Thanks Gianni; but could I get you to do this as a patch against svn? > It'll be a lot > easier to see the differences. > > Additionally; any chance of a test case to prove your changed > implementation > works/doesn't work? > > ------------------------------------------------------------------------ > > [2011-07-21 10:14:20] redvex > > Description: > ------------ > Cluster doesn't show if there's no node inside even if it has > other cluster or subgraph inside. To solve it I've changed > > function _nodes($nodes, $indent){ > $parsedGraph = ''; > foreach ($nodes as $node => $attributes) { > $parsedGraph .= $indent.$this->_escape($node); > > $attributeList = array(); > > foreach ($this->_escapeArray($attributes) as $key => > $value) { > $attributeList[] = $key.'='.$value; > } > > if (!empty($attributeList)) { > $parsedGraph .= ' [ '.implode(',', $attributeList).' > ]'; > } > > $parsedGraph .= ";\n"; > } > return $parsedGraph; > } > > to > > function _nodes($nodes, $indent){ > $parsedGraph = ''; > if (is_array($nodes)){ > foreach ($nodes as $node => $attributes) { > $parsedGraph .= $indent.$this- >> _escape($node); > > $attributeList = array(); > > foreach ($this->_escapeArray($attributes) as > $key => $value) { > $attributeList[] = $key.'='.$value; > } > > if (!empty($attributeList)) { > $parsedGraph .= ' [ '.implode(',', > $attributeList).' ]'; > } > > $parsedGraph .= ";\n"; > } > } > return $parsedGraph; > } > > ------------------------------------------------------------------------ > > > -- > Edit this bug report at > https://pear.php.net/bugs/bug.php?id=18676&edit=1 > > > -- > PEAR Bugs Mailing List (http://pear.php.net/bugs/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PEAR QA Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.pear.qa (#6034) next »