]> git.mxchange.org Git - friendica.git/blobdiff - src/Content/Conversation.php
Reverted some changes that won't work with PHP7.3
[friendica.git] / src / Content / Conversation.php
index a3bdecc3f950f5c97e8f780bd72ef72d1eabbab5..da9aee87b00aee1090954c904e1bda589abcdc4d 100644 (file)
@@ -146,7 +146,7 @@ class Conversation
                                        'url'     => $activity['author-link']
                                ];
                                $url = Contact::magicLinkByContact($author);
-                               if (strpos($url, 'redir/') === 0) {
+                               if (strpos($url, 'contact/redir/') === 0) {
                                        $sparkle = ' class="sparkle" ';
                                }
 
@@ -493,14 +493,14 @@ class Conversation
                        if (!$update) {
                                $live_update_div = '<div id="live-notes"></div>' . "\r\n"
                                        . "<script> var profile_uid = " . $this->session->getLocalUserId()
-                                       . "; var netargs = '/?f='; </script>\r\n";
+                                       . "; var netargs = '?f='; </script>\r\n";
                        }
                } elseif ($mode === 'display') {
                        $items = $this->addChildren($items, false, $order, $uid, $mode);
 
                        if (!$update) {
                                $live_update_div = '<div id="live-display"></div>' . "\r\n"
-                                       . "<script> var profile_uid = " . $this->session->getLocalUserId() ?? 0 . ";"
+                                       . "<script> var profile_uid = " . ($this->session->getLocalUserId() ?: 0) . ";"
                                        . "</script>";
                        }
                } elseif ($mode === 'community') {
@@ -520,7 +520,7 @@ class Conversation
                        if (!$update) {
                                $live_update_div = '<div id="live-contact"></div>' . "\r\n"
                                        . "<script> var profile_uid = -1; var netargs = '" . substr($this->args->getCommand(), 8)
-                                       ."/?f='; </script>\r\n";
+                                       ."?f='; </script>\r\n";
                        }
                } elseif ($mode === 'search') {
                        $live_update_div = '<div id="live-search"></div>' . "\r\n";
@@ -612,7 +612,7 @@ class Conversation
                                        $profile_link = Contact::magicLinkByContact($author);
 
                                        $sparkle = '';
-                                       if (strpos($profile_link, 'redir/') === 0) {
+                                       if (strpos($profile_link, 'contact/redir/') === 0) {
                                                $sparkle = ' sparkle';
                                        }
 
@@ -970,7 +970,7 @@ class Conversation
                }
 
                $condition = DBA::mergeConditions($condition,
-                       ["`uid` IN (0, ?) AND (`vid` != ? OR `vid` IS NULL)", $uid, Verb::getID(Activity::FOLLOW)]);
+                       ["`uid` IN (0, ?) AND (NOT `vid` IN (?, ?) OR `vid` IS NULL)", $uid, Verb::getID(Activity::FOLLOW), Verb::getID(Activity::VIEW)]);
 
                $thread_parents = Post::select(['uri-id', 'causer-id'], $condition, ['order' => ['uri-id' => false, 'uid']]);