X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=mod%2Fdisplay.php;h=64df4cc6a9d7fc36a952a107f2845ccfaa21bf7c;hb=34081010ff2eeab2863bfe409f7fd75ecb9e2b20;hp=92ffd1a7095c7cc1b07bd8de1978f301fb84aa22;hpb=0c36d5b3cfc939b89977e291968a9f11918469b6;p=friendica.git diff --git a/mod/display.php b/mod/display.php index 92ffd1a709..64df4cc6a9 100644 --- a/mod/display.php +++ b/mod/display.php @@ -35,8 +35,18 @@ function display_content(&$a) { $contact = null; $remote_contact = false; - if(remote_user()) { - $contact_id = $_SESSION['visitor_id']; + $contact_id = 0; + + if(is_array($_SESSION['remote'])) { + foreach($_SESSION['remote'] as $v) { + if($v['uid'] == $a->profile['uid']) { + $contact_id = $v['cid']; + break; + } + } + } + + if($contact_id) { $groups = init_groups_visitor($contact_id); $r = q("SELECT * FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1", intval($contact_id), @@ -113,8 +123,9 @@ function display_content(&$a) { ); } - - $o .= conversation($a,$r,'display', false); + $items = conv_sort($r,"`commented`"); + + $o .= conversation($a,$items,'display', false); } else {