From cddc0217724f1a7661014d50e4c940e623a0c2dc Mon Sep 17 00:00:00 2001 From: Mario Date: Tue, 3 Aug 2021 07:12:35 +0000 Subject: Apps drag and drop feature --- Zotlabs/Widget/Activity.php | 10 +++++----- Zotlabs/Widget/Forums.php | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'Zotlabs/Widget') diff --git a/Zotlabs/Widget/Activity.php b/Zotlabs/Widget/Activity.php index 04e9fc4b1..5d9795c7e 100644 --- a/Zotlabs/Widget/Activity.php +++ b/Zotlabs/Widget/Activity.php @@ -35,7 +35,7 @@ class Activity { } } foreach($contributors as $k => $v) { - $arr[] = [ 'author_xchan' => $k, 'total' => $v ]; + $arr[] = [ 'author_xchan' => $k, 'total' => $v ]; } usort($arr,'total_sort'); xchan_query($arr); @@ -43,19 +43,19 @@ class Activity { $x = [ 'entries' => $arr ]; call_hooks('activity_widget',$x); - $arr = $x['entries']; + $arr = $x['entries']; if($arr) { $o .= '
'; - $o .= '

' . t('Activity','widget') . '

'; } return $o; } -} +} diff --git a/Zotlabs/Widget/Forums.php b/Zotlabs/Widget/Forums.php index d3e2f2534..2af7347f1 100644 --- a/Zotlabs/Widget/Forums.php +++ b/Zotlabs/Widget/Forums.php @@ -34,7 +34,7 @@ class Forums { intval(local_channel()) ); - if($x2) { + if($x2) { $xf = ids_to_querystr($x2,'xchan',true); // private forums @@ -47,7 +47,7 @@ class Forums { } } - $sql_extra = (($xf) ? " and ( xchan_hash in (" . $xf . ") or xchan_pubforum = 1 ) " : " and xchan_pubforum = 1 "); + $sql_extra = (($xf) ? " and ( xchan_hash in (" . $xf . ") or xchan_pubforum = 1 ) " : " and xchan_pubforum = 1 "); @@ -64,7 +64,7 @@ class Forums { // There also should be a way to update this via ajax. for($x = 0; $x < count($r1); $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 ", intval(local_channel()), dbesc($r1[$x]['xchan_hash']) @@ -109,12 +109,12 @@ class Forums { } } } - + if($unseen && (! intval($rr['unseen']))) continue; - $o .= ''; + $o .= ''; } $o .= ''; } -- cgit v1.2.3