forked from .cyb/cyberman
Resolve warnings
This commit is contained in:
parent
fd9aae65ea
commit
c204adbace
|
@ -55,7 +55,7 @@ hook 'before' => sub {
|
||||||
var email => $user->{"email"};
|
var email => $user->{"email"};
|
||||||
var config => config();
|
var config => config();
|
||||||
|
|
||||||
if (grep {$_ eq $user->{"stylesheet"}} @{ config->{"stylesheets"}->{"available"} }) {
|
if ($user->{"stylesheet"} && grep {$_ eq $user->{"stylesheet"}} @{ config->{"stylesheets"}->{"available"} }) {
|
||||||
var stylesheet => $user->{"stylesheet"};
|
var stylesheet => $user->{"stylesheet"};
|
||||||
} else {
|
} else {
|
||||||
var stylesheet => config->{"stylesheets"}->{"default"};
|
var stylesheet => config->{"stylesheets"}->{"default"};
|
||||||
|
|
|
@ -144,6 +144,9 @@ post '/account' => sub {
|
||||||
);
|
);
|
||||||
|
|
||||||
# Instant stylesheet update
|
# Instant stylesheet update
|
||||||
|
if (!$user->{"stylesheet"}) {
|
||||||
|
$user->{"stylesheet"} = 0;
|
||||||
|
}
|
||||||
if ($user->{"stylesheet"} ne $newuser->{"stylesheet"}) {
|
if ($user->{"stylesheet"} ne $newuser->{"stylesheet"}) {
|
||||||
return template 'redir' => {
|
return template 'redir' => {
|
||||||
"redir" => "account?updated=1",
|
"redir" => "account?updated=1",
|
||||||
|
|
Loading…
Reference in New Issue