Merge pull request #2296 from annando/1601-api-repeat
API: Only allow repeating of public items
This commit is contained in:
commit
7ea3923429
|
@ -1551,6 +1551,8 @@
|
||||||
WHERE `item`.`visible` = 1 and `item`.`moderated` = 0 AND `item`.`deleted` = 0
|
WHERE `item`.`visible` = 1 and `item`.`moderated` = 0 AND `item`.`deleted` = 0
|
||||||
AND `contact`.`id` = `item`.`contact-id`
|
AND `contact`.`id` = `item`.`contact-id`
|
||||||
AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
|
AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
|
||||||
|
AND NOT `item`.`private` AND `item`.`allow_cid` = '' AND `item`.`allow`.`gid` = ''
|
||||||
|
AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = ''
|
||||||
$sql_extra
|
$sql_extra
|
||||||
AND `item`.`id`=%d",
|
AND `item`.`id`=%d",
|
||||||
intval($id)
|
intval($id)
|
||||||
|
@ -1579,7 +1581,8 @@
|
||||||
$_REQUEST["source"] = api_source();
|
$_REQUEST["source"] = api_source();
|
||||||
|
|
||||||
item_post($a);
|
item_post($a);
|
||||||
}
|
} else
|
||||||
|
throw new ForbiddenException();
|
||||||
|
|
||||||
// this should output the last post (the one we just posted).
|
// this should output the last post (the one we just posted).
|
||||||
$called_api = null;
|
$called_api = null;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user