mirror of
https://github.com/friendica/friendica
synced 2024-12-24 02:00:15 +00:00
Review dba updates
updates based on review comments.
This commit is contained in:
parent
f5d682fe0a
commit
9409010d2d
1 changed files with 3 additions and 4 deletions
|
@ -382,9 +382,9 @@ class Contact extends BaseObject
|
||||||
return $menu;
|
return $menu;
|
||||||
}
|
}
|
||||||
|
|
||||||
$r = dba::select('contact', array(), array('nurl' => $contact['nurl'], 'network' => $contact['network'], 'uid' => $uid));
|
$r = dba::select('contact', array(), array('nurl' => $contact['nurl'], 'network' => $contact['network'], 'uid' => $uid), array('limit' => 1));
|
||||||
if ($r) {
|
if ($r) {
|
||||||
return self::photoMenu(dba::fetch($r), $uid);
|
return self::photoMenu($r, $uid);
|
||||||
} else {
|
} else {
|
||||||
$profile_link = zrl($contact['url']);
|
$profile_link = zrl($contact['url']);
|
||||||
$connlnk = 'follow/?url=' . $contact['url'];
|
$connlnk = 'follow/?url=' . $contact['url'];
|
||||||
|
@ -721,8 +721,7 @@ class Contact extends BaseObject
|
||||||
|
|
||||||
// There are no posts with "uid = 0" with connector networks
|
// There are no posts with "uid = 0" with connector networks
|
||||||
// This speeds up the query a lot
|
// This speeds up the query a lot
|
||||||
$s = dba::select('contact', array('network', 'id AS author-id', 'contact-type'), array('nurl' => normalise_link($contact_url), 'uid' => 0));
|
$r = dba::select('contact', array('network', 'id AS author-id', 'contact-type'), array('nurl' => normalise_link($contact_url), 'uid' => 0), array('limit' => 1));
|
||||||
$r = dba::inArray($s);
|
|
||||||
|
|
||||||
if (!DBM::is_result($r)) {
|
if (!DBM::is_result($r)) {
|
||||||
return '';
|
return '';
|
||||||
|
|
Loading…
Reference in a new issue