Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Count only active assets.

  • Loading branch information...
commit 36a66a02a4c812847aa35bb8ca9755901ce9aec3 1 parent cd54243
@theory theory authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/Bric/Biz/Workflow/Parts/Desk.pm
View
6 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
};
Please sign in to comment.
Something went wrong with that request. Please try again.