Permalink
Browse files

Count only active assets.

  • Loading branch information...
1 parent cd54243 commit 36a66a02a4c812847aa35bb8ca9755901ce9aec3 @theory theory committed Aug 5, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/Bric/Biz/Workflow/Parts/Desk.pm
@@ -434,11 +434,11 @@ sub asset_counts {
# Use desk__id > 0 because the index is defined that way.
my $sth = prepare_c qq{
SELECT desk__id, COUNT(*) FROM (
- SELECT desk__id FROM story WHERE desk__id > 0
+ SELECT desk__id FROM story WHERE active AND desk__id > 0
UNION ALL
- SELECT desk__id FROM media WHERE desk__id > 0
+ SELECT desk__id FROM media WHERE active AND desk__id > 0
UNION ALL
- SELECT desk__id FROM template WHERE desk__id > 0
+ SELECT desk__id FROM template WHERE active AND desk__id > 0
) AS c
GROUP BY desk__id
};

0 comments on commit 36a66a0

Please sign in to comment.