diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-05-18 13:14:34 -0700 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-05-18 13:14:34 -0700 |
commit | 51db7536380d70e2047aa91c3a12809cc3444aa8 (patch) | |
tree | 359c67869e57a5c42aed637f63c2dd7953bddbb7 /mod/network.php | |
parent | e271035879660bc9996101f3a23d61c88ecd5f53 (diff) | |
parent | 7c7a5cba8fe6fd6dc15acc14954d9ba9ed632c00 (diff) | |
download | volse-hubzilla-51db7536380d70e2047aa91c3a12809cc3444aa8.tar.gz volse-hubzilla-51db7536380d70e2047aa91c3a12809cc3444aa8.tar.bz2 volse-hubzilla-51db7536380d70e2047aa91c3a12809cc3444aa8.zip |
Merge branch 'tres'
Diffstat (limited to 'mod/network.php')
-rw-r--r-- | mod/network.php | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/mod/network.php b/mod/network.php index d96c6830d..9ebdf7198 100644 --- a/mod/network.php +++ b/mod/network.php @@ -176,12 +176,12 @@ function network_content(&$a, $update = 0, $load = false) { $sql_options = (($star) - ? " and (item_flags & " . intval(ITEM_STARRED) . ") > 0" + ? " and item_starred = 1 " : ''); $sql_nets = ''; - $sql_extra = " AND `item`.`parent` IN ( SELECT `parent` FROM `item` WHERE (item_flags & " . intval(ITEM_THREAD_TOP) . ")>0 $sql_options ) "; + $sql_extra = " AND `item`.`parent` IN ( SELECT `parent` FROM `item` WHERE item_thread_top = 1 $sql_options ) "; if($group) { $contact_str = ''; @@ -324,9 +324,8 @@ function network_content(&$a, $update = 0, $load = false) { } if($conv) { - $sql_extra .= sprintf(" AND parent IN (SELECT distinct(parent) from item where ( author_xchan like '%s' or ( item_flags & %d ) > 0) and item_restrict = 0 ) ", - dbesc(protect_sprintf($channel['channel_hash'])), - intval(ITEM_MENTIONSME) + $sql_extra .= sprintf(" AND parent IN (SELECT distinct(parent) from item where ( author_xchan like '%s' or item_mentionsme = 1 )) ", + dbesc(protect_sprintf($channel['channel_hash'])) ); } @@ -500,7 +499,7 @@ function network_content(&$a, $update = 0, $load = false) { } if(($update_unseen) && (! $firehose)) - $r = q("UPDATE item SET item_unseen = 0 where item_unseen = 1 AND uid = %d $update_unseen ", + $r = q("UPDATE item SET item_unseen = 0 WHERE item_unseen = 1 AND uid = %d $update_unseen ", intval(local_channel()) ); |