Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

GetDiscussionCount in DiscussionManager

edited April 2008 in Vanilla 1.0 Help
a bit technical question here: why does the Vanilla Discussion Manager (library/Vanilla/Vanilla.Class.DiscussionManager.php) gets the count of discussions in GetDiscussionCount (line 223-226) from a selected 'count' field and not from the function Context->Database->RowCount() ? because I'm grouping by DiscussionID, and the discussion list is grouped, but the discussion count is not. thanks for any insight


  • Options
    From memory, I think its because GetDiscussionCount returns the count of ALL discussions, used for the paging control at the top and bottom wheras RowCount returns only the number of rows in the paged result set--however many fit on that page load.
  • Options
    Yes, that is exactly what is going on.

    The Discussion Filters extension shows some good examples of how you can attach a single function to both delegates if you are trying to prune down the number of results
  • Options
    thanks WallPhone, I'll take a look on it!!
This discussion has been closed.