mirror of
https://github.com/friendica/friendica
synced 2025-04-24 17:10:11 +00:00
Rename DBA::inArray to DBA::toArray
This commit is contained in:
parent
f051ae1698
commit
4db98eb43d
17 changed files with 34 additions and 34 deletions
|
@ -55,7 +55,7 @@ class Contact extends BaseObject
|
|||
local_user()
|
||||
);
|
||||
if (DBM::is_result($stmt)) {
|
||||
$return = DBA::inArray($stmt);
|
||||
$return = DBA::toArray($stmt);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -401,14 +401,14 @@ class Contact extends BaseObject
|
|||
$s = DBA::p("SELECT `id`, `id` AS `cid`, 0 AS `gid`, 0 AS `zid`, `uid`, `url`, `nurl`, `alias`, `network`, `name`, `nick`, `addr`, `location`, `about`, `xmpp`,
|
||||
`keywords`, `gender`, `photo`, `thumb`, `micro`, `forum`, `prv`, (`forum` | `prv`) AS `community`, `contact-type`, `bd` AS `birthday`, `self`
|
||||
FROM `contact` WHERE `nurl` = ? AND `uid` = ?", normalise_link($url), $uid);
|
||||
$r = DBA::inArray($s);
|
||||
$r = DBA::toArray($s);
|
||||
|
||||
// Fetch contact data from the contact table for the given user, checking with the alias
|
||||
if (!DBM::is_result($r)) {
|
||||
$s = DBA::p("SELECT `id`, `id` AS `cid`, 0 AS `gid`, 0 AS `zid`, `uid`, `url`, `nurl`, `alias`, `network`, `name`, `nick`, `addr`, `location`, `about`, `xmpp`,
|
||||
`keywords`, `gender`, `photo`, `thumb`, `micro`, `forum`, `prv`, (`forum` | `prv`) AS `community`, `contact-type`, `bd` AS `birthday`, `self`
|
||||
FROM `contact` WHERE `alias` IN (?, ?, ?) AND `uid` = ?", normalise_link($url), $url, $ssl_url, $uid);
|
||||
$r = DBA::inArray($s);
|
||||
$r = DBA::toArray($s);
|
||||
}
|
||||
|
||||
// Fetch the data from the contact table with "uid=0" (which is filled automatically)
|
||||
|
@ -416,7 +416,7 @@ class Contact extends BaseObject
|
|||
$s = DBA::p("SELECT `id`, 0 AS `cid`, `id` AS `zid`, 0 AS `gid`, `uid`, `url`, `nurl`, `alias`, `network`, `name`, `nick`, `addr`, `location`, `about`, `xmpp`,
|
||||
`keywords`, `gender`, `photo`, `thumb`, `micro`, `forum`, `prv`, (`forum` | `prv`) AS `community`, `contact-type`, `bd` AS `birthday`, 0 AS `self`
|
||||
FROM `contact` WHERE `nurl` = ? AND `uid` = 0", normalise_link($url));
|
||||
$r = DBA::inArray($s);
|
||||
$r = DBA::toArray($s);
|
||||
}
|
||||
|
||||
// Fetch the data from the contact table with "uid=0" (which is filled automatically) - checked with the alias
|
||||
|
@ -424,7 +424,7 @@ class Contact extends BaseObject
|
|||
$s = DBA::p("SELECT `id`, 0 AS `cid`, `id` AS `zid`, 0 AS `gid`, `uid`, `url`, `nurl`, `alias`, `network`, `name`, `nick`, `addr`, `location`, `about`, `xmpp`,
|
||||
`keywords`, `gender`, `photo`, `thumb`, `micro`, `forum`, `prv`, (`forum` | `prv`) AS `community`, `contact-type`, `bd` AS `birthday`, 0 AS `self`
|
||||
FROM `contact` WHERE `alias` IN (?, ?, ?) AND `uid` = 0", normalise_link($url), $url, $ssl_url);
|
||||
$r = DBA::inArray($s);
|
||||
$r = DBA::toArray($s);
|
||||
}
|
||||
|
||||
// Fetch the data from the gcontact table
|
||||
|
@ -432,7 +432,7 @@ class Contact extends BaseObject
|
|||
$s = DBA::p("SELECT 0 AS `id`, 0 AS `cid`, `id` AS `gid`, 0 AS `zid`, 0 AS `uid`, `url`, `nurl`, `alias`, `network`, `name`, `nick`, `addr`, `location`, `about`, '' AS `xmpp`,
|
||||
`keywords`, `gender`, `photo`, `photo` AS `thumb`, `photo` AS `micro`, 0 AS `forum`, 0 AS `prv`, `community`, `contact-type`, `birthday`, 0 AS `self`
|
||||
FROM `gcontact` WHERE `nurl` = ?", normalise_link($url));
|
||||
$r = DBA::inArray($s);
|
||||
$r = DBA::toArray($s);
|
||||
}
|
||||
|
||||
if (DBM::is_result($r)) {
|
||||
|
@ -866,7 +866,7 @@ class Contact extends BaseObject
|
|||
);
|
||||
|
||||
$s = DBA::select('contact', ['id'], ['nurl' => normalise_link($data["url"]), 'uid' => $uid], ['order' => ['id'], 'limit' => 2]);
|
||||
$contacts = DBA::inArray($s);
|
||||
$contacts = DBA::toArray($s);
|
||||
if (!DBM::is_result($contacts)) {
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -739,7 +739,7 @@ class Event extends BaseObject
|
|||
|
||||
$events = DBA::select('event', $fields, $conditions);
|
||||
if (DBM::is_result($events)) {
|
||||
$return = DBA::inArray($events);
|
||||
$return = DBA::toArray($events);
|
||||
}
|
||||
|
||||
return $return;
|
||||
|
|
|
@ -114,7 +114,7 @@ class Group extends BaseObject
|
|||
local_user()
|
||||
);
|
||||
|
||||
return DBA::inArray($stmt);
|
||||
return DBA::toArray($stmt);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -557,7 +557,7 @@ class Profile
|
|||
DateTimeFormat::utcNow()
|
||||
);
|
||||
if (DBM::is_result($s)) {
|
||||
$r = DBA::inArray($s);
|
||||
$r = DBA::toArray($s);
|
||||
Cache::set($cachekey, $r, CACHE_HOUR);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue