mirror of
https://github.com/writefreely/writefreely
synced 2024-11-14 05:07:07 +00:00
Return correct count of currently-published lang posts
Previously, we'd include scheduled posts, too. Ref T805
This commit is contained in:
parent
414d5b0a1c
commit
e91748c0bc
1 changed files with 1 additions and 1 deletions
|
@ -1262,7 +1262,7 @@ func (db *datastore) GetPostsTagged(cfg *config.Config, c *Collection, tag strin
|
|||
|
||||
func (db *datastore) GetCollLangTotalPosts(collID int64, lang string) (uint64, error) {
|
||||
var articles uint64
|
||||
err := db.QueryRow("SELECT COUNT(*) FROM posts WHERE collection_id = ? AND language = ?", collID, lang).Scan(&articles)
|
||||
err := db.QueryRow("SELECT COUNT(*) FROM posts WHERE collection_id = ? AND language = ? AND created <= "+db.now(), collID, lang).Scan(&articles)
|
||||
if err != nil && err != sql.ErrNoRows {
|
||||
log.Error("Couldn't get total lang posts count for collection %d: %v", collID, err)
|
||||
return 0, err
|
||||
|
|
Loading…
Reference in a new issue