Changeset 2732
- Timestamp:
- 12/27/06 22:14:30 (2 years ago)
- Files:
-
- 1 modified
-
branches/1.1-beta/lib/view/view.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/1.1-beta/lib/view/view.php
r2712 r2732 673 673 global $blogURL, $owner; 674 674 $categoryCount = 0; 675 $categoryCountAll = 0; 676 $parentCategoryCount = 0; 675 677 $tree = array('id' => 0, 'label' => getCategoryNameById($owner, 0), 'value' => $totalPosts, 'link' => "$blogURL/category", 'children' => array()); 676 678 foreach ($categories as $category1) { 677 679 $children = array(); 678 if( doesHaveOwnership() || getCategoryVisibility($owner, $category1['id']) > 1) {680 if(doesHaveOwnership() || getCategoryVisibility($owner, $category1['id']) > 1) { 679 681 foreach ($category1['children'] as $category2) { 680 682 if( doesHaveOwnership() || getCategoryVisibility($owner, $category2['id']) > 1) { … … 682 684 $categoryCount = $categoryCount + (doesHaveOwnership() ? $category2['entriesInLogin'] : $category2['entries']); 683 685 } 684 } 685 array_push($tree['children'], array('id' => $category1['id'], 'label' => $category1['name'], 'value' => $categoryCount, 'link' => "$blogURL/category/" . encodeURL($category1['label']), 'children' => $children)); 686 $categoryCountAll = $categoryCountAll + (doesHaveOwnership() ? $category2['entriesInLogin'] : $category2['entries']); 687 } 688 $parentCategoryCount = (doesHaveOwnership() ? $category1['entriesInLogin'] - $categoryCountAll : $category1['entries'] - $categoryCountAll); 689 array_push($tree['children'], array('id' => $category1['id'], 'label' => $category1['name'], 'value' => $categoryCount + $parentCategoryCount, 'link' => "$blogURL/category/" . encodeURL($category1['label']), 'children' => $children)); 686 690 $categoryCount = 0; 691 $categoryCountAll = 0; 692 $parentCategoryCount = 0; 687 693 } 688 694 }
