Don't insert non public comments on not existing thread parents
This commit is contained in:
parent
32651f7811
commit
46bd4d71d0
|
@ -1235,7 +1235,7 @@ class Processor
|
|||
|
||||
$has_parents = false;
|
||||
|
||||
if (!empty($item['parent-uri-id'])) {
|
||||
if (($item['private'] != Item::PRIVATE) && !empty($item['parent-uri-id'])) {
|
||||
if (Post::exists(['uri-id' => $item['parent-uri-id'], 'uid' => $receiver])) {
|
||||
$has_parents = true;
|
||||
} elseif ($add_parent && Post::exists(['uri-id' => $item['parent-uri-id'], 'uid' => 0])) {
|
||||
|
@ -1254,7 +1254,7 @@ class Processor
|
|||
}
|
||||
}
|
||||
|
||||
if (empty($item['parent-uri-id']) || ($item['thr-parent-id'] != $item['parent-uri-id'])) {
|
||||
if (($item['private'] == Item::PRIVATE) || empty($item['parent-uri-id']) || ($item['thr-parent-id'] != $item['parent-uri-id'])) {
|
||||
if (Post::exists(['uri-id' => $item['thr-parent-id'], 'uid' => $receiver])) {
|
||||
$has_parents = true;
|
||||
} elseif (($has_parents || $add_parent) && Post::exists(['uri-id' => $item['thr-parent-id'], 'uid' => 0])) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user