mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-17 02:45:16 +02:00
pm replies
This commit is contained in:
parent
0c24784f5e
commit
7eba8adbf7
8 changed files with 158 additions and 45 deletions
|
@ -217,11 +217,19 @@ function message_content(&$a) {
|
|||
);
|
||||
if(count($r)) {
|
||||
$contact_id = $r[0]['contact-id'];
|
||||
$convid = $r[0]['convid'];
|
||||
|
||||
$sql_extra = sprintf(" and `mail`.`parent-uri` = '%s' ", dbesc($r[0]['parent-uri']));
|
||||
if($convid)
|
||||
$sql_extra = sprintf(" and ( `mail`.`parent-uri` = '%s' OR `mail`.`convid` = '%d' ) ",
|
||||
dbesc($r[0]['parent-uri']),
|
||||
intval($convid)
|
||||
);
|
||||
|
||||
$messages = q("SELECT `mail`.*, `contact`.`name`, `contact`.`url`, `contact`.`thumb`
|
||||
FROM `mail` LEFT JOIN `contact` ON `mail`.`contact-id` = `contact`.`id`
|
||||
WHERE `mail`.`uid` = %d AND `mail`.`parent-uri` = '%s' ORDER BY `mail`.`created` ASC",
|
||||
intval(local_user()),
|
||||
dbesc($r[0]['parent-uri'])
|
||||
WHERE `mail`.`uid` = %d $sql_extra ORDER BY `mail`.`created` ASC",
|
||||
intval(local_user())
|
||||
);
|
||||
}
|
||||
if(! count($messages)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue