#4543 closed defect (bug) (wontfix)
Future comments are displayed. They must not.
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | 2.2.1 |
| Component: | General | Keywords: | comment, timestamp, date, time, edit |
| Focuses: | Cc: |
Description
An administrator (or someone with similar capabilities) is allowed to edit a comment timestamp. But if the timestamp is set to the future, the comment will still appear below a post.
This is the wrong behaviour since we expect, like posts, to have the comment visible only after the current time exceed the comments timestamp.
I think a solution is to alter the SQL queries of the comments_template() function from the /wp-includes/comment-template.php file.
Change History (6)
#2
@
19 years ago
Looks like it's a little bit more complicated...
As explained in comments_template() code, this function must use standard WP API instead of raw SQL queries. I think "API" mean "get_approved_comments() function" from the /wp-includes/comment.php file.
If I'm not wrong, the solution is then to modify the latter to filter on dates and rewrite comments_template() to use it instead of SQL queries.
#3
@
19 years ago
- Milestone changed from 2.3 (trunk) to 2.4 (future)
Comment timestamps can only be edited after they are submitted. So they'll be "in the present" when originally submitted. What is the point of pushing them to the future? Isn't the cat already out of the bag at that point?
That whole chunk of SQL needs to be pulled out of there and into the main wpdb stuff anyway. Just my 2 cents.