From 04ae664c9267172cfce0b8c8219bef33681519fb Mon Sep 17 00:00:00 2001 From: zotlabs Date: Wed, 12 Feb 2020 21:36:21 -0800 Subject: [PATCH] network -> stream --- Zotlabs/Lib/ThreadStream.php | 2 +- Zotlabs/Module/Affinity.php | 4 ++-- Zotlabs/Module/Connedit.php | 2 +- Zotlabs/Module/Home.php | 2 +- Zotlabs/Module/Import.php | 2 +- Zotlabs/Module/Notes.php | 2 +- Zotlabs/Module/Ping.php | 12 +++++----- Zotlabs/Module/Rpost.php | 2 +- Zotlabs/Module/Settings/Display.php | 10 ++++----- Zotlabs/Module/{Network.php => Stream.php} | 22 +++++++++---------- Zotlabs/Update/_1237.php | 23 ++++++++++++++++++++ Zotlabs/Widget/Activity.php | 2 +- Zotlabs/Widget/Groups.php | 4 ++-- Zotlabs/Widget/Newmember.php | 2 +- Zotlabs/Widget/Notifications.php | 4 ++-- Zotlabs/Widget/Pinned.php | 2 +- app/{network.apd => stream.apd} | 0 boot.php | 2 +- include/conversation.php | 14 ++++++------ include/items.php | 12 +++++----- view/js/main.js | 4 ++-- view/js/{mod_network.js => mod_stream.js} | 0 view/pdl/{mod_network.pdl => mod_stream.pdl} | 0 view/tpl/settings_display.tpl | 2 +- 24 files changed, 77 insertions(+), 54 deletions(-) rename Zotlabs/Module/{Network.php => Stream.php} (97%) create mode 100644 Zotlabs/Update/_1237.php rename app/{network.apd => stream.apd} (100%) rename view/js/{mod_network.js => mod_stream.js} (100%) rename view/pdl/{mod_network.pdl => mod_stream.pdl} (100%) diff --git a/Zotlabs/Lib/ThreadStream.php b/Zotlabs/Lib/ThreadStream.php index 5b0035bf3..143cb5972 100644 --- a/Zotlabs/Lib/ThreadStream.php +++ b/Zotlabs/Lib/ThreadStream.php @@ -49,7 +49,7 @@ class ThreadStream { $ob_hash = (($this->observer) ? $this->observer['xchan_hash'] : ''); switch($mode) { - case 'network': + case 'stream': $this->profile_owner = local_channel(); $this->writable = true; break; diff --git a/Zotlabs/Module/Affinity.php b/Zotlabs/Module/Affinity.php index afdf1dd8d..de5cd79b5 100644 --- a/Zotlabs/Module/Affinity.php +++ b/Zotlabs/Module/Affinity.php @@ -34,7 +34,7 @@ class Affinity extends \Zotlabs\Web\Controller { function get() { - $desc = t('This app (when installed) presents a slider control in your connection editor and also on your network page. The slider represents your degree of friendship with each connection. It allows you to zoom in or out and display conversations from only your closest friends or everybody in your stream.'); + $desc = t('This app (when installed) presents a slider control in your connection editor and also on your stream page. The slider represents your degree of friendship with each connection. It allows you to zoom in or out and display conversations from only your closest friends or everybody in your stream.'); $text = '
' . $desc . '
'; @@ -42,7 +42,7 @@ class Affinity extends \Zotlabs\Web\Controller { return $text; } - $text .= EOL . t('The number below represents the default maximum slider position for your network/stream page as a percentage.') . EOL . EOL; + $text .= EOL . t('The number below represents the default maximum slider position for your stream page as a percentage.') . EOL . EOL; $setting_fields = $text; diff --git a/Zotlabs/Module/Connedit.php b/Zotlabs/Module/Connedit.php index 2a90f81aa..d0f77ca0a 100644 --- a/Zotlabs/Module/Connedit.php +++ b/Zotlabs/Module/Connedit.php @@ -555,7 +555,7 @@ class Connedit extends Controller { 'recent' => array( 'label' => t('Recent Activity'), - 'url' => z_root() . '/network/?f=&cid=' . $contact['abook_id'], + 'url' => z_root() . '/stream/?f=&cid=' . $contact['abook_id'], 'sel' => '', 'title' => t('View recent posts and comments'), ), diff --git a/Zotlabs/Module/Home.php b/Zotlabs/Module/Home.php index 9d6135e11..cf6fa3d85 100644 --- a/Zotlabs/Module/Home.php +++ b/Zotlabs/Module/Home.php @@ -41,7 +41,7 @@ class Home extends Controller { $dest = get_config('system','startpage'); } if (! $dest) { - $dest = z_root() . '/network'; + $dest = z_root() . '/stream'; } goaway($dest); } diff --git a/Zotlabs/Module/Import.php b/Zotlabs/Module/Import.php index 80705ee92..c96e6c6e9 100644 --- a/Zotlabs/Module/Import.php +++ b/Zotlabs/Module/Import.php @@ -533,7 +533,7 @@ class Import extends Controller { change_channel($channel['channel_id']); - goaway(z_root() . '/network' ); + goaway(z_root() . '/stream' ); } /** diff --git a/Zotlabs/Module/Notes.php b/Zotlabs/Module/Notes.php index a779cec3f..e52742857 100644 --- a/Zotlabs/Module/Notes.php +++ b/Zotlabs/Module/Notes.php @@ -50,7 +50,7 @@ class Notes extends Controller { return $text; } - $desc = t('This app is installed. The Notes tool can be found on your network stream page.'); + $desc = t('This app is installed. The Notes tool can be found on your stream page.'); $text = '
' . $desc . '
'; diff --git a/Zotlabs/Module/Ping.php b/Zotlabs/Module/Ping.php index c1b277e9c..2c3914b77 100644 --- a/Zotlabs/Module/Ping.php +++ b/Zotlabs/Module/Ping.php @@ -33,7 +33,7 @@ class Ping extends Controller { $result['notify'] = 0; $result['home'] = 0; - $result['network'] = 0; + $result['stream'] = 0; $result['intros'] = 0; $result['mail'] = 0; $result['register'] = 0; @@ -234,7 +234,7 @@ class Ping extends Controller { // mark all items read if (x($_REQUEST, 'markRead') && local_channel()) { switch ($_REQUEST['markRead']) { - case 'network': + case 'stream': $r = q("UPDATE item SET item_unseen = 0 WHERE uid = %d AND item_unseen = 1", intval(local_channel()) ); @@ -356,7 +356,7 @@ class Ping extends Controller { } - if (argc() > 1 && (argv(1) === 'network' || argv(1) === 'home')) { + if (argc() > 1 && (argv(1) === 'stream' || argv(1) === 'home')) { $local_result = array(); $item_normal_moderate = $item_normal; @@ -588,13 +588,13 @@ class Ping extends Controller { $result['home'] ++; } else { - $result['network'] ++; + $result['stream'] ++; } } } } if (! ($vnotify & VNOTIFY_NETWORK)) - $result['network'] = 0; + $result['stream'] = 0; if (! ($vnotify & VNOTIFY_CHANNEL)) $result['home'] = 0; @@ -708,7 +708,7 @@ class Ping extends Controller { dbesc($forums[$x]['xchan_hash']) ); if ($r[0]['unseen']) { - $forums[$x]['notify_link'] = (($forums[$x]['private_forum']) ? $forums[$x]['xchan_url'] : z_root() . '/network/?f=&pf=1&cid=' . $forums[$x]['abook_id']); + $forums[$x]['notify_link'] = (($forums[$x]['private_forum']) ? $forums[$x]['xchan_url'] : z_root() . '/stream/?f=&pf=1&cid=' . $forums[$x]['abook_id']); $forums[$x]['name'] = $forums[$x]['xchan_name']; $forums[$x]['addr'] = $forums[$x]['xchan_addr']; $forums[$x]['url'] = $forums[$x]['xchan_url']; diff --git a/Zotlabs/Module/Rpost.php b/Zotlabs/Module/Rpost.php index 35e9c0a0b..935b3bf36 100644 --- a/Zotlabs/Module/Rpost.php +++ b/Zotlabs/Module/Rpost.php @@ -93,7 +93,7 @@ class Rpost extends Controller { if(argc() > 1 && argv(1) === 'return') { if($_SESSION['remote_return']) goaway($_SESSION['remote_return']); - goaway(z_root() . '/network'); + goaway(z_root() . '/stream'); } $plaintext = true; diff --git a/Zotlabs/Module/Settings/Display.php b/Zotlabs/Module/Settings/Display.php index e1b07cf55..dc32ed269 100644 --- a/Zotlabs/Module/Settings/Display.php +++ b/Zotlabs/Module/Settings/Display.php @@ -32,9 +32,9 @@ class Display { $channel_divmore_height = ((x($_POST,'channel_divmore_height')) ? intval($_POST['channel_divmore_height']) : 400); if($channel_divmore_height < 50) $channel_divmore_height = 50; - $network_divmore_height = ((x($_POST,'network_divmore_height')) ? intval($_POST['network_divmore_height']) : 400); - if($network_divmore_height < 50) - $network_divmore_height = 50; + $stream_divmore_height = ((x($_POST,'stream_divmore_height')) ? intval($_POST['stream_divmore_height']) : 400); + if($stream_divmore_height < 50) + $stream_divmore_height = 50; $browser_update = ((x($_POST,'browser_update')) ? intval($_POST['browser_update']) : 0); $browser_update = $browser_update * 1000; @@ -52,7 +52,7 @@ class Display { set_pconfig(local_channel(),'system','itemspage', $itemspage); set_pconfig(local_channel(),'system','no_smilies',1-intval($nosmile)); set_pconfig(local_channel(),'system','channel_divmore_height', $channel_divmore_height); - set_pconfig(local_channel(),'system','network_divmore_height', $network_divmore_height); + set_pconfig(local_channel(),'system','stream_divmore_height', $stream_divmore_height); set_pconfig(local_channel(),'system','channel_menu', $channel_menu); $newschema = ''; @@ -197,7 +197,7 @@ class Display { '$theme_config' => $theme_config, '$expert' => feature_enabled(local_channel(),'advanced_theming'), '$channel_divmore_height' => array('channel_divmore_height', t('Channel page max height of content (in pixels)'), ((get_pconfig(local_channel(),'system','channel_divmore_height')) ? get_pconfig(local_channel(),'system','channel_divmore_height') : 400), t('click to expand content exceeding this height')), - '$network_divmore_height' => array('network_divmore_height', t('Network page max height of content (in pixels)'), ((get_pconfig(local_channel(),'system','network_divmore_height')) ? get_pconfig(local_channel(),'system','network_divmore_height') : 400) , t('click to expand content exceeding this height')), + '$stream_divmore_height' => array('stream_divmore_height', t('Stream page max height of content (in pixels)'), ((get_pconfig(local_channel(),'system','stream_divmore_height')) ? get_pconfig(local_channel(),'system','stream_divmore_height') : 400) , t('click to expand content exceeding this height')), )); diff --git a/Zotlabs/Module/Network.php b/Zotlabs/Module/Stream.php similarity index 97% rename from Zotlabs/Module/Network.php rename to Zotlabs/Module/Stream.php index ffb4c9682..1cbcd3e0a 100644 --- a/Zotlabs/Module/Network.php +++ b/Zotlabs/Module/Stream.php @@ -11,7 +11,7 @@ require_once('include/conversation.php'); require_once('include/acl_selectors.php'); -class Network extends Controller { +class Stream extends Controller { function init() { if (! local_channel()) { @@ -44,7 +44,7 @@ class Network extends Controller { } $arr = [ 'query' => App::$query_string ]; - call_hooks('network_content_init', $arr); + call_hooks('stream_content_init', $arr); $channel = App::$data; @@ -66,7 +66,7 @@ class Network extends Controller { $verb = ((x($_REQUEST,'verb')) ? $_REQUEST['verb'] : ''); $dm = ((x($_REQUEST,'dm')) ? $_REQUEST['dm'] : 0); - $order = get_pconfig(local_channel(), 'mod_network', 'order', 0); + $order = get_pconfig(local_channel(), 'mod_stream', 'order', 0); switch ($order) { case 0: $order = 'comment'; @@ -114,7 +114,7 @@ class Network extends Controller { killme(); } notice( t('No such group') . EOL ); - goaway(z_root() . '/network'); + goaway(z_root() . '/stream'); } $group = $gid; @@ -155,7 +155,7 @@ class Network extends Controller { killme(); } notice( t('No such channel') . EOL ); - goaway(z_root() . '/network'); + goaway(z_root() . '/stream'); } $def_acl = [ 'allow_cid' => '<' . $cid_r[0]['abook_xchan'] . '>', 'allow_gid' => '', 'deny_cid' => '', 'deny_gid' => '' ]; @@ -296,7 +296,7 @@ class Network extends Controller { } else { notice( t('Invalid channel.') . EOL); - goaway(z_root() . '/network'); + goaway(z_root() . '/stream'); } } @@ -313,19 +313,19 @@ class Network extends 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). - $maxheight = get_pconfig(local_channel(),'system','network_divmore_height'); + $maxheight = get_pconfig(local_channel(),'system','stream_divmore_height'); if(! $maxheight) $maxheight = 400; - $o .= '
' . "\r\n"; + $o .= '
' . "\r\n"; $o .= "\r\n"; App::$page['htmlhead'] .= replace_macros(get_markup_template('build_query.tpl'), [ '$baseurl' => z_root(), - '$pgtype' => 'network', + '$pgtype' => 'stream', '$uid' => ((local_channel()) ? local_channel() : '0'), '$gid' => (($gid) ? $gid : '0'), '$cid' => (($cid) ? $cid : '0'), @@ -463,7 +463,7 @@ class Network extends Controller { $abook_uids = " and abook.abook_channel = " . local_channel() . " "; $uids = " and item.uid = " . local_channel() . " "; - if (get_pconfig(local_channel(),'system','network_list_mode')) + if (get_pconfig(local_channel(),'system','stream_list_mode')) $page_mode = 'list'; else $page_mode = 'client'; @@ -599,7 +599,7 @@ class Network extends Controller { } } - $mode = (($nouveau) ? 'network-new' : 'network'); + $mode = (($nouveau) ? 'stream-new' : 'stream'); if ($search) { $mode = 'search'; diff --git a/Zotlabs/Update/_1237.php b/Zotlabs/Update/_1237.php new file mode 100644 index 000000000..fc3fe7120 --- /dev/null +++ b/Zotlabs/Update/_1237.php @@ -0,0 +1,23 @@ +' . t('Activity','widget') . ''; } diff --git a/Zotlabs/Widget/Groups.php b/Zotlabs/Widget/Groups.php index 176a3b5da..d3a2e26c4 100644 --- a/Zotlabs/Widget/Groups.php +++ b/Zotlabs/Widget/Groups.php @@ -80,7 +80,7 @@ class Groups { /** * @FIXME * This SQL makes the counts correct when you get forum posts arriving from different routes/sources - * (like personal channels). However the network query for these posts doesn't yet include this + * (like personal channels). However the stream query for these posts doesn't yet include this * correction and it makes the SQL for that query pretty hairy so this is left as a future exercise. * It may make more sense in that query to look for the mention in the body rather than another join, * but that makes it very inefficient. @@ -104,7 +104,7 @@ class Groups { foreach($r1 as $rr) { - $link = 'network?f=&pf=1&cid=' . $rr['abook_id']; + $link = 'stream?f=&pf=1&cid=' . $rr['abook_id']; if($x3) { foreach($x3 as $xx) { if($rr['xchan_hash'] == $xx['xchan']) { diff --git a/Zotlabs/Widget/Newmember.php b/Zotlabs/Widget/Newmember.php index bd3caabcb..ea2f09ca6 100644 --- a/Zotlabs/Widget/Newmember.php +++ b/Zotlabs/Widget/Newmember.php @@ -43,7 +43,7 @@ class Newmember { t('Communicate'), [ 'channel/' . $c['channel_address'] => t('View your channel homepage'), - 'network' => t('View your network stream'), + 'stream' => t('View your stream'), ], t('Miscellaneous'), diff --git a/Zotlabs/Widget/Notifications.php b/Zotlabs/Widget/Notifications.php index a442d8cb2..e1ec19efe 100644 --- a/Zotlabs/Widget/Notifications.php +++ b/Zotlabs/Widget/Notifications.php @@ -11,13 +11,13 @@ class Notifications { $channel = App::get_channel(); $notifications[] = [ - 'type' => 'network', + 'type' => 'stream', 'icon' => 'th', 'severity' => 'secondary', 'label' => t('New Stream Activity'), 'title' => t('New Stream Activity Notifications'), 'viewall' => [ - 'url' => 'network', + 'url' => 'stream', 'label' => t('View your stream activity') ], 'markall' => [ diff --git a/Zotlabs/Widget/Pinned.php b/Zotlabs/Widget/Pinned.php index bb94dd4a3..297969a3a 100644 --- a/Zotlabs/Widget/Pinned.php +++ b/Zotlabs/Widget/Pinned.php @@ -37,7 +37,7 @@ class Pinned { return $ret; } - $o = conversation($id_list,'network-new',0,'traditional'); + $o = conversation($id_list,'stream-new',0,'traditional'); // change some id and class names so that auto-update doesn't stumble over them diff --git a/app/network.apd b/app/stream.apd similarity index 100% rename from app/network.apd rename to app/stream.apd diff --git a/boot.php b/boot.php index 59fab6262..6fa7f9108 100755 --- a/boot.php +++ b/boot.php @@ -51,7 +51,7 @@ require_once('include/items.php'); define ( 'STD_VERSION', '20.02.13' ); define ( 'ZOT_REVISION', '6.0' ); -define ( 'DB_UPDATE_VERSION', 1236 ); +define ( 'DB_UPDATE_VERSION', 1237 ); define ( 'PLATFORM_NAME', 'zap' ); define ( 'PLATFORM_ARCHITECTURE', 'zap' ); diff --git a/include/conversation.php b/include/conversation.php index 921b34f90..e3a1ebe35 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -464,7 +464,7 @@ function conversation($items, $mode, $update, $page_mode = 'traditional', $prepa $previewing = (($preview) ? ' preview ' : ''); $preview_lbl = t('This is an unsaved preview'); - if (in_array($mode, [ 'network', 'pubstream'])) { + if (in_array($mode, [ 'stream', 'pubstream'])) { $profile_owner = local_channel(); $page_writeable = ((local_channel()) ? true : false); @@ -474,7 +474,7 @@ function conversation($items, $mode, $update, $page_mode = 'traditional', $prepa // We only launch liveUpdate if you aren't filtering in some incompatible // way and also you aren't writing a comment (discovered in javascript). - $live_update_div = '
' . "\r\n" + $live_update_div = '
' . "\r\n" . "