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 config => config();
|
||||
|
||||
if (grep {$_ eq $user->{"stylesheet"}} @{ config->{"stylesheets"}->{"available"} }) {
|
||||
if ($user->{"stylesheet"} && grep {$_ eq $user->{"stylesheet"}} @{ config->{"stylesheets"}->{"available"} }) {
|
||||
var stylesheet => $user->{"stylesheet"};
|
||||
} else {
|
||||
var stylesheet => config->{"stylesheets"}->{"default"};
|
||||
|
|
|
@ -144,6 +144,9 @@ post '/account' => sub {
|
|||
);
|
||||
|
||||
# Instant stylesheet update
|
||||
if (!$user->{"stylesheet"}) {
|
||||
$user->{"stylesheet"} = 0;
|
||||
}
|
||||
if ($user->{"stylesheet"} ne $newuser->{"stylesheet"}) {
|
||||
return template 'redir' => {
|
||||
"redir" => "account?updated=1",
|
||||
|
|
Loading…
Reference in New Issue