]> git.mxchange.org Git - friendica.git/blobdiff - src/Content/Conversation.php
Update Event.php
[friendica.git] / src / Content / Conversation.php
index 522de7b5730c30b85a045affdf498b73d557107f..6d19eb16356ce450d22f7ee4714a167285b948c8 100644 (file)
@@ -493,7 +493,7 @@ 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);
@@ -520,13 +520,13 @@ 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";
                }
 
-               $page_dropping = $this->session->getLocalUserId() && $this->session->getLocalUserId() == $uid;
+               $page_dropping = $this->session->getLocalUserId() && $this->session->getLocalUserId() == $uid && $mode != 'search';
 
                if (!$update) {
                        $_SESSION['return_path'] = $this->args->getQueryString();
@@ -794,7 +794,7 @@ class Conversation
                        return [];
                }
 
-               $str_blocked = str_replace(["\n", "\r"], ",", $this->pConfig->get($this->session->getLocalUserId(), 'system', 'blocked'));
+               $str_blocked = str_replace(["\n", "\r"], ",", $this->pConfig->get($this->session->getLocalUserId(), 'system', 'blocked') ?? '');
                if (empty($str_blocked)) {
                        return [];
                }
@@ -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']]);