I use the `printAllTagsAs()` function to display a tagcloud, with a counter on every tag. I noticed that even the unpublished objects are counted, so it cuold be possible that a unprivileged user click on the tag "photo(3)" but the search display no results.
I found that the problem is in the function `getAllTagsCount()`, in the sql request: I think the line
`$sql = "SELECT DISTINCT tags.name, tags.id, (SELECT COUNT(*) FROM ".prefix('obj_to_tag')." as object WHERE object.tagid = tags.id) AS count FROM ".prefix('tags')." as tags ORDER BY`name`";`
should be improved to count only the ids that matches "show=1" in the image table.
How can this be written?
Thanks