events are still buggered and aren't anywhere close to working, but not buggered quite as much as before.
This commit is contained in:
@@ -40,41 +40,6 @@ function findpeople_widget() {
|
||||
}
|
||||
|
||||
|
||||
function networks_widget($baseurl,$selected = '') {
|
||||
|
||||
$a = get_app();
|
||||
|
||||
if(! local_user())
|
||||
return '';
|
||||
|
||||
|
||||
$r = q("select distinct(network) from contact where uid = %d and self = 0",
|
||||
intval(local_user())
|
||||
);
|
||||
|
||||
$nets = array();
|
||||
if(count($r)) {
|
||||
require_once('include/contact_selectors.php');
|
||||
foreach($r as $rr) {
|
||||
if($rr['network'])
|
||||
$nets[] = array('ref' => $rr['network'], 'name' => network_to_name($rr['network']), 'selected' => (($selected == $rr['network']) ? 'selected' : '' ));
|
||||
}
|
||||
}
|
||||
|
||||
if(count($nets) < 2)
|
||||
return '';
|
||||
|
||||
return replace_macros(get_markup_template('nets.tpl'),array(
|
||||
'$title' => t('Networks'),
|
||||
'$desc' => '',
|
||||
'$sel_all' => (($selected == '') ? 'selected' : ''),
|
||||
'$all' => t('All Networks'),
|
||||
'$nets' => $nets,
|
||||
'$base' => $baseurl,
|
||||
|
||||
));
|
||||
}
|
||||
|
||||
function fileas_widget($baseurl,$selected = '') {
|
||||
$a = get_app();
|
||||
|
||||
@@ -150,6 +115,7 @@ function common_friends_visitor_widget($profile_uid) {
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME
|
||||
if(! $cid) {
|
||||
if(get_my_url()) {
|
||||
$r = q("select id from contact where nurl = '%s' and uid = %d limit 1",
|
||||
|
||||
@@ -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']),
|
||||
|
||||
Reference in New Issue
Block a user