summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2020-06-25 10:45:41 +0200
committerYorhel <git@yorhel.nl>2020-06-25 10:45:43 +0200
commit2918338f9caf649a73fc9dbb1a158ade98dc0f1e (patch)
treeb2ae115dfa74d0db03d88203bcdcde904392b67e
parent1aebcd5a76c08fa1f0aa9b30efc90ed2ca3e9576 (diff)
Producers::Page: Set expiration date on prodrelexpand cookie
Otherwise it's only remembered for a single session. https://vndb.org/t950.757
-rw-r--r--lib/VNWeb/Producers/Page.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VNWeb/Producers/Page.pm b/lib/VNWeb/Producers/Page.pm
index 2ccf3849..65196e76 100644
--- a/lib/VNWeb/Producers/Page.pm
+++ b/lib/VNWeb/Producers/Page.pm
@@ -149,7 +149,7 @@ TUWF::get qr{/$RE{prev}(?:/(?<tab>vn|rel))?}, sub {
my $pref = tuwf->reqCookie('prodrelexpand') ? 'vn' : 'rel';
my $tab = tuwf->capture('tab') || $pref;
- tuwf->resCookie(prodrelexpand => $tab eq 'vn' ? 1 : undef) if $tab && $tab ne $pref;
+ tuwf->resCookie(prodrelexpand => $tab eq 'vn' ? 1 : undef, expires => time + 315360000) if $tab && $tab ne $pref;
$tab = 'rel' if !$tab;
framework_ title => $p->{name}, index => !tuwf->capture('rev'), type => 'p', dbobj => $p, hiddenmsg => 1,