X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModel%2FContact.php;h=067a2fda7f104e44680937d287696b04d1c2100a;hb=045a0b2a007d869fc141f3f4a7a1761589565fdf;hp=2203b62162372e482e084e5eb0607a4a41b8720f;hpb=868a84c5cc2db5b27f719687a0d9f3bd92e1209d;p=friendica.git diff --git a/src/Model/Contact.php b/src/Model/Contact.php index 2203b62162..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) { @@ -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; }