aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Channel.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-09-03 17:17:20 -0700
committerzotlabs <mike@macgirvin.com>2017-09-03 17:17:20 -0700
commit4adf2caaa687287cf82b930bb5a0c07d39c7afc0 (patch)
tree670ce1e8c82b813ce86b6c8815e66ea6ea3a5adb /Zotlabs/Module/Channel.php
parentdb82d303e217c2ca599a8b740ebb62339d373124 (diff)
parent0fac35686b28825da69c77f9a903e4e24a7036fa (diff)
downloadvolse-hubzilla-4adf2caaa687287cf82b930bb5a0c07d39c7afc0.tar.gz
volse-hubzilla-4adf2caaa687287cf82b930bb5a0c07d39c7afc0.tar.bz2
volse-hubzilla-4adf2caaa687287cf82b930bb5a0c07d39c7afc0.zip
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge
Diffstat (limited to 'Zotlabs/Module/Channel.php')
-rw-r--r--Zotlabs/Module/Channel.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/Zotlabs/Module/Channel.php b/Zotlabs/Module/Channel.php
index 5e7db79d9..d82ed8e5d 100644
--- a/Zotlabs/Module/Channel.php
+++ b/Zotlabs/Module/Channel.php
@@ -169,6 +169,7 @@ class Channel extends \Zotlabs\Web\Controller {
*/
$item_normal = item_normal();
+ $item_normal_update = item_normal_update();
$sql_extra = item_permissions_sql(\App::$profile['profile_uid']);
if(get_pconfig(\App::$profile['profile_uid'],'system','channel_list_mode') && (! $mid))
@@ -193,12 +194,12 @@ class Channel extends \Zotlabs\Web\Controller {
$simple_update = '';
if($static && $simple_update)
- $simple_update .= " and item_thread_top = 0 and author_xchan = '" . protect_sprintf(get_observer_hash()) . "' ";
+ $simple_update .= " and item_thread_top = 1 and author_xchan = '" . protect_sprintf(get_observer_hash()) . "' ";
if(($update) && (! $load)) {
if($mid) {
- $r = q("SELECT parent AS item_id from item where mid like '%s' and uid = %d $item_normal
+ $r = q("SELECT parent AS item_id from item where mid like '%s' and uid = %d $item_normal_update
AND item_wall = 1 $simple_update $sql_extra limit 1",
dbesc($mid . '%'),
intval(\App::$profile['profile_uid'])
@@ -208,7 +209,7 @@ class Channel extends \Zotlabs\Web\Controller {
else {
$r = q("SELECT distinct parent AS item_id, created from item
left join abook on ( item.owner_xchan = abook.abook_xchan $abook_uids )
- WHERE uid = %d $item_normal
+ WHERE uid = %d $item_normal_update
AND item_wall = 1 $simple_update
AND (abook.abook_blocked = 0 or abook.abook_flags is null)
$sql_extra
@@ -241,7 +242,7 @@ class Channel extends \Zotlabs\Web\Controller {
if($load || ($checkjs->disabled())) {
if($mid) {
- $r = q("SELECT parent AS item_id from item where mid like '%s' and uid = %d $item_normal
+ $r = q("SELECT distinct parent AS item_id from item where mid like '%s' and uid = %d $item_normal
AND item_wall = 1 $sql_extra limit 1",
dbesc($mid . '%'),
intval(\App::$profile['profile_uid'])