I also just verified the GetArticleCount(bool publishedOnly, int categoryID) method. Its using the logic I assumed in my previous post, confirming the error.
Code:
/// <summary>
/// Returns the number of total published articles for the specified category
/// </summary>
public static int GetArticleCount(bool publishedOnly, int categoryID)
{
if (!publishedOnly)
return GetArticleCount(categoryID);
if (categoryID <= 0)
return GetArticleCount(publishedOnly);
int articleCount = 0;
string key = "Articles_ArticleCount_" + publishedOnly.ToString() + "_" + categoryID.ToString();
if (BaseArticle.Settings.EnableCaching && BizObject.Cache[key] != null)
{
articleCount = (int)BizObject.Cache[key];
}
else
{
articleCount = SiteProvider.Articles.GetPublishedArticleCount(categoryID, DateTime.Now);
BaseArticle.CacheData(key, articleCount);
}
return articleCount;
}
Hope this helps.
Doug