summaryrefslogtreecommitdiff
path: root/lib/VNDB/Handler
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2018-10-07 09:17:02 +0200
committerYorhel <git@yorhel.nl>2018-10-07 09:17:07 +0200
commit484ee7185666e6ffa1c6be0c4c6d095b3444f60a (patch)
treee3027838caf57c8cf5a112defa668bf69e532019 /lib/VNDB/Handler
parenta69d8c88c0fdcd771a86227768a4acfdf7af9db1 (diff)
Handler::(Tags|Traits): Remember spoiler/filter settings when changing the other
https://vndb.org/t950.517
Diffstat (limited to 'lib/VNDB/Handler')
-rw-r--r--lib/VNDB/Handler/Tags.pm1
-rw-r--r--lib/VNDB/Handler/Traits.pm7
2 files changed, 5 insertions, 3 deletions
diff --git a/lib/VNDB/Handler/Tags.pm b/lib/VNDB/Handler/Tags.pm
index 6b02a6dd..165aadd0 100644
--- a/lib/VNDB/Handler/Tags.pm
+++ b/lib/VNDB/Handler/Tags.pm
@@ -121,6 +121,7 @@ sub tagpage {
end;
end;
input type => 'hidden', class => 'hidden', name => 'fil', id => 'fil', value => $f->{fil};
+ input type => 'hidden', class => 'hidden', name => 'm', id => 'm', value => $f->{m};
if(!@$list) {
p; br; br; txt 'This tag has not been linked to any visual novels yet, or they were hidden because of your spoiler settings or default filters.'; end;
diff --git a/lib/VNDB/Handler/Traits.pm b/lib/VNDB/Handler/Traits.pm
index 683418a1..38f7c9ac 100644
--- a/lib/VNDB/Handler/Traits.pm
+++ b/lib/VNDB/Handler/Traits.pm
@@ -97,9 +97,9 @@ sub traitpage {
h1 'Characters';
p class => 'browseopts';
- a href => "/i$trait?m=0", $f->{m} == 0 ? (class => 'optselected') : (), 'Hide spoilers';
- a href => "/i$trait?m=1", $f->{m} == 1 ? (class => 'optselected') : (), 'Show minor spoilers';
- a href => "/i$trait?m=2", $f->{m} == 2 ? (class => 'optselected') : (), 'Spoil me!';
+ a href => "/i$trait?fil=$f->{fil};m=0", $f->{m} == 0 ? (class => 'optselected') : (), 'Hide spoilers';
+ a href => "/i$trait?fil=$f->{fil};m=1", $f->{m} == 1 ? (class => 'optselected') : (), 'Show minor spoilers';
+ a href => "/i$trait?fil=$f->{fil};m=2", $f->{m} == 2 ? (class => 'optselected') : (), 'Spoil me!';
end;
p class => 'filselect';
@@ -108,6 +108,7 @@ sub traitpage {
end;
end;
input type => 'hidden', class => 'hidden', name => 'fil', id => 'fil', value => $f->{fil};
+ input type => 'hidden', class => 'hidden', name => 'm', id => 'm', value => $f->{m};
if(!@$chars) {
p; br; br; txt 'This trait has not been linked to any characters yet, or they were hidden because of your spoiler settings.'; end;