X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FContent%2FConversation.php;h=cdc6e6351f35fbb5b955d7f998f9af60bfc2b73e;hb=1087e36a63cdb2e830d3d368f98042ab64e7b4ed;hp=de4b6903886c997b2083b423154a785b6fd9e920;hpb=65cd49343100d41f3bc0d93c5861d8f0d6aac964;p=friendica.git diff --git a/src/Content/Conversation.php b/src/Content/Conversation.php index de4b690388..cdc6e6351f 100644 --- a/src/Content/Conversation.php +++ b/src/Content/Conversation.php @@ -314,7 +314,7 @@ class Conversation $tpl = Renderer::getMarkupTemplate('jot-header.tpl'); $this->page['htmlhead'] .= Renderer::replaceMacros($tpl, [ '$newpost' => 'true', - '$baseurl' => $this->baseURL->get(true), + '$baseurl' => $this->baseURL, '$geotag' => $geotag, '$nickname' => $x['nickname'], '$ispublic' => $this->l10n->t('Visible to everybody'), @@ -385,7 +385,7 @@ class Conversation '$posttype' => $notes_cid ? ItemModel::PT_PERSONAL_NOTE : ItemModel::PT_ARTICLE, '$content' => $x['content'] ?? '', '$post_id' => $x['post_id'] ?? '', - '$baseurl' => $this->baseURL->get(true), + '$baseurl' => $this->baseURL, '$defloc' => $x['default_location'], '$visitor' => $x['visitor'], '$pvisit' => $notes_cid ? 'none' : $x['visitor'], @@ -446,8 +446,6 @@ class Conversation $this->page->registerStylesheet(Theme::getPathForFile('js/friendica-tagsinput/friendica-tagsinput.css')); $this->page->registerStylesheet(Theme::getPathForFile('js/friendica-tagsinput/friendica-tagsinput-typeahead.css')); - $ssl_state = (bool)$this->session->getLocalUserId(); - $live_update_div = ''; $blocklist = $this->getBlocklist(); @@ -784,7 +782,7 @@ class Conversation } $o = Renderer::replaceMacros($page_template, [ - '$baseurl' => $this->baseURL->get($ssl_state), + '$baseurl' => $this->baseURL, '$return_path' => $this->args->getQueryString(), '$live_update' => $live_update_div, '$remove' => $this->l10n->t('remove'), @@ -987,6 +985,8 @@ class Conversation $condition = DBA::mergeConditions($condition, ["`uid` IN (0, ?) AND (NOT `vid` IN (?, ?, ?) OR `vid` IS NULL)", $uid, Verb::getID(Activity::FOLLOW), Verb::getID(Activity::VIEW), Verb::getID(Activity::READ)]); + $condition = DBA::mergeConditions($condition, ["(`uid` != ? OR `private` != ?)", 0, ItemModel::PRIVATE]); + $condition = DBA::mergeConditions($condition, ["`visible` AND NOT `deleted` AND NOT `author-blocked` AND NOT `owner-blocked` AND ((NOT `contact-pending` AND (`contact-rel` IN (?, ?))) OR `self` OR `contact-uid` = ?)", @@ -1148,8 +1148,8 @@ class Conversation $emojis[$row['thr-parent-id']][$index]['emoji'] = $emoji; $emojis[$row['thr-parent-id']][$index]['verb'] = $row['verb']; - $emojis[$row['thr-parent-id']][$index]['total'] = $emojis[$row['thr-parent-id']][$emoji]['total'] ?? 0 + $row['total']; - $emojis[$row['thr-parent-id']][$index]['title'] = array_unique(array_merge($emojis[$row['thr-parent-id']][$emoji]['title'] ?? [], explode($separator, $row['title']))); + $emojis[$row['thr-parent-id']][$index]['total'] = ($emojis[$row['thr-parent-id']][$index]['total'] ?? 0) + $row['total']; + $emojis[$row['thr-parent-id']][$index]['title'] = array_unique(array_merge($emojis[$row['thr-parent-id']][$index]['title'] ?? [], explode($separator, $row['title']))); } DBA::close($rows);