From: Michael Vogel Date: Sun, 1 Feb 2015 15:32:58 +0000 (+0100) Subject: The alias can - or can not - be an SSL link. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=75c60b259576cb53f669901d710c01a721ec84b4;p=friendica.git The alias can - or can not - be an SSL link. --- diff --git a/include/Contact.php b/include/Contact.php index 59c40599bc..6777df65a1 100644 --- a/include/Contact.php +++ b/include/Contact.php @@ -312,15 +312,17 @@ function get_contact($url, $uid = 0) { intval($uid)); if (!$contact) - $contact = q("SELECT `id`, `avatar-date` FROM `contact` WHERE `alias` = '%s' AND `uid` = %d", + $contact = q("SELECT `id`, `avatar-date` FROM `contact` WHERE `alias` IN ('%s', '%s') AND `uid` = %d", + dbesc($url), dbesc(normalise_link($url)), intval($uid)); if ($contact) { $contactid = $contact[0]["id"]; - //$update_photo = ($contact[0]['avatar-date'] < datetime_convert('','','now -2 days')); - $update_photo = ($contact[0]['avatar-date'] < datetime_convert('','','now -12 hours')); + // Update the contact every 7 days + $update_photo = ($contact[0]['avatar-date'] < datetime_convert('','','now -7 days')); + //$update_photo = ($contact[0]['avatar-date'] < datetime_convert('','','now -12 hours')); if (!$update_photo) return($contactid);