The alias can - or can not - be an SSL link.

This commit is contained in:
Michael Vogel 2015-02-01 16:32:58 +01:00
parent b95d34f9db
commit 75c60b2595

View file

@ -312,15 +312,17 @@ function get_contact($url, $uid = 0) {
intval($uid)); intval($uid));
if (!$contact) 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)), dbesc(normalise_link($url)),
intval($uid)); intval($uid));
if ($contact) { if ($contact) {
$contactid = $contact[0]["id"]; $contactid = $contact[0]["id"];
//$update_photo = ($contact[0]['avatar-date'] < datetime_convert('','','now -2 days')); // Update the contact every 7 days
$update_photo = ($contact[0]['avatar-date'] < datetime_convert('','','now -12 hours')); $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) if (!$update_photo)
return($contactid); return($contactid);