mirror of
https://github.com/friendica/friendica
synced 2025-04-19 07:10:11 +00:00
Get rid of the "item" table, enhanced "post" tables
This commit is contained in:
parent
c918e83aa2
commit
ce6ad1aa73
23 changed files with 736 additions and 235 deletions
|
@ -434,7 +434,7 @@ class Network extends BaseModule
|
|||
}
|
||||
|
||||
if (DBA::isResult($items)) {
|
||||
$parents = array_column($items, 'parent');
|
||||
$parents = array_column($items, 'parent-uri-id');
|
||||
} else {
|
||||
$parents = [];
|
||||
}
|
||||
|
@ -446,7 +446,7 @@ class Network extends BaseModule
|
|||
$condition = ['unseen' => true, 'uid' => local_user()];
|
||||
self::setItemsSeenByCondition($condition);
|
||||
} elseif (!empty($parents)) {
|
||||
$condition = ['unseen' => true, 'uid' => local_user(), 'parent' => $parents];
|
||||
$condition = ['unseen' => true, 'uid' => local_user(), 'parent-uri-id' => $parents];
|
||||
self::setItemsSeenByCondition($condition);
|
||||
}
|
||||
|
||||
|
|
|
@ -189,7 +189,7 @@ class Status extends BaseProfile
|
|||
0, $a->profile['uid']]);
|
||||
|
||||
$condition = DBA::mergeConditions($condition, ['uid' => $a->profile['uid'], 'network' => Protocol::FEDERATED,
|
||||
'visible' => true, 'deleted' => false, 'moderated' => false]);
|
||||
'visible' => true, 'deleted' => false]);
|
||||
|
||||
$pager = new Pager(DI::l10n(), $args->getQueryString(), $itemspage_network);
|
||||
$params = ['limit' => [$pager->getStart(), $pager->getItemsPerPage()], 'order' => ['received' => true]];
|
||||
|
|
|
@ -9,6 +9,7 @@ use Friendica\Content\Widget;
|
|||
use Friendica\Core\Renderer;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\DI;
|
||||
use Friendica\Model\Item;
|
||||
use Friendica\Model\Post;
|
||||
use Friendica\Model\Post\Category;
|
||||
use Friendica\Module\BaseSearch;
|
||||
|
@ -69,7 +70,7 @@ class Filed extends BaseSearch
|
|||
$item_condition = ['uid' => local_user(), 'uri-id' => $posts];
|
||||
$item_params = ['order' => ['uri-id' => true]];
|
||||
|
||||
$items = Post::toArray(Post::selectForUser(local_user(), [], $item_condition, $item_params));
|
||||
$items = Post::toArray(Post::selectForUser(local_user(), Item::DISPLAY_FIELDLIST, $item_condition, $item_params));
|
||||
|
||||
$o .= conversation(DI::app(), $items, 'filed', false, false, '', local_user());
|
||||
|
||||
|
|
|
@ -172,7 +172,7 @@ class Index extends BaseSearch
|
|||
|
||||
if (!empty($uriids)) {
|
||||
$params = ['order' => ['id' => true], 'group_by' => ['uri-id']];
|
||||
$items = Post::toArray(Post::selectForUser(local_user(), [], ['uri-id' => $uriids], $params));
|
||||
$items = Post::toArray(Post::selectForUser(local_user(), Item::DISPLAY_FIELDLIST, ['uri-id' => $uriids], $params));
|
||||
}
|
||||
|
||||
if (empty($items)) {
|
||||
|
|
|
@ -81,7 +81,7 @@ class Profile extends BaseModule
|
|||
"SELECT DISTINCT(`parent-uri-id`) AS `uri-id`, `created` FROM `post-view`
|
||||
WHERE `uid` = ? AND NOT `contact-blocked` AND NOT `contact-pending`
|
||||
AND `visible` AND (NOT `deleted` OR `gravity` = ?)
|
||||
AND NOT `moderated` AND `wall` $sql_extra4 $sql_extra
|
||||
AND `wall` $sql_extra4 $sql_extra
|
||||
ORDER BY `received` DESC",
|
||||
$a->profile['uid'],
|
||||
GRAVITY_ACTIVITY
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue