Use predefined field lists

This commit is contained in:
Michael 2018-06-17 06:27:52 +00:00
commit 0280a46ab4
9 changed files with 54 additions and 40 deletions

View file

@ -349,7 +349,7 @@ function display_content(App $a, $update = false, $update_uid = 0) {
$condition = ["`item`.`parent-uri` = (SELECT `parent-uri` FROM `item` WHERE `id` = ?)
AND `item`.`uid` IN (0, ?) " . $sql_extra, $item_id, local_user()];
$params = ['order' => ['uid', 'parent' => true, 'gravity', 'id']];
$r = Item::select(local_user(), [], $condition, $params);
$r = Item::select(local_user(), Item::DISPLAY_FIELDLIST, $condition, $params);
if (!DBM::is_result($r)) {
notice(L10n::t('Item not found.') . EOL);