I ran into an issue displaying statistics after adding and removing db nodes from admin ui. Essentially stats api would not use the correct db node and I would get no stats results. I fixed it so if a node is not specified we use the first node, not the node with db record id = 0. I'm asking for a peer review of the code, in case i misunderstood how $tnode is used in the system http://code.google.com/p/homer/source/detail?r=d336330faefe3fd7624c37f7843767f5a41ec151
i thought, it was fixed yesterday, if tnode == 0, we use first record in the $mynodes array.
http://code.google.com/p/homer/source/diff?spec=svncd5eb5129e09a5d360d7b56e1638e9954acf2d93&r=cd5eb5129e09a5d360d7b56e1638e9954acf2d93&format=side&path=/webhomer/api/api.php
But your code is much better :-) thanks! Can you put getNode() function to class/index.php ? In this case we can use it to fix the same issue in the cflow and in the pcap export!