more loose ends
This commit is contained in:
parent
b77eaebb3a
commit
390a1ce552
@ -93,6 +93,9 @@ function localize_item(&$item){
|
|||||||
|
|
||||||
if (activity_match($item['verb'],ACTIVITY_LIKE) || activity_match($item['verb'],ACTIVITY_DISLIKE)){
|
if (activity_match($item['verb'],ACTIVITY_LIKE) || activity_match($item['verb'],ACTIVITY_DISLIKE)){
|
||||||
|
|
||||||
|
if(is_array($item['object']))
|
||||||
|
$obj = $item['object'];
|
||||||
|
else
|
||||||
$obj = json_decode_plus($item['object']);
|
$obj = json_decode_plus($item['object']);
|
||||||
|
|
||||||
if($obj['author'] && $obj['author']['link'])
|
if($obj['author'] && $obj['author']['link'])
|
||||||
|
@ -77,9 +77,8 @@ function acl_init(&$a){
|
|||||||
|
|
||||||
// autocomplete for Contacts
|
// autocomplete for Contacts
|
||||||
|
|
||||||
$r = q("SELECT COUNT(`id`) AS c FROM `contact`
|
$r = q("SELECT COUNT(abook_id) AS c FROM abook left join xchan on abook_xchan = xchan_hash
|
||||||
WHERE `uid` = %d AND `self` = 0
|
WHERE abook_channel = %d $sql_extra2" ,
|
||||||
AND `pending` = 0 $sql_extra2" ,
|
|
||||||
intval(local_user())
|
intval(local_user())
|
||||||
);
|
);
|
||||||
$contact_count = (int)$r[0]['c'];
|
$contact_count = (int)$r[0]['c'];
|
||||||
|
@ -184,12 +184,13 @@ function photos_post(&$a) {
|
|||||||
intval($page_owner_uid),
|
intval($page_owner_uid),
|
||||||
dbesc($r[0]['resource_id'])
|
dbesc($r[0]['resource_id'])
|
||||||
);
|
);
|
||||||
$i = q("SELECT * FROM `item` WHERE `resource_id` = '%s' AND `uid` = %d LIMIT 1",
|
$i = q("SELECT * FROM `item` WHERE `resource_id` = '%s' AND resource_type = 'photo' and `uid` = %d LIMIT 1",
|
||||||
dbesc($r[0]['resource_id']),
|
dbesc($r[0]['resource_id']),
|
||||||
intval($page_owner_uid)
|
intval($page_owner_uid)
|
||||||
);
|
);
|
||||||
if(count($i)) {
|
if(count($i)) {
|
||||||
q("UPDATE `item` SET `deleted` = 1, `edited` = '%s', `changed` = '%s' WHERE `parent_mid` = '%s' AND `uid` = %d",
|
q("UPDATE `item` SET item_restrict = (item_restrict & %d), `edited` = '%s', `changed` = '%s' WHERE `parent_mid` = '%s' AND `uid` = %d",
|
||||||
|
intval(ITEM_DELETED),
|
||||||
dbesc(datetime_convert()),
|
dbesc(datetime_convert()),
|
||||||
dbesc(datetime_convert()),
|
dbesc(datetime_convert()),
|
||||||
dbesc($i[0]['mid']),
|
dbesc($i[0]['mid']),
|
||||||
|
Reference in New Issue
Block a user