events are still buggered and aren't anywhere close to working, but not buggered quite as much as before.

This commit is contained in:
friendica
2013-01-07 15:12:16 -08:00
parent 31ce6a3876
commit da188214c3
6 changed files with 17 additions and 68 deletions

View File

@@ -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']),