From: Michael Date: Sun, 17 Jun 2018 21:55:01 +0000 (+0000) Subject: Using the constants X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2a76290d19adb072fcf90a143ab7e6eb8a2d3ced;p=friendica.git Using the constants --- diff --git a/src/Protocol/DFRN.php b/src/Protocol/DFRN.php index 2487b3ca57..9a24c75e46 100644 --- a/src/Protocol/DFRN.php +++ b/src/Protocol/DFRN.php @@ -245,14 +245,7 @@ class DFRN } if (!empty($ids)) { - $condition = ['id' => $ids]; - $fields = ['author-id', 'uid', 'id', 'parent', 'uri', 'thr-parent', - 'parent-uri', 'created', 'edited', 'verb', 'object-type', - 'guid', 'private', 'title', 'body', 'location', 'coord', 'app', - 'attach', 'object', 'allow_cid', 'allow_gid', 'deny_cid', 'deny_gid', - 'extid', 'target', 'tag', 'bookmark', 'deleted', - 'author-link', 'owner-link', 'signed_text', 'signature', 'signer']; - $ret = Item::select($fields, $condition); + $ret = Item::select(Item::DELIVER_FIELDLIST, ['id' => $ids]); $items = dba::inArray($ret); } else { $items = []; @@ -336,13 +329,7 @@ class DFRN $condition = ['id' => $item_id]; } - $fields = ['author-id', 'uid', 'id', 'parent', 'uri', 'thr-parent', - 'parent-uri', 'created', 'edited', 'verb', 'object-type', - 'guid', 'private', 'title', 'body', 'location', 'coord', 'app', - 'attach', 'object', 'allow_cid', 'allow_gid', 'deny_cid', 'deny_gid', - 'extid', 'target', 'tag', 'bookmark', 'deleted', - 'author-link', 'owner-link', 'signed_text', 'signature', 'signer']; - $ret = Item::select($fields, $condition); + $ret = Item::select(Item::DELIVER_FIELDLIST, $condition); $items = dba::inArray($ret); if (!DBM::is_result($items)) { killme();