aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Display.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2016-12-23 10:09:46 +0100
committerMario Vavti <mario@mariovavti.com>2016-12-23 10:09:46 +0100
commit3b9b03cf86979b28e7fa249133176bed84b0105c (patch)
tree336dc8b8b9627e7f4a93e5c35fe3e98555274616 /Zotlabs/Module/Display.php
parent2e5a993f880d619aedf3693927e7b3e164fbfcc0 (diff)
parentef39c1e94b5149a3019d417d08dc7c16c8aef9c1 (diff)
downloadvolse-hubzilla-3b9b03cf86979b28e7fa249133176bed84b0105c.tar.gz
volse-hubzilla-3b9b03cf86979b28e7fa249133176bed84b0105c.tar.bz2
volse-hubzilla-3b9b03cf86979b28e7fa249133176bed84b0105c.zip
Merge branch '2.0RC'
Diffstat (limited to 'Zotlabs/Module/Display.php')
-rw-r--r--Zotlabs/Module/Display.php22
1 files changed, 14 insertions, 8 deletions
diff --git a/Zotlabs/Module/Display.php b/Zotlabs/Module/Display.php
index e9441bbdf..42f6dd4ac 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,10 +132,13 @@ class Display 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)) {
+
+ $static = ((local_channel()) ? channel_manual_conv_update(local_channel()) : 0);
$o .= '<div id="live-display"></div>' . "\r\n";
$o .= "<script> var profile_uid = " . ((intval(local_channel())) ? local_channel() : (-1))
@@ -154,6 +159,7 @@ class Display extends \Zotlabs\Web\Controller {
'$fh' => '0',
'$nouveau' => '0',
'$wall' => '0',
+ '$static' => $static,
'$page' => ((\App::$pager['page'] != 1) ? \App::$pager['page'] : 1),
'$list' => ((x($_REQUEST,'list')) ? intval($_REQUEST['list']) : 0),
'$search' => '',
@@ -214,8 +220,8 @@ class Display extends \Zotlabs\Web\Controller {
$r = q("SELECT * from item
WHERE mid = '%s'
- AND (((( `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' AND `item`.`deny_cid` = ''
- AND `item`.`deny_gid` = '' AND item_private = 0 )
+ AND (((( item.allow_cid = '' AND item.allow_gid = '' AND item.deny_cid = ''
+ AND item.deny_gid = '' AND item_private = 0 )
and owner_xchan in ( " . stream_perms_xchans(($observer_hash) ? (PERMS_NETWORK|PERMS_PUBLIC) : PERMS_PUBLIC) . " ))
OR uid = %d )
$sql_extra )
@@ -258,8 +264,8 @@ class Display extends \Zotlabs\Web\Controller {
$r = q("SELECT * from item
WHERE mid = '%s'
- AND (((( `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' AND `item`.`deny_cid` = ''
- AND `item`.`deny_gid` = '' AND item_private = 0 )
+ AND (((( item.allow_cid = '' AND item.allow_gid = '' AND item.deny_cid = ''
+ AND item.deny_gid = '' AND item_private = 0 )
and owner_xchan in ( " . stream_perms_xchans(($observer_hash) ? (PERMS_NETWORK|PERMS_PUBLIC) : PERMS_PUBLIC) . " ))
OR uid = %d )
$sql_extra )
@@ -282,8 +288,8 @@ class Display extends \Zotlabs\Web\Controller {
$parents_str = ids_to_querystr($r,'id');
if($parents_str) {
- $items = q("SELECT `item`.*, `item`.`id` AS `item_id`
- FROM `item`
+ $items = q("SELECT item.*, item.id AS item_id
+ FROM item
WHERE parent in ( %s ) $item_normal ",
dbesc($parents_str)
);
@@ -321,7 +327,7 @@ class Display extends \Zotlabs\Web\Controller {
/*
elseif((! $update) && (! {
- $r = q("SELECT `id`, item_flags FROM `item` WHERE `id` = '%s' OR `mid` = '%s' LIMIT 1",
+ $r = q("SELECT id, item_flags FROM item WHERE id = '%s' OR mid = '%s' LIMIT 1",
dbesc($item_hash),
dbesc($item_hash)
);