Opened 7 years ago
Closed 7 years ago
#2211 closed defect (bug) (fixed)
Posts dated in the future increment the category counts prematurely
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 2.1 |
| Component: | Administration | Version: | 2.0 |
| Severity: | normal | Keywords: | timestamp category |
| Cc: |
Description
Hello. Using WordPress 2.0, if I edit the timestamp and set the time into the future (to publish at a specific time), the category number counts increment prematurely. For instance, if I have 10 prior posts in "Uncategorized," and set my 11th post to display tomorrow, the sidebar will show "Uncategorized (11)" even though the 11th post isn't displayed yet.
It appears to affect all cases where the number of posts in a category is displayed.
I am completely unfamiliar with the internals of WordPress, so I apologize for not attaching a patch. I'm guessing that it just requires an additional condition (timestamp <= NOW()) on the SELECT statement that computes the post counts.
Thank you!

This should be fixed when we convert to post_status='future'
<= '$now' is going to be discontinued.