]> git.mxchange.org Git - friendica.git/blobdiff - mod/display.php
Merge https://github.com/friendica/friendica into pull
[friendica.git] / mod / display.php
index 5c23559c5c7495482855037833570070ad445238..2ac1c369ebc33cc2852a25b6573d7fbe236e4ed4 100644 (file)
@@ -40,6 +40,7 @@ function display_content(&$a, $update = 0) {
 
        if($update) {
                $item_id = $_REQUEST['item_id'];
+               $a->profile = array('uid' => intval($update), 'profile_uid' => intval($update));
        }
        else {
                $item_id = (($a->argc > 2) ? intval($a->argv[2]) : 0);
@@ -119,6 +120,8 @@ function display_content(&$a, $update = 0) {
        $sql_extra = item_permissions_sql($a->profile['uid'],$remote_contact,$groups);
 
        if($update) {
+
+dbg(1);
                $r = q("SELECT id FROM item WHERE item.uid = %d
                        AND `item`.`parent` = ( SELECT `parent` FROM `item` WHERE ( `id` = '%s' OR `uri` = '%s' ))
                        $sql_extra AND unseen = 1",
@@ -126,6 +129,7 @@ function display_content(&$a, $update = 0) {
                        dbesc($item_id),
                        dbesc($item_id) 
                );
+dbg(0);
                if(!$r)
                        return '';
        }