Index: branches/unlabeled/unlabeled-1.18.2/core/kernel/db/dblist.php =================================================================== diff -u -r5950 -r5962 --- branches/unlabeled/unlabeled-1.18.2/core/kernel/db/dblist.php (.../dblist.php) (revision 5950) +++ branches/unlabeled/unlabeled-1.18.2/core/kernel/db/dblist.php (.../dblist.php) (revision 5962) @@ -153,6 +153,7 @@ var $Queried = false; var $Counted = false; + var $TotalsCalculated = false; /** * Creates kDBList @@ -390,10 +391,12 @@ $this->Totals[$total_field] += $field_value; } } + $this->TotalsCalculated = true; } function getTotal($field, $total_function) { + if (!$this->TotalsCalculated) $this->CalculateTotals(); return $this->Totals[$field.'_'.$total_function]; }