diff options
author | Mario <mario@mariovavti.com> | 2022-02-21 10:02:33 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2022-02-21 10:02:33 +0000 |
commit | a80454978181eebf7813a10c00b3166f66300b3f (patch) | |
tree | 7f68f93c3d3894ebc05a9382ea3d7449dfdc288a /Zotlabs/Widget/Forums.php | |
parent | 2a60f1cc6ed49ab559090c831788308fe3df0706 (diff) | |
download | volse-hubzilla-a80454978181eebf7813a10c00b3166f66300b3f.tar.gz volse-hubzilla-a80454978181eebf7813a10c00b3166f66300b3f.tar.bz2 volse-hubzilla-a80454978181eebf7813a10c00b3166f66300b3f.zip |
remove deprecated widgets and add some more widget descriptions
Diffstat (limited to 'Zotlabs/Widget/Forums.php')
-rw-r--r-- | Zotlabs/Widget/Forums.php | 36 |
1 files changed, 7 insertions, 29 deletions
diff --git a/Zotlabs/Widget/Forums.php b/Zotlabs/Widget/Forums.php index 2af7347f1..454cc7a26 100644 --- a/Zotlabs/Widget/Forums.php +++ b/Zotlabs/Widget/Forums.php @@ -1,5 +1,11 @@ <?php +/** + * * Name: Forums + * * Description: A list of forum channels with unseen item counts + * * Requires: network + */ + namespace Zotlabs\Widget; class Forums { @@ -21,35 +27,7 @@ class Forums { $unseen = 1; $perms_sql = item_permissions_sql(local_channel()) . item_normal(); - - $xf = false; - - $x1 = q("select xchan from abconfig where chan = %d and cat = 'their_perms' and k = 'send_stream' and v = '0'", - intval(local_channel()) - ); - if($x1) { - $xc = ids_to_querystr($x1,'xchan',true); - - $x2 = q("select xchan from abconfig where chan = %d and cat = 'their_perms' and k = 'tag_deliver' and v = '1' and xchan in (" . $xc . ") ", - intval(local_channel()) - ); - - if($x2) { - $xf = ids_to_querystr($x2,'xchan',true); - - // private forums - $x3 = q("select xchan from abconfig where chan = %d and cat = 'their_perms' and k = 'post_wall' and v = '1' and xchan in (" . $xc . ") and not xchan in (" . $xf . ") ", - intval(local_channel()) - ); - if($x3) { - $xf = ids_to_querystr(array_merge($x2,$x3),'xchan',true); - } - } - } - - $sql_extra = (($xf) ? " and ( xchan_hash in (" . $xf . ") or xchan_pubforum = 1 ) " : " and xchan_pubforum = 1 "); - - + $sql_extra = " and xchan_pubforum = 1 "; $r1 = q("select abook_id, xchan_hash, xchan_name, xchan_url, xchan_photo_s from abook left join xchan on abook_xchan = xchan_hash where xchan_deleted = 0 and abook_channel = %d and abook_pending = 0 and abook_ignored = 0 and abook_blocked = 0 and abook_archived = 0 $sql_extra order by xchan_name $limit ", intval(local_channel()) |