+
+ $profiledata = Contact::getDetailsByURL($contact["url"]);
+
+ if (local_user()) {
+ if (in_array($profiledata["network"], [Protocol::DFRN, Protocol::DIASPORA, Protocol::OSTATUS])) {
+ $profiledata["remoteconnect"] = System::baseUrl()."/follow?url=".urlencode($profiledata["url"]);
+ }
+ }
+
+ Profile::load($a, "", 0, $profiledata, true);
+ $o .= Contact::getPostsFromUrl($contact["url"], true, $update);
+ }
+
+ return $o;
+}
+
+function contact_posts(App $a, $contact_id)
+{
+ $contact = DBA::selectFirst('contact', ['uid', 'url', 'id'], ['id' => $contact_id]);
+
+ $o = contacts_tab($a, $contact, 2);
+
+ if (DBA::isResult($contact)) {
+ $a->page['aside'] = "";
+
+ $profiledata = Contact::getDetailsByURL($contact["url"]);
+
+ if (local_user()) {
+ if (in_array($profiledata["network"], [Protocol::DFRN, Protocol::DIASPORA, Protocol::OSTATUS])) {
+ $profiledata["remoteconnect"] = System::baseUrl()."/follow?url=".urlencode($profiledata["url"]);
+ }
+ }
+
+ Profile::load($a, "", 0, $profiledata, true);