fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2011-02-22 03:30 pm

[dw-free] Don't show backdated entries on Latest Things

[commit: http://hg.dwscoalition.org/dw-free/rev/10893d21f3a3]

http://bugs.dwscoalition.org/show_bug.cgi?id=3469

Don't show backdated entries on the latest feed.

Patch by [personal profile] yvi.

Files modified:
  • cgi-bin/DW/LatestFeed.pm
  • cgi-bin/LJ/Entry.pm
--------------------------------------------------------------------------------
diff -r ca3225625315 -r 10893d21f3a3 cgi-bin/DW/LatestFeed.pm
--- a/cgi-bin/DW/LatestFeed.pm	Tue Feb 22 22:32:10 2011 +0800
+++ b/cgi-bin/DW/LatestFeed.pm	Tue Feb 22 23:29:58 2011 +0800
@@ -252,6 +252,7 @@ sub _process_queue {
         return 0 unless $entry->security eq 'public';
         return 0 unless $entry->poster->include_in_latest_feed &&
                       $entry->journal->include_in_latest_feed;
+        return 0 if $entry->is_backdated;
 
         return 1;
     };
diff -r ca3225625315 -r 10893d21f3a3 cgi-bin/LJ/Entry.pm
--- a/cgi-bin/LJ/Entry.pm	Tue Feb 22 22:32:10 2011 +0800
+++ b/cgi-bin/LJ/Entry.pm	Tue Feb 22 23:29:58 2011 +0800
@@ -1012,6 +1012,12 @@ sub statusvis {
     my $self = $_[0];
     my $vis = $self->prop("statusvis") || '';
     return $vis eq "S" ? "S" : "V";
+}
+
+sub is_backdated {
+    my $self = $_[0];
+
+    return $self->prop( 'opt_backdated' ) ? 1 : 0;
 }
 
 sub is_visible {
--------------------------------------------------------------------------------