[dw-free] Make ?show=F as an alias for ?show=Y on reading page
[commit: http://hg.dwscoalition.org/dw-free/rev/a51d9f8d4c7f]
http://bugs.dwscoalition.org/show_bug.cgi?id=267
Allow show=F for feeds.
Patch by
afuna.
http://bugs.dwscoalition.org/show_bug.cgi?id=267
Allow show=F for feeds.
Patch by
--------------------------------------------------------------------------------
diff -r 372c79f48c2a -r a51d9f8d4c7f cgi-bin/DW/Logic/LogItems.pm
--- a/cgi-bin/DW/Logic/LogItems.pm Fri Feb 20 09:30:41 2009 +0000
+++ b/cgi-bin/DW/Logic/LogItems.pm Fri Feb 20 09:39:32 2009 +0000
@@ -35,7 +35,7 @@ use Carp qw/ confess /;
# - dateformat: either "S2" for S2 code, or anything else for S1
# - common_filter: set true if this is the default view
# - friendsoffriends: load friends of friends, not just friends
-# - showtypes: /[PICNY]/
+# - showtypes: /[PICNYF]/
# - events_date: date to load events for ($u must have friendspage_per_day)
# returns: Array of item hashrefs containing the same elements
sub watch_items
@@ -86,6 +86,9 @@ sub watch_items
my ( $friends, $friends_u, $memcache_only, $valid_types ) = @_;
return unless $friends && $friends_u;
$valid_types ||= uc $args{showtypes};
+
+ # make (F)eeds an alias for s(Y)ndicated
+ $valid_types =~ s/F/Y/g;
# load u objects for all the given
LJ::load_userids_multiple([ map { $_, \$friends_u->{$_} } keys %$friends ], [$remote],
--------------------------------------------------------------------------------
