X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fupdate_contact.php;h=b97e9ec7be9df49a2cfa1b65d45f5f496f842f47;hb=a609e545b66808f8a8e6c9d2f8dab08acd968880;hp=4863ad02ded5b4935c7bac1d631006fea691c775;hpb=6f0d40c6c0957751d5f0de844c81a7a140eb7ec7;p=friendica.git diff --git a/mod/update_contact.php b/mod/update_contact.php index 4863ad02de..b97e9ec7be 100644 --- a/mod/update_contact.php +++ b/mod/update_contact.php @@ -1,6 +1,6 @@ get(local_user(), 'system', 'no_auto_update')) { - $text = Contact::content([], true); - } else { - $text = ''; + if (!empty(DI::args()->get(1)) && !empty($_GET['force'])) { + $contact = DBA::selectFirst('account-user-view', ['pid', 'deleted'], ['id' => DI::args()->get(1)]); + if (DBA::isResult($contact) && empty($contact['deleted'])) { + DI::page()['aside'] = ''; + + if (!empty($_GET['item'])) { + $item = Post::selectFirst(['parent'], ['id' => $_GET['item']]); + } + + $text = Contact::getThreadsFromId($contact['pid'], DI::userSession()->getLocalUserId(), true, $item['parent'] ?? 0, $_GET['last_received'] ?? ''); + } } - System::htmlUpdateExit($text); + System::htmlUpdateExit($text ?? ''); }