fix some issues that showed up in the logs.
This commit is contained in:
parent
f384695e3d
commit
3bd7c1af23
@ -1306,6 +1306,13 @@ function item_store($arr,$force_parent = false) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Don't let anybody set these, either intentionally or accidentally
|
||||||
|
|
||||||
|
if(array_key_exists('id',$arr))
|
||||||
|
unset($arr['id']);
|
||||||
|
if(array_key_exists('parent',$arr))
|
||||||
|
unset($arr['parent']);
|
||||||
|
|
||||||
$arr['lang'] = detect_language($arr['body']);
|
$arr['lang'] = detect_language($arr['body']);
|
||||||
|
|
||||||
$allowed_languages = get_pconfig($arr['uid'],'system','allowed_languages');
|
$allowed_languages = get_pconfig($arr['uid'],'system','allowed_languages');
|
||||||
|
15
mod/acl.php
15
mod/acl.php
@ -60,15 +60,16 @@ function acl_init(&$a){
|
|||||||
|
|
||||||
// autocomplete for Private Messages
|
// autocomplete for Private Messages
|
||||||
|
|
||||||
$r = q("SELECT COUNT(`id`) AS c FROM `contact`
|
|
||||||
WHERE `uid` = %d AND `self` = 0
|
$r = q("SELECT count xchan_hash as c
|
||||||
AND `blocked` = 0 AND `pending` = 0 AND `archive` = 0
|
FROM abook left join xchan on abook_xchan = xchan_hash
|
||||||
AND `network` IN ('%s','%s','%s') $sql_extra2" ,
|
WHERE abook_channel = %d and ( (abook_their_perms = null) or (abook_their_perms & %d ))
|
||||||
|
$sql_extra2 ",
|
||||||
intval(local_user()),
|
intval(local_user()),
|
||||||
dbesc(NETWORK_DFRN),
|
intval(PERMS_W_MAIL)
|
||||||
dbesc(NETWORK_ZOT),
|
|
||||||
dbesc(NETWORK_DIASPORA)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if($r)
|
||||||
$contact_count = (int)$r[0]['c'];
|
$contact_count = (int)$r[0]['c'];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user