From 2918338f9caf649a73fc9dbb1a158ade98dc0f1e Mon Sep 17 00:00:00 2001 From: Yorhel Date: Thu, 25 Jun 2020 10:45:41 +0200 Subject: Producers::Page: Set expiration date on prodrelexpand cookie Otherwise it's only remembered for a single session. https://vndb.org/t950.757 --- lib/VNWeb/Producers/Page.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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}(?:/(?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, -- cgit v1.2.3