aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2016-11-02 15:48:29 -0700
committerzotlabs <mike@macgirvin.com>2016-11-02 15:48:29 -0700
commitf91031bd657f6c7bb25d93fc2c69a84846ee9f03 (patch)
treec069bf265f7b18bf40cdebcf841fe20890cff867
parent5d3e04216d466e57dfeefe0319dd14b26e8487a2 (diff)
downloadvolse-hubzilla-f91031bd657f6c7bb25d93fc2c69a84846ee9f03.tar.gz
volse-hubzilla-f91031bd657f6c7bb25d93fc2c69a84846ee9f03.tar.bz2
volse-hubzilla-f91031bd657f6c7bb25d93fc2c69a84846ee9f03.zip
allow your own likes/comments to be updated when in static update mode
-rw-r--r--Zotlabs/Module/Channel.php8
-rw-r--r--Zotlabs/Module/Display.php8
-rw-r--r--Zotlabs/Module/Network.php11
-rw-r--r--Zotlabs/Module/Pubstream.php10
-rw-r--r--Zotlabs/Module/Search.php6
-rw-r--r--doc/dav_konqueror.bb2
-rw-r--r--view/js/main.js12
-rwxr-xr-xview/tpl/build_query.tpl1
8 files changed, 43 insertions, 15 deletions
diff --git a/Zotlabs/Module/Channel.php b/Zotlabs/Module/Channel.php
index e8bc53b5e..41b396c5c 100644
--- a/Zotlabs/Module/Channel.php
+++ b/Zotlabs/Module/Channel.php
@@ -74,6 +74,7 @@ class Channel extends \Zotlabs\Web\Controller {
$category = ((x($_REQUEST,'cat')) ? $_REQUEST['cat'] : '');
$hashtags = ((x($_REQUEST,'tag')) ? $_REQUEST['tag'] : '');
+ $static = ((array_key_exists('static',$_REQUEST)) ? intval($_REQUEST['static']) : 0);
$groups = array();
@@ -110,6 +111,8 @@ class Channel extends \Zotlabs\Web\Controller {
if(! $update) {
+ $static = intval(feature_enabled(\App::$profile['profile_uid'],'static_updates'));
+
$o .= profile_tabs($a, $is_owner, \App::$profile['channel_address']);
$o .= common_friends_visitor_widget(\App::$profile['profile_uid']);
@@ -176,6 +179,9 @@ class Channel extends \Zotlabs\Web\Controller {
if($load)
$simple_update = '';
+ if($static && $simple_update)
+ $simple_update .= " and item_thread_top = 0 and author_xchan = '" . protect_sprintf(get_observer_hash()) . "' ";
+
if(($update) && (! $load)) {
if($mid) {
@@ -304,7 +310,7 @@ class Channel extends \Zotlabs\Web\Controller {
'$nouveau' => '0',
'$wall' => '1',
'$fh' => '0',
- '$static' => intval(feature_enabled(\App::$profile['profile_uid'],'static_updates')),
+ '$static' => $static,
'$page' => ((\App::$pager['page'] != 1) ? \App::$pager['page'] : 1),
'$search' => '',
'$order' => '',
diff --git a/Zotlabs/Module/Display.php b/Zotlabs/Module/Display.php
index 42bb6fe14..25153839c 100644
--- a/Zotlabs/Module/Display.php
+++ b/Zotlabs/Module/Display.php
@@ -121,6 +121,8 @@ class Display extends \Zotlabs\Web\Controller {
return '';
}
}
+
+ $static = ((array_key_exists('static',$_REQUEST)) ? intval($_REQUEST['static']) : 0);
$simple_update = (($update) ? " AND item_unseen = 1 " : '');
@@ -130,11 +132,13 @@ class Display extends \Zotlabs\Web\Controller {
if($load)
$simple_update = '';
- $static = ((local_channel()) ? intval(feature_enabled(local_channel(),'static_updates')) : 0);
-
+ if($static && $simple_update)
+ $simple_update .= " and item_thread_top = 0 and author_xchan = '" . protect_sprintf(get_observer_hash()) . "' ";
if((! $update) && (! $load)) {
+
+ $static = ((local_channel()) ? intval(feature_enabled(local_channel(),'static_updates')) : 0);
$o .= '<div id="live-display"></div>' . "\r\n";
$o .= "<script> var profile_uid = " . ((intval(local_channel())) ? local_channel() : (-1))
diff --git a/Zotlabs/Module/Network.php b/Zotlabs/Module/Network.php
index 206761fc8..ed6ee1cc0 100644
--- a/Zotlabs/Module/Network.php
+++ b/Zotlabs/Module/Network.php
@@ -54,6 +54,7 @@ class Network extends \Zotlabs\Web\Controller {
$datequery = ((x($_GET,'dend') && is_a_date_arg($_GET['dend'])) ? notags($_GET['dend']) : '');
$datequery2 = ((x($_GET,'dbegin') && is_a_date_arg($_GET['dbegin'])) ? notags($_GET['dbegin']) : '');
$nouveau = ((x($_GET,'new')) ? intval($_GET['new']) : 0);
+ $static = ((x($_GET,'static')) ? intval($_GET['static']) : 0);
$gid = ((x($_GET,'gid')) ? intval($_GET['gid']) : 0);
$category = ((x($_REQUEST,'cat')) ? $_REQUEST['cat'] : '');
$hashtags = ((x($_REQUEST,'tag')) ? $_REQUEST['tag'] : '');
@@ -186,6 +187,8 @@ class Network extends \Zotlabs\Web\Controller {
$status_editor = status_editor($a,$x);
$o .= $status_editor;
+
+ $static = intval(feature_enabled(local_channel(),'static_updates'));
}
@@ -295,7 +298,7 @@ class Network extends \Zotlabs\Web\Controller {
'$fh' => (($firehose) ? $firehose : '0'),
'$nouveau' => (($nouveau) ? $nouveau : '0'),
'$wall' => '0',
- '$static' => intval(feature_enabled(local_channel(),'static_updates')),
+ '$static' => $static,
'$list' => ((x($_REQUEST,'list')) ? intval($_REQUEST['list']) : 0),
'$page' => ((\App::$pager['page'] != 1) ? \App::$pager['page'] : 1),
'$search' => (($search) ? $search : ''),
@@ -402,7 +405,8 @@ class Network extends \Zotlabs\Web\Controller {
$page_mode = 'client';
$simple_update = (($update) ? " and item_unseen = 1 " : '');
-
+
+
// This fixes a very subtle bug so I'd better explain it. You wake up in the morning or return after a day
// or three and look at your matrix page - after opening up your browser. The first page loads just as it
// should. All of a sudden a few seconds later, page 2 will get inserted at the beginning of the page
@@ -419,6 +423,9 @@ class Network extends \Zotlabs\Web\Controller {
$simple_update = " AND (( item_unseen = 1 AND item.changed > '" . datetime_convert('UTC','UTC',$_SESSION['loadtime']) . "' ) OR item.changed > '" . datetime_convert('UTC','UTC',$_SESSION['loadtime']) . "' ) ";
if($load)
$simple_update = '';
+
+ if($static && $simple_update)
+ $simple_update .= " and item_thread_top = 0 and author_xchan = '" . protect_sprintf(get_observer_hash()) . "' ";
if($nouveau && $load) {
// "New Item View" - show all items unthreaded in reverse created date order
diff --git a/Zotlabs/Module/Pubstream.php b/Zotlabs/Module/Pubstream.php
index e354be8c3..54f3b7937 100644
--- a/Zotlabs/Module/Pubstream.php
+++ b/Zotlabs/Module/Pubstream.php
@@ -22,9 +22,12 @@ class Pubstream extends \Zotlabs\Web\Controller {
$item_normal = item_normal();
- $static = ((local_channel()) ? intval(feature_enabled(local_channel(),'static_updates')) : 0);
+ $static = ((array_key_exists('static',$_REQUEST)) ? intval($_REQUEST['static']) : 0);
+
if(! $update) {
+
+ $static = ((local_channel()) ? intval(feature_enabled(local_channel(),'static_updates')) : 0);
$maxheight = get_config('system','home_divmore_height');
if(! $maxheight)
@@ -99,7 +102,10 @@ class Pubstream extends \Zotlabs\Web\Controller {
$simple_update = " AND (( item_unseen = 1 AND item.changed > '" . datetime_convert('UTC','UTC',$_SESSION['loadtime']) . "' ) OR item.changed > '" . datetime_convert('UTC','UTC',$_SESSION['loadtime']) . "' ) ";
if($load)
$simple_update = '';
-
+
+ if($static && $simple_update)
+ $simple_update .= " and item_thread_top = 0 and author_xchan = '" . protect_sprintf(get_observer_hash()) . "' ";
+
//logger('update: ' . $update . ' load: ' . $load);
if($update) {
diff --git a/Zotlabs/Module/Search.php b/Zotlabs/Module/Search.php
index 796f95d6e..9ebd50a2c 100644
--- a/Zotlabs/Module/Search.php
+++ b/Zotlabs/Module/Search.php
@@ -53,6 +53,8 @@ class Search extends \Zotlabs\Web\Controller {
$tag = true;
$search = ((x($_GET,'tag')) ? trim(rawurldecode($_GET['tag'])) : '');
}
+
+ $static = ((array_key_exists('static',$_REQUEST)) ? intval($_REQUEST['static']) : 0);
if((! local_channel()) || (! feature_enabled(local_channel(),'savedsearch')))
$o .= search($search,'search-box','/search',((local_channel()) ? true : false));
@@ -96,10 +98,12 @@ class Search extends \Zotlabs\Web\Controller {
// OR your own posts if you are a logged in member
// No items will be shown if the member has a blocked profile wall.
- $static = ((local_channel()) ? intval(feature_enabled(local_channel(),'static_updates')) : 0);
if((! $update) && (! $load)) {
+ $static = ((local_channel()) ? intval(feature_enabled(local_channel(),'static_updates')) : 0);
+
+
// This is ugly, but we can't pass the profile_uid through the session to the ajax updater,
// because browser prefetching might change it on us. We have to deliver it with the page.
diff --git a/doc/dav_konqueror.bb b/doc/dav_konqueror.bb
index 79108e1d0..97c046e46 100644
--- a/doc/dav_konqueror.bb
+++ b/doc/dav_konqueror.bb
@@ -1,6 +1,6 @@
[b]Using The Cloud - Konqueror[/b]
-Simply visit webdavs://example.com/cloud after logging in to your hub, where &quot;example.com&quot; is the URL of your hub.
+Simply visit webdavs://example.com/dav after logging in to your hub, where &quot;example.com&quot; is the URL of your hub.
No further authentication is required if you are logged in to your hub in the normal manner.
diff --git a/view/js/main.js b/view/js/main.js
index ec7964886..96adf0be3 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -754,12 +754,12 @@ function liveUpdate() {
update_mode = 'append';
}
else {
- if(bParam_static) {
- in_progress = false;
- if(timer) clearTimeout(timer);
- timer = setTimeout(NavUpdate,10000);
- return;
- }
+// if(bParam_static) {
+// in_progress = false;
+// if(timer) clearTimeout(timer);
+// timer = setTimeout(NavUpdate,10000);
+// return;
+// }
update_mode = 'update';
var orgHeight = $("#region_2").height();
diff --git a/view/tpl/build_query.tpl b/view/tpl/build_query.tpl
index f3e4f79e2..91bb0bfc0 100755
--- a/view/tpl/build_query.tpl
+++ b/view/tpl/build_query.tpl
@@ -37,6 +37,7 @@
if(bParam_cmax != 99) bCmd = bCmd + "&cmax=" + bParam_cmax;
if(bParam_gid != 0) { bCmd = bCmd + "&gid=" + bParam_gid; } else
if(bParam_cid != 0) { bCmd = bCmd + "&cid=" + bParam_cid; }
+ if(bParam_static != 0) { bCmd = bCmd + "&static=" + bParam_static; }
if(bParam_star != 0) bCmd = bCmd + "&star=" + bParam_star;
if(bParam_liked != 0) bCmd = bCmd + "&liked=" + bParam_liked;
if(bParam_conv!= 0) bCmd = bCmd + "&conv=" + bParam_conv;