[dw-free] show=P, etc not always displaying the current view for the navstrip on the read page
[commit: http://hg.dwscoalition.org/dw-free/rev/01fa81116200]
http://bugs.dwscoalition.org/show_bug.cgi?id=1096
Less strict checking on the inputs to make the navbar select the right item
in the dropdown in more cases.
Patch by
fu.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=1096
Less strict checking on the inputs to make the navbar select the right item
in the dropdown in more cases.
Patch by
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Files modified:
- cgi-bin/weblib.pl
-------------------------------------------------------------------------------- diff -r ae3c6b7debb8 -r 01fa81116200 cgi-bin/weblib.pl --- a/cgi-bin/weblib.pl Sun May 02 05:35:12 2010 +0000 +++ b/cgi-bin/weblib.pl Sun May 02 05:37:39 2010 +0000 @@ -2787,16 +2787,16 @@ sub control_strip my $selected = "all"; if ($r->uri eq "/read" && $r->query_string ne "") { - $selected = "showpeople" if $r->query_string eq "show=P&filter=0"; - $selected = "showcommunities" if $r->query_string eq "show=C&filter=0"; - $selected = "showsyndicated" if $r->query_string eq "show=F&filter=0"; + $selected = "showpeople" if $r->query_string =~ /\bshow=P\b/; + $selected = "showcommunities" if $r->query_string =~ /\bshow=C\b/; + $selected = "showsyndicated" if $r->query_string =~ /\bshow=F\b/; } elsif ($r->uri =~ /^\/read\/?(.+)?/i) { my $filter = $1 || "default view"; $selected = "filter:" . LJ::durl( lc( $filter ) ); } elsif ($r->uri eq "/network" && $r->query_string ne "") { - $selected = "showpeople" if $r->query_string eq "show=P&filter=0"; - $selected = "showcommunities" if $r->query_string eq "show=C&filter=0"; - $selected = "showsyndicated" if $r->query_string eq "show=F&filter=0"; + $selected = "showpeople" if $r->query_string =~ /\bshow=P\b/; + $selected = "showcommunities" if $r->query_string =~ /\bshow=C\b/; + $selected = "showsyndicated" if $r->query_string =~ /\bshow=F\b/; } $ret .= "$links{'manage_friends'} "; --------------------------------------------------------------------------------