aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorfabrixxm <fabrix.xm@gmail.com>2011-11-14 03:10:51 -0800
committerfabrixxm <fabrix.xm@gmail.com>2011-11-14 03:10:51 -0800
commit7b48b33b4905d671dc87dd95fcf102d2d2231aef (patch)
tree76bf54f9cdd077919b7adabf6c0e3a32e6acfdc9 /mod
parentc659512f32e449253482fdb57ae67ed25ac35c34 (diff)
parent4c2680ca6f698ef2d8e4a4c3f7d2dee8f34b0edc (diff)
downloadvolse-hubzilla-7b48b33b4905d671dc87dd95fcf102d2d2231aef.tar.gz
volse-hubzilla-7b48b33b4905d671dc87dd95fcf102d2d2231aef.tar.bz2
volse-hubzilla-7b48b33b4905d671dc87dd95fcf102d2d2231aef.zip
Merge pull request #4 from fabrixxm/master
ping: fix total count and comment/post
Diffstat (limited to 'mod')
-rw-r--r--mod/ping.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/mod/ping.php b/mod/ping.php
index caa78f9b7..9965ea918 100644
--- a/mod/ping.php
+++ b/mod/ping.php
@@ -35,9 +35,6 @@ function ping_init(&$a) {
case ACTIVITY_DISLIKE:
$dislikes[] = $it;
break;
- case ACTIVITY_POST;
- $posts[] = $it;
- break;
case ACTIVITY_FRIEND:
$xmlhead="<"."?xml version='1.0' encoding='UTF-8' ?".">";
$obj = parse_xml_string($xmlhead.$it['object']);
@@ -45,11 +42,14 @@ function ping_init(&$a) {
$friends[] = $it;
break;
default:
- if ($it['parent']!=$it['id']) $comments[] = $it;
+ if ($it['parent']!=$it['id']) {
+ $comments[] = $it;
+ } else {
+ $posts[] = $it;
+ }
}
}
-
$r = q("SELECT `item`.`id`,`item`.`parent`, `item`.`verb`, `item`.`author-name`,
`item`.`author-link`, `item`.`author-avatar`, `item`.`created`, `item`.`object`,
`pitem`.`author-name` as `pname`, `pitem`.`author-link` as `plink`
@@ -129,7 +129,7 @@ function ping_init(&$a) {
<home>$home</home>";
if ($register!=0) echo "<register>$register</register>";
- $tot = $mail+$intro+$register+count($comments)+count($likes)+count($dislikes)+count($friends);
+ $tot = $mail+$intro+$register+count($comments)+count($likes)+count($dislikes)+count($friends)+count($posts);
echo ' <notif count="'.$tot.'">';
if ($intro>0){