Change selectOriginal post to return earliest post from non-0 user
I believe the earliest entry not being uid=0 should be the original post of a reshared post
This commit is contained in:
parent
8d9e0b4eae
commit
532a46d188
1 changed files with 4 additions and 1 deletions
|
@ -263,7 +263,10 @@ class Post
|
|||
return $result;
|
||||
}
|
||||
|
||||
return self::selectFirst($original_fields, ['uri-id' => $result['thr-parent-id'], 'uid' => [0, $result['uid']]], $params);
|
||||
$final_query_condition = ['uri-id' => $result['thr-parent-id']];
|
||||
$final_query_condition = DBA::mergeConditions($final_query_condition, ['uid != 0']);
|
||||
$final_params = ['order' => ['id']];
|
||||
return self::selectFirst($original_fields, $final_query_condition, $final_params);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue