missing $perm_sql
This commit is contained in:
parent
2438af1cb5
commit
a42ff1e6d4
@ -633,8 +633,11 @@ class Ping extends \Zotlabs\Web\Controller {
|
|||||||
$result['forums'] = 0;
|
$result['forums'] = 0;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
|
$perms_sql = item_permissions_sql(local_channel()) . item_normal();
|
||||||
$fcount = count($forums);
|
$fcount = count($forums);
|
||||||
$forums['total'] = 0;
|
$forums['total'] = 0;
|
||||||
|
|
||||||
for($x = 0; $x < $fcount; $x ++) {
|
for($x = 0; $x < $fcount; $x ++) {
|
||||||
$r = q("select sum(item_unseen) as unseen from item
|
$r = q("select sum(item_unseen) as unseen from item
|
||||||
where uid = %d and owner_xchan = '%s' and item_unseen = 1 $perms_sql ",
|
where uid = %d and owner_xchan = '%s' and item_unseen = 1 $perms_sql ",
|
||||||
@ -642,7 +645,7 @@ class Ping extends \Zotlabs\Web\Controller {
|
|||||||
dbesc($forums[$x]['xchan_hash'])
|
dbesc($forums[$x]['xchan_hash'])
|
||||||
);
|
);
|
||||||
if($r[0]['unseen']) {
|
if($r[0]['unseen']) {
|
||||||
$forums[$x]['notify_link'] = (($forums[$x]['private_forum']) ? $forums[$x]['xchan_url'] :z_root() . '/network/?f=&cid=' . $forums[$x]['abook_id']);
|
$forums[$x]['notify_link'] = (($forums[$x]['private_forum']) ? $forums[$x]['xchan_url'] : z_root() . '/network/?f=&cid=' . $forums[$x]['abook_id']);
|
||||||
$forums[$x]['name'] = $forums[$x]['xchan_name'];
|
$forums[$x]['name'] = $forums[$x]['xchan_name'];
|
||||||
$forums[$x]['url'] = $forums[$x]['xchan_url'];
|
$forums[$x]['url'] = $forums[$x]['xchan_url'];
|
||||||
$forums[$x]['photo'] = $forums[$x]['xchan_photo_s'];
|
$forums[$x]['photo'] = $forums[$x]['xchan_photo_s'];
|
||||||
|
@ -3340,8 +3340,6 @@ function get_forum_channels($uid) {
|
|||||||
if(! $uid)
|
if(! $uid)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
$perms_sql = item_permissions_sql($uid) . item_normal();
|
|
||||||
|
|
||||||
$xf = false;
|
$xf = false;
|
||||||
|
|
||||||
$x1 = q("select xchan from abconfig where chan = %d and cat = 'their_perms' and k = 'send_stream' and v = '0'",
|
$x1 = q("select xchan from abconfig where chan = %d and cat = 'their_perms' and k = 'send_stream' and v = '0'",
|
||||||
|
Reference in New Issue
Block a user