In selecting a node to report on on a system with 1000s of nodes where only a few have timelogs linked to them is not useful.
What about:
--- bubbletimer.statistics.inc.orig 2010-08-03 09:22:35.000000000 +0200
+++ bubbletimer.statistics.inc 2010-08-03 09:23:33.000000000 +0200
@@ -169,7 +169,7 @@
),
);
- $result = db_query('SELECT nid, title FROM {node_revisions} WHERE length(title) > 0 ORDER BY nid ASC;');
+ $result = db_query('SELECT nid, title FROM {node_revisions} WHERE length(title) > 0 AND nid in (select distinct nid from {bubbletimer_activity}) ORDER BY nid ASC;');
$nodes = array();
while ($row = db_fetch_object($result)) {
$nodes[$row->nid] = $row->title;