git.shiar.nl
/
sheet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
keys: replace sign variable by placeholder substitution
[sheet.git]
/
common.inc.plp
diff --git
a/common.inc.plp
b/common.inc.plp
index 563c0e48ba5bdfa8986592c91fb46f65d7287732..f6cd6a6f7a93452a66346a7fdef08af0f5a7da43 100644
(file)
--- a/
common.inc.plp
+++ b/
common.inc.plp
@@
-23,15
+23,15
@@
$header{content_type} = 'text/html; charset=utf-8';
sub stylesheet {
my %styles = map {$_ => $_} @_;
sub stylesheet {
my %styles = map {$_ => $_} @_;
- if (
exists $get{style}
) {
- $style = $styles{ $
get{style}
};
+ if (
defined( my $setstyle = $get{style} )
) {
+ $style = $styles{ $
setstyle
};
eval {
require CGI::Cookie;
my $cookie = CGI::Cookie->new(
-name => 'style',
eval {
require CGI::Cookie;
my $cookie = CGI::Cookie->new(
-name => 'style',
- -value => $s
tyle
,
+ -value => $s
etstyle || ''
,
-path => '/', # site-wide; current page is confusing to most users
-path => '/', # site-wide; current page is confusing to most users
- -expires => $style ? '+5y' : '-1d',
+ -expires => $s
ets
tyle ? '+5y' : '-1d',
) or die "empty object returned\n";
AddCookie($cookie->as_string);
} or warn "Unable to create style cookie: $@";
) or die "empty object returned\n";
AddCookie($cookie->as_string);
} or warn "Unable to create style cookie: $@";