]> git.mxchange.org Git - friendica.git/blobdiff - mod/display.php
wrong verb in dislike activity body
[friendica.git] / mod / display.php
index 1049b28a0919e3391d96f93105586c1ecf691bc5..de11ec35d65f08836f23d4a5838507fdb604f4f5 100644 (file)
@@ -5,7 +5,8 @@ function display_content(&$a) {
 
        $o = '<div id="live-display"></div>' . "\r\n";
 
-       profile_init($a);
+       $nick = (($a->argc > 1) ? $a->argv[1] : '');
+       profile_load($a,$nick);
 
        $item_id = (($a->argc > 2) ? intval($a->argv[2]) : 0);
 
@@ -92,7 +93,7 @@ function display_content(&$a) {
                FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
                WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0
                AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
-               AND `item`.`parent` = ( SELECT `parent` FROM `item` WHERE ( `id` = '%s' OR `uri` = '%s' ) AND `type` != 'remote' )
+               AND `item`.`parent` = ( SELECT `parent` FROM `item` WHERE ( `id` = '%s' OR `uri` = '%s' ))
                $sql_extra
                ORDER BY `parent` DESC, `gravity` ASC, `id` ASC ",
                intval($a->profile['uid']),
@@ -201,7 +202,7 @@ function display_content(&$a) {
                                        $template = $wallwall;
                                        $commentww = 'ww';
                                        // If it is our contact, use a friendly redirect link
-                                       if(($item['owner-link'] == $item['url']) && ($item['network'] === 'dfrn')) {
+                                       if((link_compare($item['owner-link'],$item['url'])) && ($item['network'] === 'dfrn')) {
                                                $owner_url = $redirect_url;
                                                $osparkle = ' sparkle';
                                        }
@@ -210,7 +211,7 @@ function display_content(&$a) {
                                }
                        }
 
-                       $diff_author = (($item['url'] !== $item['author-link']) ? true : false);
+                       $diff_author = ((link_compare($item['url'],$item['author-link'])) ? false : true);
 
                        $profile_name   = (((strlen($item['author-name']))   && $diff_author) ? $item['author-name']   : $item['name']);
                        $profile_avatar = (((strlen($item['author-avatar'])) && $diff_author) ? $item['author-avatar'] : $item['thumb']);
@@ -240,8 +241,9 @@ function display_content(&$a) {
                                $indent .= ' shiny'; 
 
 
-                       $o .= replace_macros($template,array(
+                       $tmp_item = replace_macros($template,array(
                                '$id' => $item['item_id'],
+                               '$title' => t('View $name\'s profile'),
                                '$profile_url' => $profile_link,
                                '$name' => $profile_name,
                                '$sparkle' => $sparkle,
@@ -263,6 +265,12 @@ function display_content(&$a) {
                                '$comment' => $comment
                        ));
 
+                       $arr = array('item' => $item, 'output' => $tmp_item);
+                       call_hooks('display_item', $arr);
+
+                       $o .= $arr['output'];
+
+
                }
        }
        else {