X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModel%2FContact.php;h=067a2fda7f104e44680937d287696b04d1c2100a;hb=6e71a840755c270fe144e638dbe17374f8f575f2;hp=444ecf3c00bcfaef602bbb63ae2d5313f590996c;hpb=179b311978d511513ff03586d415e51677092bfd;p=friendica.git diff --git a/src/Model/Contact.php b/src/Model/Contact.php index 444ecf3c00..067a2fda7f 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -20,6 +20,7 @@ use Friendica\Protocol\Salmon; use dba; require_once 'boot.php'; +require_once 'include/dba.php'; require_once 'include/text.php'; /** @@ -196,7 +197,7 @@ class Contact extends BaseObject * up or some other transient event and that there's a possibility we could recover from it. * * @param array $contact contact to mark for archival - * @return type + * @return null */ public static function markForArchival(array $contact) { @@ -606,7 +607,7 @@ class Contact extends BaseObject AND `id` NOT IN ( SELECT DISTINCT(`contact-id`) FROM `group_member` - JOIN `group` ON `group`.`id` = `group_member`.`gid` + INNER JOIN `group` ON `group`.`id` = `group_member`.`gid` WHERE `group`.`uid` = %d ) LIMIT %d, %d", intval($uid), intval($uid), intval($start), intval($count) @@ -661,7 +662,7 @@ class Contact extends BaseObject if (!DBM::is_result($contact)) { // The link could be provided as http although we stored it as https $ssl_url = str_replace('http://', 'https://', $url); - $r = dba::select('contact', array('id', 'avatar-date'), array('`alias` IN (?, ?, ?) AND `uid` = ?', $url, normalise_link($url), $ssl_url, $uid), array('limit' => 1)); + $r = dba::select('contact', array('id', 'avatar', 'avatar-date'), array('`alias` IN (?, ?, ?) AND `uid` = ?', $url, normalise_link($url), $ssl_url, $uid), array('limit' => 1)); $contact = dba::fetch($r); dba::close($r); } @@ -673,7 +674,7 @@ class Contact extends BaseObject $update_contact = ($contact['avatar-date'] < datetime_convert('', '', 'now -7 days')); // We force the update if the avatar is empty - if ($contact['avatar'] == '') { + if (!x($contact, 'avatar')) { $update_contact = true; }