From a638417ab58e7b0379679e1b4f7682389fddf060 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 29 Nov 2015 23:46:10 +0100 Subject: [PATCH] Show contact comments in the post --- mod/contacts.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mod/contacts.php b/mod/contacts.php index 3cb5454a64..48d9c87e83 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -890,14 +890,18 @@ function contact_posts($a, $contact_id) { $r = q("SELECT `item`.`uri`, `item`.*, `item`.`id` AS `item_id`, `author-name` AS `name`, `owner-avatar` AS `photo`, `owner-link` AS `url`, `owner-avatar` AS `thumb` - FROM `item` WHERE `item`.`uid` = %d AND `contact-id` = %d AND `item`.`id` = `item`.`parent` + FROM `item` WHERE `item`.`uid` = %d AND `contact-id` = %d + AND ((`item`.`id` = `item`.`parent`) OR (`author-link` = '%s')) ORDER BY `item`.`created` DESC LIMIT %d, %d", intval(local_user()), intval($contact_id), + dbesc($contact["url"]), intval($a->pager['start']), intval($a->pager['itemspage']) ); + + $tab_str = contact_tabs($a, $contact_id, 1); $header = $contact["name"];