Fix missing $a->data['user'] in mod/cal
This commit is contained in:
parent
ef1c73fb6b
commit
fb39124301
|
@ -29,11 +29,11 @@ function cal_init(App $a)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Config::get('system', 'block_public') && !local_user() && !remote_user()) {
|
if (Config::get('system', 'block_public') && !local_user() && !remote_user()) {
|
||||||
return;
|
System::httpExit(403, ['title' => L10n::t('Access denied.')]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($a->argc < 2) {
|
if ($a->argc < 2) {
|
||||||
System::httpExit(403, ["title" => L10n::t('Access denied.')]);
|
System::httpExit(403, ['title' => L10n::t('Access denied.')]);
|
||||||
}
|
}
|
||||||
|
|
||||||
Nav::setSelected('events');
|
Nav::setSelected('events');
|
||||||
|
@ -41,7 +41,7 @@ function cal_init(App $a)
|
||||||
$nick = $a->argv[1];
|
$nick = $a->argv[1];
|
||||||
$user = DBA::selectFirst('user', [], ['nickname' => $nick, 'blocked' => false]);
|
$user = DBA::selectFirst('user', [], ['nickname' => $nick, 'blocked' => false]);
|
||||||
if (!DBA::isResult($user)) {
|
if (!DBA::isResult($user)) {
|
||||||
return;
|
System::httpExit(404, ['title' => L10n::t('Page not found.')]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$a->data['user'] = $user;
|
$a->data['user'] = $user;
|
||||||
|
|
Loading…
Reference in a new issue