mirror of
https://github.com/friendica/friendica
synced 2025-04-23 10:30:11 +00:00
The thread table is replaced by post-thread and post-thread-user
This commit is contained in:
parent
e561cad844
commit
5e846dd7c2
13 changed files with 358 additions and 153 deletions
|
@ -979,6 +979,10 @@ class Item
|
|||
Post\Media::insertFromAttachment($item['uri-id'], $item['attach']);
|
||||
}
|
||||
|
||||
if ($item['gravity'] == GRAVITY_PARENT) {
|
||||
Post\Thread::insert($item['uri-id'], $item);
|
||||
}
|
||||
|
||||
if (!in_array($item['verb'], self::ACTIVITIES)) {
|
||||
Post\Content::insert($item['uri-id'], $item);
|
||||
}
|
||||
|
@ -2203,9 +2207,9 @@ class Item
|
|||
|
||||
public static function firstPostDate($uid, $wall = false)
|
||||
{
|
||||
$condition = ['uid' => $uid, 'wall' => $wall, 'deleted' => false, 'visible' => true, 'moderated' => false];
|
||||
$condition = ['gravity' => GRAVITY_PARENT, 'uid' => $uid, 'wall' => $wall, 'deleted' => false, 'visible' => true, 'moderated' => false];
|
||||
$params = ['order' => ['received' => false]];
|
||||
$thread = DBA::selectFirst('thread', ['received'], $condition, $params);
|
||||
$thread = Post::selectFirst(['received'], $condition, $params);
|
||||
if (DBA::isResult($thread)) {
|
||||
return substr(DateTimeFormat::local($thread['received']), 0, 10);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue