aboutsummaryrefslogtreecommitdiffstats
path: root/include/event.php
diff options
context:
space:
mode:
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']),