X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fupdate_contact.php;h=b97e9ec7be9df49a2cfa1b65d45f5f496f842f47;hb=a609e545b66808f8a8e6c9d2f8dab08acd968880;hp=9681e7c17979f977a32904ec267a660e17e5df83;hpb=a12069c2cd8eb18b982d74cf3c27368a0ad5af9f;p=friendica.git diff --git a/mod/update_contact.php b/mod/update_contact.php index 9681e7c179..b97e9ec7be 100644 --- a/mod/update_contact.php +++ b/mod/update_contact.php @@ -1,6 +1,6 @@ argv[1]) && (!empty($_GET['force']) || !DI::pConfig()->get(local_user(), 'system', 'no_auto_update'))) { - if (!empty($_GET['item'])) { - $item = Item::selectFirst(['parent'], ['id' => $_GET['item']]); - $parentid = $item['parent'] ?? 0; - } else { - $parentid = 0; + 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'] ?? ''); } - $text = Contact::getConversationsHMTL($a, $a->argv[1], true, $parentid); - } else { - $text = ''; } - System::htmlUpdateExit($text); + + System::htmlUpdateExit($text ?? ''); }