mirror of
https://github.com/friendica/friendica
synced 2025-04-26 09:50:15 +00:00
Preparation for the possibility to globally block contacts
This commit is contained in:
parent
cc9074bed5
commit
c6dbbe21b4
3 changed files with 54 additions and 1 deletions
|
@ -32,7 +32,7 @@ function add_thread($itemid, $onlyshadow = false) {
|
|||
* @param integer $itemid Item ID that should be added
|
||||
*/
|
||||
function add_shadow_thread($itemid) {
|
||||
$items = q("SELECT `uid`, `wall`, `private`, `moderated`, `visible`, `contact-id`, `deleted`, `network`
|
||||
$items = q("SELECT `uid`, `wall`, `private`, `moderated`, `visible`, `contact-id`, `deleted`, `network`, `author-id`, `owner-id`
|
||||
FROM `item` WHERE `id` = %d AND (`parent` = %d OR `parent` = 0) LIMIT 1", intval($itemid), intval($itemid));
|
||||
|
||||
if (!dbm::is_result($items)) {
|
||||
|
@ -56,6 +56,11 @@ function add_shadow_thread($itemid) {
|
|||
return;
|
||||
}
|
||||
|
||||
// Is the public contact configured as hidden?
|
||||
if (hiddenContact($item["owner-id"]) || hiddenContact($item["author-id"])) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Only do these checks if the post isn't a wall post
|
||||
if (!$item["wall"]) {
|
||||
// Check, if hide-friends is activated - then don't do a shadow entry
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue