diff options
Diffstat (limited to 'modules-available/dnbd3')
-rw-r--r-- | modules-available/dnbd3/page.inc.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/modules-available/dnbd3/page.inc.php b/modules-available/dnbd3/page.inc.php index 84007797..03c7e6cd 100644 --- a/modules-available/dnbd3/page.inc.php +++ b/modules-available/dnbd3/page.inc.php @@ -332,16 +332,18 @@ class Page_Dnbd3 extends Page $locCount[0] = array( 'locationname' => '/', 'depth' => 0, - 'recCount' => 0, ); foreach ($locCount as &$loc) { + $loc['clientCount'] = 0; $loc['recCount'] = 0; } $showLocs = false; while ($row = $res->fetch(PDO::FETCH_ASSOC)) { settype($row['locationid'], 'int'); + trigger_error('Bla: ' . $row['locationid'] . ', blu: ' . isset($locCount[$row['locationid']])); $loc =& $locCount[$row['locationid']]; $loc['clientCount'] = $row['cnt']; + trigger_error('Setting ' . $row['locationid'] . ' to ' . $row['cnt'] . ', rec was ' . $loc['recCount']); $loc['recCount'] += $row['cnt']; if ($row['locationid'] !== 0) { $showLocs = true; @@ -350,9 +352,11 @@ class Page_Dnbd3 extends Page if (isset($loc['parents'])) { foreach ($loc['parents'] as $p) { $locCount[$p]['keep'] = true; + trigger_error('[' . $p . '] Adding ' . $row['cnt'] . ' to ' . $locCount[$p]['recCount']); $locCount[$p]['recCount'] += $row['cnt']; } } + $locCount[0]['recCount'] += $row['cnt']; } if ($showLocs) { $stats['loclist'] = array_values(array_filter($locCount, function ($v) { return isset($v['keep']); })); |