[dw-free] Make return values explicit so we don't get any unexpected behavior. Perl returns the last
[commit: http://hg.dwscoalition.org/dw-free/rev/e6a2d4854a20]
Make return values explicit so we don't get any unexpected behavior. Perl
returns the last value that is hanging around, in the absence of an explicit
return, which is why this worked before. (unless $true_value means that
$true_value was returned)
Patch by
fu.
Files modified:
Make return values explicit so we don't get any unexpected behavior. Perl
returns the last value that is hanging around, in the absence of an explicit
return, which is why this worked before. (unless $true_value means that
$true_value was returned)
Patch by
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Files modified:
- cgi-bin/DW/LatestFeed.pm
-------------------------------------------------------------------------------- diff -r 42d5ba037d98 -r e6a2d4854a20 cgi-bin/DW/LatestFeed.pm --- a/cgi-bin/DW/LatestFeed.pm Tue Feb 22 10:44:26 2011 +0800 +++ b/cgi-bin/DW/LatestFeed.pm Tue Feb 22 10:57:51 2011 +0800 @@ -249,9 +249,11 @@ sub _process_queue { my $show_entry = sub { my $entry = $_[0]; - return unless $entry->security eq 'public'; - return unless $entry->poster->include_in_latest_feed && + return 0 unless $entry->security eq 'public'; + return 0 unless $entry->poster->include_in_latest_feed && $entry->journal->include_in_latest_feed; + + return 1; }; my @gq; --------------------------------------------------------------------------------