Replace dba::select(limit => 1) by dba::selectOne
- Convert array declarations to new style
This commit is contained in:
parent
a2d3cee006
commit
da60893590
51 changed files with 206 additions and 219 deletions
11
mod/cal.php
11
mod/cal.php
|
@ -32,16 +32,13 @@ function cal_init(App $a)
|
|||
|
||||
if ($a->argc > 1) {
|
||||
$nick = $a->argv[1];
|
||||
$user = q("SELECT * FROM `user` WHERE `nickname` = '%s' AND `blocked` = 0 LIMIT 1",
|
||||
dbesc($nick)
|
||||
);
|
||||
|
||||
if (!count($user)) {
|
||||
$user = dba::selectOne('user', [], ['nickname' => $nick, 'blocked' => false]);
|
||||
if (!DBM::is_result($user)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$a->data['user'] = $user[0];
|
||||
$a->profile_uid = $user[0]['uid'];
|
||||
$a->data['user'] = $user;
|
||||
$a->profile_uid = $user['uid'];
|
||||
|
||||
// if it's a json request abort here becaus we don't
|
||||
// need the widget data
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue