Restructured "dba::exists" function
This commit is contained in:
@@ -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']))
|
||||
|
||||
Reference in New Issue
Block a user