Index: trunk/core/units/statistics/statistics_tag_processor.php =================================================================== diff -u -N -r4765 -r5431 --- trunk/core/units/statistics/statistics_tag_processor.php (.../statistics_tag_processor.php) (revision 4765) +++ trunk/core/units/statistics/statistics_tag_processor.php (.../statistics_tag_processor.php) (revision 5431) @@ -214,10 +214,7 @@ function GetTotalPending() { - $sql = 'SELECT Prefix - FROM '.TABLE_PREFIX.'ItemTypes - WHERE LENGTH(ClassName) > 0'; - $prefixes = $this->Conn->GetCol($sql); + $prefixes = $this->getPendingPrefixes(); $sum = 0; foreach ($prefixes as $prefix) { @@ -226,12 +223,18 @@ return $sum; } - function PrintPendingStatistics($params) + function getPendingPrefixes() { $sql = 'SELECT Prefix - FROM '.TABLE_PREFIX.'ItemTypes - WHERE LENGTH(ClassName) > 0'; - $check_prefixes = $this->Conn->GetCol($sql); + FROM '.TABLE_PREFIX.'ItemTypes it + LEFT JOIN '.TABLE_PREFIX.'Modules m ON m.Name = it.Module + WHERE (m.Loaded = 1) AND (LENGTH(it.ClassName) > 0)'; + return $this->Conn->GetCol($sql); + } + + function PrintPendingStatistics($params) + { + $check_prefixes = $this->getPendingPrefixes(); if (!$check_prefixes) { return ''; }