aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Widget/Forums.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2022-03-29 11:42:53 +0200
committerMario Vavti <mario@mariovavti.com>2022-03-29 11:42:53 +0200
commit0784cd593a39a4fc297e8a82f7e79bc8019a0868 (patch)
tree22182afb37cf460f8208fff9d276a0672add3185 /Zotlabs/Widget/Forums.php
parent0e2e9321025f87fe9587f3d183adaea6185e4e20 (diff)
parent9c5d2ee5630dd7033904039dcd1e92db8821b644 (diff)
downloadvolse-hubzilla-0784cd593a39a4fc297e8a82f7e79bc8019a0868.tar.gz
volse-hubzilla-0784cd593a39a4fc297e8a82f7e79bc8019a0868.tar.bz2
volse-hubzilla-0784cd593a39a4fc297e8a82f7e79bc8019a0868.zip
Merge branch '7.2RC'7.2
Diffstat (limited to 'Zotlabs/Widget/Forums.php')
-rw-r--r--Zotlabs/Widget/Forums.php35
1 files changed, 6 insertions, 29 deletions
diff --git a/Zotlabs/Widget/Forums.php b/Zotlabs/Widget/Forums.php
index 2af7347f1..c40556273 100644
--- a/Zotlabs/Widget/Forums.php
+++ b/Zotlabs/Widget/Forums.php
@@ -1,5 +1,10 @@
<?php
+/**
+ * * Name: Forums
+ * * Description: A list of forum channels with unseen item counts
+ */
+
namespace Zotlabs\Widget;
class Forums {
@@ -21,35 +26,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())