Skip to content
Browse files

Fixes #209 :: Resolve empty category display issue

  • Loading branch information...
1 parent 22daa24 commit e90880d1bf9631164cb7e4deaccab72fa79ec2a4 Jonathan Serafini committed Feb 2, 2012
Showing with 1 addition and 12 deletions.
  1. +1 −12 includes/data_classes/Category.class.php
View
13 includes/data_classes/Category.class.php
@@ -84,7 +84,7 @@ protected function HasChildren() {
return true;
foreach ($objSubCategories as $objCategory)
- if ($objCategory->HasChildrenOrProduct())
+ if ($objCategory->HasChildOrProduct())
return true;
}
return false;
@@ -208,17 +208,6 @@ public function UpdateChildCount(){
$this->intChildCount = $intCount;
$strQuery = <<<EOS
-SELECT SUM(child_count) AS total_matches
-FROM xlsws_category
-WHERE parent='{$this->intRowid}';
-EOS;
- $objQuery = _dbx($strQuery, 'Query');
- $arrTotal = $objQuery->FetchArray();
- $intCount = $arrTotal['total_matches'];
-
- $this->intChildCount += $intCount;
-
- $strQuery = <<<EOS
UPDATE xlsws_category
SET `child_count`='{$this->intChildCount}'
WHERE `rowid`='{$this->intRowid}';

0 comments on commit e90880d

Please sign in to comment.
Something went wrong with that request. Please try again.