diff --git a/include/items.php b/include/items.php index 6cdf5f0f5b..fa07727de1 100644 --- a/include/items.php +++ b/include/items.php @@ -935,8 +935,12 @@ function consume_feed($xml,$importer,$contact, &$hub) { if(! is_array($contact)) return; - if($contact['network'] === 'stat' && strlen($datarray['title'])) - unset($datarray['title']); + if($contact['network'] === 'stat') { + if(strlen($datarray['title'])) + unset($datarray['title']); + if(($contact['rel'] == REL_VIP) || ($contact['rel'] == REL_BUD)) + $datarray['last-child'] = 1; + } $datarray['parent-uri'] = $item_id; $datarray['uid'] = $importer['uid']; $datarray['contact-id'] = $contact['id']; @@ -960,7 +964,7 @@ function new_follower($importer,$contact,$datarray,$item) { if(is_array($contact)) { if($contact['network'] == 'stat' && $contact['rel'] == REL_FAN) { - $q("UPDATE `contact` SET `rel` = %d WHERE `id` = %d AND `uid` = %d LIMIT 1", + $r = q("UPDATE `contact` SET `rel` = %d WHERE `id` = %d AND `uid` = %d LIMIT 1", intval(REL_BUD), intval($contact['id']), intval($importer['uid']) @@ -1010,7 +1014,7 @@ function new_follower($importer,$contact,$datarray,$item) { function lose_follower($importer,$contact,$datarray,$item) { - if($contact['rel'] == REL_BUD) { + if(($contact['rel'] == REL_BUD) || ($contact['rel'] == REL_FAN)) { q("UPDATE `contact` SET `rel` = %d WHERE `id` = %d LIMIT 1", intval(REL_FAN), intval($contact['id']) diff --git a/include/notifier.php b/include/notifier.php index 9e4a7102e8..069f3bdf2e 100644 --- a/include/notifier.php +++ b/include/notifier.php @@ -72,7 +72,7 @@ killme(); } - $r = q("SELECT `contact`.*, `user`.`nickname`, `user`.`page-flags` + $r = q("SELECT `contact`.*, `user`.`nickname`, `user`.`sprvkey`, `user`.`spubkey`, `user`.`page-flags` FROM `contact` LEFT JOIN `user` ON `user`.`uid` = `contact`.`uid` WHERE `contact`.`uid` = %d AND `contact`.`self` = 1 LIMIT 1", intval($uid) diff --git a/include/poller.php b/include/poller.php index e8bdc94a30..e08d76508b 100644 --- a/include/poller.php +++ b/include/poller.php @@ -14,7 +14,6 @@ require_once('datetime.php'); require_once('simplepie/simplepie.inc'); require_once('include/items.php'); - require_once('include/Contact.php'); $debugging = get_config('system','debugging'); diff --git a/include/salmon.php b/include/salmon.php index de0ea3802d..e93ec23d76 100644 --- a/include/salmon.php +++ b/include/salmon.php @@ -136,7 +136,7 @@ EOT; $signature = base64url_encode($rsa->sign($data . $precomputed)); - $signature2 = base64url_encode($rsa->sign($data)); + $signature2 = base64url_encode($rsa->sign($data)); $salmon_tpl = load_view_file('view/magicsig.tpl'); $salmon = replace_macros($salmon_tpl,array( @@ -154,7 +154,7 @@ EOT; )); $a = get_app(); - $return_code = trim($a->get_curl_code); + $return_code = trim($a->get_curl_code()); // check for success, e.g. 2xx @@ -177,7 +177,8 @@ EOT; 'Content-type: application/magic-envelope+xml', 'Content-length: ' . strlen($salmon) )); - $return_code = trim($a->get_curl_code); + $return_code = trim($a->get_curl_code()); + } return; diff --git a/mod/contacts.php b/mod/contacts.php index 9360637150..beb1f1ecb8 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -196,10 +196,11 @@ function contacts_content(&$a) { '$last_update' => (($r[0]['last-update'] == '0000-00-00 00:00:00') ? t('Never') : datetime_convert('UTC',date_default_timezone_get(),$r[0]['last-update'],'D, j M Y, g:i A')), - '$profile_select' => contact_profile_assign($r[0]['profile-id']), + '$profile_select' => contact_profile_assign($r[0]['profile-id'],(($r[0]['network'] !== 'dfrn') ? true : false)), '$contact_id' => $r[0]['id'], '$block_text' => (($r[0]['blocked']) ? t('Unblock this contact') : t('Block this contact') ), '$ignore_text' => (($r[0]['readonly']) ? t('Unignore this contact') : t('Ignore this contact') ), + '$insecure' => (($r[0]['network'] === 'dfrn') ? '' : load_view_file('view/insecure_net.tpl')), '$blocked' => (($r[0]['blocked']) ? '