Your message dated Tue, 29 Apr 2008 00:08:01 +0200
with message-id <[EMAIL PROTECTED]>
and subject line 
has caused the Debian Bug report #428844,
regarding Last-modified header on comments feed is updated before comments are 
approved
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [EMAIL PROTECTED]
immediately.)


-- 
428844: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=428844
Debian Bug Tracking System
Contact [EMAIL PROTECTED] with problems
--- Begin Message ---
Package: wordpress
Version: 2.0.10-1

When a comment is submitted to a post and goes into 'pending moderator approval' status, the Last-Modifed and ETag HTTP headers on the Comments RSS feed are updated as if there is already new content in this feed.

Later, when the comment is approved, the headers are not updated again. This means that some RSS readers (eg: Liferea) do not notice the newly-approved comment, since they won't re-fetch a feed unless its headers say there is something new.

A suggested patch is attached to this email (I'm not sure if that's the right way to submit patches - sorry if it isn't).

I am running Debian GNU/Linux 4.0.

Thanks,
James
diff -ur wordpress/wp-includes/comment-functions.php 
wordpress-mod/wp-includes/comment-functions.php
--- wordpress/wp-includes/comment-functions.php 2007-03-26 09:12:38.000000000 
+1000
+++ wordpress-mod/wp-includes/comment-functions.php     2007-06-15 
01:04:50.000000000 +1000
@@ -549,13 +549,13 @@
        if ( !isset($cache_lastcommentmodified[$timezone]) ) {
                switch(strtolower($timezone)) {
                        case 'gmt':
-                               $lastcommentmodified = $wpdb->get_var("SELECT 
comment_date_gmt FROM $wpdb->comments WHERE comment_date_gmt <= '$now' ORDER BY 
comment_date_gmt DESC LIMIT 1");
+                               $lastcommentmodified = $wpdb->get_var("SELECT 
comment_date_gmt FROM $wpdb->comments WHERE comment_date_gmt <= '$now' AND 
comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT 1");
                                break;
                        case 'blog':
-                               $lastcommentmodified = $wpdb->get_var("SELECT 
comment_date FROM $wpdb->comments WHERE comment_date_gmt <= '$now' ORDER BY 
comment_date_gmt DESC LIMIT 1");
+                               $lastcommentmodified = $wpdb->get_var("SELECT 
comment_date FROM $wpdb->comments WHERE comment_date_gmt <= '$now' AND 
comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT 1");
                                break;
                        case 'server':
-                               $lastcommentmodified = $wpdb->get_var("SELECT 
DATE_ADD(comment_date_gmt, INTERVAL '$add_seconds_server' SECOND) FROM 
$wpdb->comments WHERE comment_date_gmt <= '$now' ORDER BY comment_date_gmt DESC 
LIMIT 1");
+                               $lastcommentmodified = $wpdb->get_var("SELECT 
DATE_ADD(comment_date_gmt, INTERVAL '$add_seconds_server' SECOND) FROM 
$wpdb->comments WHERE comment_date_gmt <= '$now' AND comment_approved = '1' 
ORDER BY comment_date_gmt DESC LIMIT 1");
                                break;
                }
                $cache_lastcommentmodified[$timezone] = $lastcommentmodified;

--- End Message ---
--- Begin Message ---
We can definitely consider this bug closed.

Thank you for reporting.

Andrea
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIFkq3MXahCK22/rwRAlztAJ9JzKEmFVw/eyxhF3WouW3vorxpyQCcCEgx
FV0HjQ3OH71KzWYvRmCWKuw=
=sQTd
-----END PGP SIGNATURE-----


--- End Message ---

Reply via email to