X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fconversation.php;h=1059941b9e0bcb274b12f678ff37d4f7b6895601;hb=3f03f3b4b7e5bdaefe80d50ec9185e1bf668b927;hp=1b7b34e71ad2938280b2e92f8fe89edb7cb92d1c;hpb=ef1813b88ed48daef68ef801cb959cd81ac20ca5;p=friendica.git diff --git a/include/conversation.php b/include/conversation.php index 1b7b34e71a..1059941b9e 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -389,7 +389,7 @@ function visible_activity($item) { * likes (etc.) can apply to other things besides posts. Check if they are post children, * in which case we handle them specially */ - $hidden_activities = [ACTIVITY_LIKE, ACTIVITY_DISLIKE, ACTIVITY_ATTEND, ACTIVITY_ATTENDNO, ACTIVITY_ATTENDMAYBE]; + $hidden_activities = [ACTIVITY_LIKE, ACTIVITY_DISLIKE, ACTIVITY_ATTEND, ACTIVITY_ATTENDNO, ACTIVITY_ATTENDMAYBE, ACTIVITY_FOLLOW]; foreach ($hidden_activities as $act) { if (activity_match($item['verb'], $act)) { return false; @@ -462,17 +462,17 @@ function conversation(App $a, array $items, Pager $pager, $mode, $update, $previ . "\r\n"; } @@ -482,7 +482,7 @@ function conversation(App $a, array $items, Pager $pager, $mode, $update, $previ if (!$update) { $tab = 'posts'; - if (x($_GET, 'tab')) { + if (!empty($_GET['tab'])) { $tab = Strings::escapeTags(trim($_GET['tab'])); } if ($tab === 'posts') { @@ -497,7 +497,7 @@ function conversation(App $a, array $items, Pager $pager, $mode, $update, $previ } } } elseif ($mode === 'notes') { - $items = conversation_add_children($items, false, $order, $uid); + $items = conversation_add_children($items, false, $order, local_user()); $profile_owner = local_user(); if (!$update) { @@ -524,7 +524,7 @@ function conversation(App $a, array $items, Pager $pager, $mode, $update, $previ ."/?f='; var profile_page = " . $pager->getPage() . "; \r\n"; } } elseif ($mode === 'contacts') { - $items = conversation_add_children($items, true, $order, $uid); + $items = conversation_add_children($items, false, $order, $uid); $profile_owner = 0; if (!$update) { @@ -798,7 +798,7 @@ function conversation_add_children(array $parents, $block_authors, $order, $uid) foreach ($parents AS $parent) { $condition = ["`item`.`parent-uri` = ? AND `item`.`uid` IN (0, ?) ", - $parent['uri'], local_user()]; + $parent['uri'], $uid]; if ($block_authors) { $condition[0] .= "AND NOT `author`.`hidden`"; } @@ -951,7 +951,7 @@ function builtin_activity_puller($item, &$conv_responses) { $url = '' . htmlentities($item['author-name']) . ''; - if (!x($item, 'thr-parent')) { + if (empty($item['thr-parent'])) { $item['thr-parent'] = $item['parent-uri']; } @@ -994,6 +994,7 @@ function builtin_activity_puller($item, &$conv_responses) { function format_like($cnt, array $arr, $type, $id) { $o = ''; $expanded = ''; + $phrase = ''; if ($cnt == 1) { $likers = $arr[0]; @@ -1064,7 +1065,7 @@ function format_like($cnt, array $arr, $type, $id) { $expanded .= "\t" . ''; } - $phrase .= EOL ; + $phrase .= EOL; $o .= Renderer::replaceMacros(Renderer::getMarkupTemplate('voting_fakelink.tpl'), [ '$phrase' => $phrase, '$type' => $type, @@ -1079,7 +1080,7 @@ function status_editor(App $a, $x, $notes_cid = 0, $popup = false) { $o = ''; - $geotag = x($x, 'allow_location') ? Renderer::replaceMacros(Renderer::getMarkupTemplate('jot_geotag.tpl'), []) : ''; + $geotag = !empty($x['allow_location']) ? Renderer::replaceMacros(Renderer::getMarkupTemplate('jot_geotag.tpl'), []) : ''; $tpl = Renderer::getMarkupTemplate('jot-header.tpl'); $a->page['htmlhead'] .= Renderer::replaceMacros($tpl, [ @@ -1100,7 +1101,7 @@ function status_editor(App $a, $x, $notes_cid = 0, $popup = false) // Private/public post links for the non-JS ACL form $private_post = 1; - if (x($_REQUEST, 'public')) { + if (!empty($_REQUEST['public'])) { $private_post = 0; } @@ -1432,11 +1433,11 @@ function sort_thr_commented(array $a, array $b) } function render_location_dummy(array $item) { - if (x($item, 'location') && !empty($item['location'])) { + if (!empty($item['location']) && !empty($item['location'])) { return $item['location']; } - if (x($item, 'coord') && !empty($item['coord'])) { + if (!empty($item['coord']) && !empty($item['coord'])) { return $item['coord']; } }