From 5edeb0250b1fe1cb6b8e89282b661ab13025e7f0 Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Sun, 13 Oct 2019 14:27:54 +0200 Subject: Revert "Remove visible channels list from pubstream tags cloud creation procedure" This reverts commit 5c4c6e68f600d50deed8ddb32dd6702af9b52853 --- Zotlabs/Module/Channel.php | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) (limited to 'Zotlabs/Module/Channel.php') diff --git a/Zotlabs/Module/Channel.php b/Zotlabs/Module/Channel.php index b1639b213..3f617fd18 100644 --- a/Zotlabs/Module/Channel.php +++ b/Zotlabs/Module/Channel.php @@ -13,6 +13,7 @@ require_once('include/items.php'); require_once('include/security.php'); require_once('include/conversation.php'); require_once('include/acl_selectors.php'); +require_once('include/opengraph.php'); /** @@ -111,17 +112,6 @@ class Channel extends Controller { // we start loading content profile_load($which,$profile); - - App::$page['htmlhead'] .= '' . "\r\n"; - App::$page['htmlhead'] .= '' . "\r\n"; - - if(App::$profile['about'] && perm_is_allowed($channel['channel_id'],get_observer_hash(),'view_profile')) { - App::$page['htmlhead'] .= '' . "\r\n"; - } - else { - App::$page['htmlhead'] .= '' . "\r\n"; - } - } function get($update = 0, $load = false) { @@ -362,7 +352,7 @@ class Channel extends Controller { $parents_str = ids_to_querystr($r,'item_id'); - $items = q("SELECT item.*, item.id AS item_id + $r = q("SELECT item.*, item.id AS item_id FROM item WHERE item.uid = %d $item_normal AND item.parent IN ( %s ) @@ -371,8 +361,8 @@ class Channel extends Controller { dbesc($parents_str) ); - xchan_query($items); - $items = fetch_post_tags($items, true); + xchan_query($r); + $items = fetch_post_tags($r, true); $items = conv_sort($items,$ordering); if($load && $mid && (! count($items))) { @@ -385,6 +375,9 @@ class Channel extends Controller { $items = array(); } + // Add Opengraph markup + opengraph_add_meta((isset($decoded) && (! empty($items)) ? $r[0] : array()), App::$profile); + if((! $update) && (! $load)) { if($decoded) -- cgit v1.2.3