aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Channel.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2020-11-26 18:43:53 +0000
committerMario <mario@mariovavti.com>2020-11-26 18:43:53 +0000
commit0f6166da004317045bae5430140c70ee0d60aad1 (patch)
tree78145aa23c2c60acab9add4299ee50935898a46a /Zotlabs/Module/Channel.php
parent25620081a1326eb243c974845d613a16b7be1966 (diff)
parent07e5b8295ea9d342f66d8119d88bd58124b548e6 (diff)
downloadvolse-hubzilla-0f6166da004317045bae5430140c70ee0d60aad1.tar.gz
volse-hubzilla-0f6166da004317045bae5430140c70ee0d60aad1.tar.bz2
volse-hubzilla-0f6166da004317045bae5430140c70ee0d60aad1.zip
Merge branch 'dev'5.0.3
Diffstat (limited to 'Zotlabs/Module/Channel.php')
-rw-r--r--Zotlabs/Module/Channel.php30
1 files changed, 8 insertions, 22 deletions
diff --git a/Zotlabs/Module/Channel.php b/Zotlabs/Module/Channel.php
index dc8e9e1c5..7ff394750 100644
--- a/Zotlabs/Module/Channel.php
+++ b/Zotlabs/Module/Channel.php
@@ -130,9 +130,6 @@ class Channel extends Controller {
$noscript_content = get_config('system', 'noscript_content', '1');
- if($load)
- $_SESSION['loadtime'] = datetime_convert();
-
$category = $datequery = $datequery2 = '';
$mid = ((x($_REQUEST,'mid')) ? $_REQUEST['mid'] : '');
@@ -152,7 +149,6 @@ class Channel extends Controller {
$category = ((x($_REQUEST,'cat')) ? $_REQUEST['cat'] : '');
$hashtags = ((x($_REQUEST,'tag')) ? $_REQUEST['tag'] : '');
$order = ((x($_GET,'order')) ? notags($_GET['order']) : 'post');
- $static = ((array_key_exists('static',$_REQUEST)) ? intval($_REQUEST['static']) : 0);
$search = ((x($_GET,'search')) ? $_GET['search'] : EMPTY_STR);
$groups = array();
@@ -187,8 +183,6 @@ class Channel extends Controller {
nav_set_selected('Channel Home');
- $static = channel_manual_conv_update(App::$profile['profile_uid']);
-
// search terms header
if($search) {
$o .= replace_macros(get_markup_template("section_title.tpl"),array(
@@ -255,7 +249,9 @@ class Channel extends Controller {
$abook_uids = " and abook.abook_channel = " . intval(App::$profile['profile_uid']) . " ";
- $simple_update = (($update) ? " AND item_unseen = 1 " : '');
+ $simple_update = '';
+ if($update && $_SESSION['loadtime'])
+ $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($search) {
$search = escape_tags($search);
@@ -270,7 +266,6 @@ class Channel extends Controller {
}
}
-
head_add_link([
'rel' => 'alternate',
'type' => 'application/json+oembed',
@@ -278,14 +273,6 @@ class Channel extends Controller {
'title' => 'oembed'
]);
- if($update && $_SESSION['loadtime'])
- $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 author_xchan = '" . protect_sprintf(get_observer_hash()) . "' ";
-
if(($update) && (! $load)) {
if($mid) {
@@ -294,7 +281,6 @@ class Channel extends Controller {
dbesc($mid . '%'),
intval(App::$profile['profile_uid'])
);
- $_SESSION['loadtime'] = datetime_convert();
}
else {
$r = q("SELECT parent AS item_id from item
@@ -306,9 +292,7 @@ class Channel extends Controller {
ORDER BY created DESC",
intval(App::$profile['profile_uid'])
);
- $_SESSION['loadtime'] = datetime_convert();
}
-
}
else {
@@ -406,7 +390,7 @@ class Channel extends Controller {
$o .= '<div id="live-channel"></div>' . "\r\n";
$o .= "<script> var profile_uid = " . App::$profile['profile_uid']
. "; var netargs = '?f='; var profile_page = " . App::$pager['page']
- . "; divmore_height = " . intval($maxheight) . "; </script>\r\n";
+ . "; divmore_height = " . intval($maxheight) . ";</script>\r\n";
App::$page['htmlhead'] .= replace_macros(get_markup_template("build_query.tpl"),array(
'$baseurl' => z_root(),
@@ -424,7 +408,6 @@ class Channel extends Controller {
'$wall' => '1',
'$fh' => '0',
'$dm' => '0',
- '$static' => $static,
'$page' => ((App::$pager['page'] != 1) ? App::$pager['page'] : 1),
'$search' => $search,
'$xchan' => '',
@@ -437,7 +420,8 @@ class Channel extends Controller {
'$verb' => '',
'$net' => '',
'$dend' => $datequery,
- '$dbegin' => $datequery2
+ '$dbegin' => $datequery2,
+ '$conv_mode' => 'channel'
));
}
@@ -476,6 +460,8 @@ class Channel extends Controller {
if($mid)
$o .= '<div id="content-complete"></div>';
+ $_SESSION['loadtime'] = datetime_convert();
+
return $o;
}
}