mirror of
https://github.com/friendica/friendica
synced 2025-04-26 17:10:10 +00:00
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
|
@ -222,7 +222,7 @@ function api_login(App $a)
|
|||
} else {
|
||||
$user_id = User::authenticate(trim($user), trim($password));
|
||||
if ($user_id) {
|
||||
$record = dba::select('user', [], ['uid' => $user_id], ['limit' => 1]);
|
||||
$record = dba::selectOne('user', [], ['uid' => $user_id]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -473,7 +473,7 @@ function api_rss_extra(App $a, $arr, $user_info)
|
|||
*/
|
||||
function api_unique_id_to_nurl($id)
|
||||
{
|
||||
$r = dba::select('contact', array('nurl'), array('uid' => 0, 'id' => $id), array('limit' => 1));
|
||||
$r = dba::selectOne('contact', array('nurl'), array('uid' => 0, 'id' => $id));
|
||||
|
||||
if (DBM::is_result($r)) {
|
||||
return $r["nurl"];
|
||||
|
@ -792,7 +792,7 @@ function api_get_user(App $a, $contact_id = null)
|
|||
|
||||
// If this is a local user and it uses Frio, we can get its color preferences.
|
||||
if ($ret['self']) {
|
||||
$theme_info = dba::select('user', ['theme'], ['uid' => $ret['uid']], ['limit' => 1]);
|
||||
$theme_info = dba::selectOne('user', ['theme'], ['uid' => $ret['uid']]);
|
||||
if ($theme_info['theme'] === 'frio') {
|
||||
$schema = PConfig::get($ret['uid'], 'frio', 'schema');
|
||||
if ($schema && ($schema != '---')) {
|
||||
|
@ -4870,7 +4870,7 @@ function api_friendica_remoteauth()
|
|||
|
||||
// traditional DFRN
|
||||
|
||||
$r = dba::select('contact', [], ['uid' => api_user(), 'nurl' => $c_url], ['limit' => 1]);
|
||||
$r = dba::selectOne('contact', [], ['uid' => api_user(), 'nurl' => $c_url]);
|
||||
|
||||
if (!DBM::is_result($r) || ($r['network'] !== NETWORK_DFRN)) {
|
||||
throw new BadRequestException("Unknown contact");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue