aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-03-02 18:10:23 -0800
committerzotlabs <mike@macgirvin.com>2017-03-02 18:10:23 -0800
commitcee9a20e85219c8628b853b57d0c366b31f3c0e0 (patch)
tree1782ef02bfdc34b424da52da183f47d88d913294 /include
parent70ca4a7fea3847ea0f2022a7425fd1b0a40e43c3 (diff)
downloadvolse-hubzilla-cee9a20e85219c8628b853b57d0c366b31f3c0e0.tar.gz
volse-hubzilla-cee9a20e85219c8628b853b57d0c366b31f3c0e0.tar.bz2
volse-hubzilla-cee9a20e85219c8628b853b57d0c366b31f3c0e0.zip
activity widget - turns out the owner is not relevant.
Diffstat (limited to 'include')
-rw-r--r--include/widgets.php14
1 files changed, 5 insertions, 9 deletions
diff --git a/include/widgets.php b/include/widgets.php
index a659101b9..f05c7c0ee 100644
--- a/include/widgets.php
+++ b/include/widgets.php
@@ -1508,7 +1508,7 @@ function widget_activity($arr) {
$perms_sql = item_permissions_sql(local_channel()) . item_normal();
- $r = q("select owner_xchan, author_xchan from item where item_unseen = 1 and uid = %d $perms_sql",
+ $r = q("select author_xchan from item where item_unseen = 1 and uid = %d $perms_sql",
intval(local_channel())
);
@@ -1517,16 +1517,12 @@ function widget_activity($arr) {
if($r) {
foreach($r as $rv) {
- if(array_key_exists($rv['owner_xchan'],$contributors))
- $contributors[$rv['owner_xchan']] ++;
- else
- $contributors[$rv['owner_xchan']] = 1;
- if($rv['owner_xchan'] === $rv['author_xchan'])
- continue;
- if(array_key_exists($rv['author_xchan'],$contributors))
+ if(array_key_exists($rv['author_xchan'],$contributors)) {
$contributors[$rv['author_xchan']] ++;
- else
+ }
+ else {
$contributors[$rv['author_xchan']] = 1;
+ }
}
foreach($contributors as $k => $v) {
$arr[] = [ 'author_xchan' => $k, 'total' => $v ];