diff options
author | mrjive <mrjive@mrjive.it> | 2018-01-22 09:34:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-22 09:34:08 +0100 |
commit | 131baa9f4584b74ab76328d776c0bb5ce603da7d (patch) | |
tree | c962a68dbf7874e326f4ca268fe0183ac184ea12 /Zotlabs/Widget/Forums.php | |
parent | 8e475810a74f738fe3b23648b904639e5099d995 (diff) | |
parent | 1709dbd376af3171815f25b7055fb41da53924cb (diff) | |
download | volse-hubzilla-131baa9f4584b74ab76328d776c0bb5ce603da7d.tar.gz volse-hubzilla-131baa9f4584b74ab76328d776c0bb5ce603da7d.tar.bz2 volse-hubzilla-131baa9f4584b74ab76328d776c0bb5ce603da7d.zip |
Merge pull request #10 from redmatrix/dev
Dev
Diffstat (limited to 'Zotlabs/Widget/Forums.php')
-rw-r--r-- | Zotlabs/Widget/Forums.php | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/Zotlabs/Widget/Forums.php b/Zotlabs/Widget/Forums.php index 0b90b9740..44d95012f 100644 --- a/Zotlabs/Widget/Forums.php +++ b/Zotlabs/Widget/Forums.php @@ -71,6 +71,8 @@ class Forums { if($r) $r1[$x]['unseen'] = $r[0]['unseen']; + } + /** * @FIXME * This SQL makes the counts correct when you get forum posts arriving from different routes/sources @@ -79,21 +81,19 @@ class Forums { * It may make more sense in that query to look for the mention in the body rather than another join, * but that makes it very inefficient. * - $r = q("select sum(item_unseen) as unseen from item left join term on oid = id where otype = %d and owner_xchan != '%s' and item.uid = %d and url = '%s' and ttype = %d $perms_sql ", - intval(TERM_OBJ_POST), - dbesc($r1[$x]['xchan_hash']), - intval(local_channel()), - dbesc($r1[$x]['xchan_url']), - intval(TERM_MENTION) - ); - if($r) - $r1[$x]['unseen'] = ((array_key_exists('unseen',$r1[$x])) ? $r1[$x]['unseen'] + $r[0]['unseen'] : $r[0]['unseen']); + * $r = q("select sum(item_unseen) as unseen from item left join term on oid = id where otype = %d and owner_xchan != '%s' and item.uid = %d and url = '%s' and ttype = %d $perms_sql ", + * intval(TERM_OBJ_POST), + * dbesc($r1[$x]['xchan_hash']), + * intval(local_channel()), + * dbesc($r1[$x]['xchan_url']), + * intval(TERM_MENTION) + * ); + * if($r) + * $r1[$x]['unseen'] = ((array_key_exists('unseen',$r1[$x])) ? $r1[$x]['unseen'] + $r[0]['unseen'] : $r[0]['unseen']); * * end @FIXME */ - } - if($r1) { $o .= '<div class="widget">'; $o .= '<h3>' . t('Forums') . '</h3><ul class="nav nav-pills flex-column">'; |