From 2d5768b71c0fa588524849749cfb0b6ffe6300b7 Mon Sep 17 00:00:00 2001 From: git-marijus Date: Thu, 24 Aug 2017 21:47:01 +0200 Subject: ditch discover tab in favour of the public stream app --- Zotlabs/Module/Network.php | 22 ++++------------------ include/conversation.php | 19 +------------------ 2 files changed, 5 insertions(+), 36 deletions(-) diff --git a/Zotlabs/Module/Network.php b/Zotlabs/Module/Network.php index 36ae7f047..82c997270 100644 --- a/Zotlabs/Module/Network.php +++ b/Zotlabs/Module/Network.php @@ -116,7 +116,6 @@ class Network extends \Zotlabs\Web\Controller { $spam = ((x($_GET,'spam')) ? intval($_GET['spam']) : 0); $cmin = ((x($_GET,'cmin')) ? intval($_GET['cmin']) : 0); $cmax = ((x($_GET,'cmax')) ? intval($_GET['cmax']) : 99); - $firehose = ((x($_GET,'fh')) ? intval($_GET['fh']) : 0); $file = ((x($_GET,'file')) ? $_GET['file'] : ''); $xchan = ((x($_GET,'xchan')) ? $_GET['xchan'] : ''); @@ -290,9 +289,6 @@ class Network extends \Zotlabs\Web\Controller { // We only launch liveUpdate if you aren't filtering in some incompatible // way and also you aren't writing a comment (discovered in javascript). - if($gid || $cid || $cmin || ($cmax != 99) || $star || $liked || $conv || $spam || $nouveau || $list) - $firehose = 0; - $maxheight = get_pconfig(local_channel(),'system','network_divmore_height'); if(! $maxheight) $maxheight = 400; @@ -315,7 +311,7 @@ class Network extends \Zotlabs\Web\Controller { '$liked' => (($liked) ? $liked : '0'), '$conv' => (($conv) ? $conv : '0'), '$spam' => (($spam) ? $spam : '0'), - '$fh' => (($firehose) ? $firehose : '0'), + '$fh' => '0', '$nouveau' => (($nouveau) ? $nouveau : '0'), '$wall' => '0', '$static' => $static, @@ -409,17 +405,7 @@ class Network extends \Zotlabs\Web\Controller { } $abook_uids = " and abook.abook_channel = " . local_channel() . " "; - - $disable_discover_tab = get_config('system','disable_discover_tab') || get_config('system','disable_discover_tab') === false; - if($firehose && (! $disable_discover_tab)) { - require_once('include/channel.php'); - $sys = get_sys_channel(); - $uids = " and item.uid = " . intval($sys['channel_id']) . " "; - \App::$data['firehose'] = intval($sys['channel_id']); - } - else { - $uids = " and item.uid = " . local_channel() . " "; - } + $uids = " and item.uid = " . local_channel() . " "; if(get_pconfig(local_channel(),'system','network_list_mode')) $page_mode = 'list'; @@ -516,7 +502,7 @@ class Network extends \Zotlabs\Web\Controller { dbesc($parents_str) ); - xchan_query($items,true,(($firehose) ? local_channel() : 0)); + xchan_query($items,true); $items = fetch_post_tags($items,true); $items = conv_sort($items,$ordering); } @@ -546,7 +532,7 @@ class Network extends \Zotlabs\Web\Controller { } } - if(($update_unseen) && (! $firehose)) { + if($update_unseen) { $x = [ 'channel_id' => local_channel(), 'update' => 'unset' ]; call_hooks('update_unseen',$x); if($x['update'] === 'unset' || intval($x['update'])) { diff --git a/include/conversation.php b/include/conversation.php index 2d5ccb5b1..78d90a6fc 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -1616,7 +1616,6 @@ function network_tabs() { $conv_active = ''; $spam_active = ''; $postord_active = ''; - $public_active = ''; if(x($_GET,'new')) { $new_active = 'active'; @@ -1638,16 +1637,11 @@ function network_tabs() { $spam_active = 'active'; } - if(x($_GET,'fh')) { - $public_active = 'active'; - } - if (($new_active == '') && ($starred_active == '') && ($conv_active == '') && ($search_active == '') - && ($spam_active == '') - && ($public_active == '')) { + && ($spam_active == '')) { $no_active = 'active'; } @@ -1665,17 +1659,6 @@ function network_tabs() { // tabs $tabs = array(); - $disable_discover_tab = get_config('system','disable_discover_tab') || get_config('system','disable_discover_tab') === false; - - if(! $disable_discover_tab) { - $tabs[] = array( - 'label' => t('Discover'), - 'url' => z_root() . '/' . $cmd . '?f=&fh=1' , - 'sel' => $public_active, - 'title' => t('Imported public streams'), - ); - } - $tabs[] = array( 'label' => t('Commented Order'), 'url'=>z_root() . '/' . $cmd . '?f=&order=comment' . ((x($_GET,'cid')) ? '&cid=' . $_GET['cid'] : '') . ((x($_GET,'gid')) ? '&gid=' . $_GET['gid'] : ''), -- cgit v1.2.3 From 383b7928cf41b750ec367abfc8cbfdc71e1a6291 Mon Sep 17 00:00:00 2001 From: git-marijus Date: Thu, 24 Aug 2017 22:32:28 +0200 Subject: minor adjustmen to the help language selector --- view/js/mod_help.js | 2 +- view/tpl/help.tpl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/view/js/mod_help.js b/view/js/mod_help.js index 257be67e6..8ee89dd61 100644 --- a/view/js/mod_help.js +++ b/view/js/mod_help.js @@ -103,7 +103,7 @@ $(document).ready(function () { window.history.pushState({}, '', '/' + pathParts.join('/')); // Highlight the language in the language selector that is currently viewed - $('.lang-selector').find('.lang-choice:contains("' + help_language + '")').css('font-weight','bold').css('background-color','lightgray'); + $('.lang-selector').find('.lang-choice:contains("' + help_language + '")').addClass('active'); // Construct the links to the available translations based and populate the selector menu $('.lang-selector').find('.lang-choice').each(function (idx, a) { diff --git a/view/tpl/help.tpl b/view/tpl/help.tpl index bdb25edf1..d36494123 100644 --- a/view/tpl/help.tpl +++ b/view/tpl/help.tpl @@ -1,9 +1,9 @@
-
+