missing $perm_sql

This commit is contained in:
Mario Vavti 2018-06-03 13:27:06 +02:00
parent 2438af1cb5
commit a42ff1e6d4
2 changed files with 4 additions and 3 deletions

View File

@ -633,8 +633,11 @@ class Ping extends \Zotlabs\Web\Controller {
$result['forums'] = 0;
}
else {
$perms_sql = item_permissions_sql(local_channel()) . item_normal();
$fcount = count($forums);
$forums['total'] = 0;
for($x = 0; $x < $fcount; $x ++) {
$r = q("select sum(item_unseen) as unseen from item
where uid = %d and owner_xchan = '%s' and item_unseen = 1 $perms_sql ",

View File

@ -3340,8 +3340,6 @@ function get_forum_channels($uid) {
if(! $uid)
return;
$perms_sql = item_permissions_sql($uid) . item_normal();
$xf = false;
$x1 = q("select xchan from abconfig where chan = %d and cat = 'their_perms' and k = 'send_stream' and v = '0'",