aboutsummaryrefslogtreecommitdiffstats
path: root/include/event.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-01-07 15:12:16 -0800
committerfriendica <info@friendica.com>2013-01-07 15:12:16 -0800
commitda188214c304cefaa6fe0a36e1f60932da2f3bfb (patch)
tree9d4cf84f1fad3af4f7da3adeaf9ede4d04885bf2 /include/event.php
parent31ce6a3876fc0a3c37be1474a627ec0cea0e3622 (diff)
downloadvolse-hubzilla-da188214c304cefaa6fe0a36e1f60932da2f3bfb.tar.gz
volse-hubzilla-da188214c304cefaa6fe0a36e1f60932da2f3bfb.tar.bz2
volse-hubzilla-da188214c304cefaa6fe0a36e1f60932da2f3bfb.zip
events are still buggered and aren't anywhere close to working, but not buggered quite as much as before.
Diffstat (limited to 'include/event.php')
-rw-r--r--include/event.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/event.php b/include/event.php
index e4a01cf7d..6f9ba779c 100644
--- a/include/event.php
+++ b/include/event.php
@@ -177,10 +177,10 @@ function bbtoevent($s) {
}
-function sort_by_date($a) {
-
- usort($a,'ev_compare');
- return $a;
+function sort_by_date($arr) {
+ if(is_array($arr))
+ usort($arr,'ev_compare');
+ return $arr;
}
@@ -212,6 +212,8 @@ function event_store($arr) {
$arr['message_id'] = (x($arr,'message_id') ? $arr['message_id'] : get_message_id());
$arr['private'] = ((x($arr,'private')) ? intval($arr['private']) : 0);
+
+// FIXME
if($arr['cid'])
$c = q("SELECT * FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1",
intval($arr['cid']),