mirror of
https://github.com/friendica/friendica
synced 2025-04-26 13:10:11 +00:00
Restructured "dba::exists" function
This commit is contained in:
parent
b14b44e8a8
commit
1d8c91c478
9 changed files with 33 additions and 35 deletions
|
@ -245,10 +245,7 @@ function profile_sidebar($profile, $block = 0) {
|
|||
$profile_url = normalise_link(App::get_baseurl()."/profile/".$profile["nickname"]);
|
||||
}
|
||||
|
||||
$r = dba::select('contact', array('id'),
|
||||
array('pending' => false, 'uid' => local_user(), 'nurl' => $profile_url), array('limit' => 1));
|
||||
if (dbm::is_result($r))
|
||||
$connect = false;
|
||||
$connect = !dba::exists('contact', array('pending' => false, 'uid' => local_user(), 'nurl' => $profile_url));
|
||||
}
|
||||
|
||||
if ($connect && ($profile['network'] != NETWORK_DFRN) && !isset($profile['remoteconnect']))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue