aboutsummaryrefslogtreecommitdiffstats
path: root/mod/ping.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-08-26 23:05:00 -0700
committerfriendica <info@friendica.com>2012-08-26 23:05:00 -0700
commit5ff6e9348b41bc87b03bafc4d9df73b383af074e (patch)
treec26b1b26cd38f7ec78e83905266053618a3e1db4 /mod/ping.php
parentf0e299a97a8c46fd66bbc47e5b84d4b76d763154 (diff)
downloadvolse-hubzilla-5ff6e9348b41bc87b03bafc4d9df73b383af074e.tar.gz
volse-hubzilla-5ff6e9348b41bc87b03bafc4d9df73b383af074e.tar.bz2
volse-hubzilla-5ff6e9348b41bc87b03bafc4d9df73b383af074e.zip
a few minor changes
Diffstat (limited to 'mod/ping.php')
-rw-r--r--mod/ping.php13
1 files changed, 10 insertions, 3 deletions
diff --git a/mod/ping.php b/mod/ping.php
index eb7c9b946..2d52e9731 100644
--- a/mod/ping.php
+++ b/mod/ping.php
@@ -18,6 +18,8 @@ function ping_init(&$a) {
$result['events_today'] = 0;
$result['birthdays'] = 0;
$result['birthdays_today'] = 0;
+ $result['all_events'] = 0;
+ $result['all_events_today'] = 0;
$result['notice'] = array();
$result['info'] = array();
@@ -166,9 +168,9 @@ function ping_init(&$a) {
);
if($events && count($events)) {
- $result['events'] = intval($events[0]['total']);
+ $result['all_events'] = intval($events[0]['total']);
- if($result['events']) {
+ if($result['all_events']) {
$str_now = datetime_convert('UTC',$a->timezone,'now','Y-m-d');
foreach($events as $x) {
$bd = false;
@@ -176,10 +178,15 @@ function ping_init(&$a) {
$result['birthdays'] ++;
$bd = true;
}
+ else {
+ $result['events'] ++;
+ }
if(datetime_convert('UTC',((intval($x['adjust'])) ? $a->timezone : 'UTC'), $x['start'],'Y-m-d') === $str_now) {
- $result['events_today'] ++;
+ $result['all_events_today'] ++;
if($bd)
$result['birthdays_today'] ++;
+ else
+ $result['events_today'] ++;
}
}
}