}
$params = ['order' => ['id' => true], 'limit' => [$start, $count]];
- $statuses = Post::selectForUser(api_user(), Item::DISPLAY_FIELDLIST, $condition, $params);
+// $statuses = Post::selectForUser(api_user(), Item::DISPLAY_FIELDLIST, $condition, $params);
+ $statuses = Post::select(Item::DISPLAY_FIELDLIST, $condition, $params);
$ret = api_format_items(Post::toArray($statuses), $user_info, false, $type);
*
*/
+use Friendica\Core\Protocol;
+use Friendica\Model\Contact;
+use Friendica\Model\Item;
use Friendica\Model\Notification;
return [
'about' => 'User used in tests',
'pending' => 0,
'blocked' => 0,
- 'rel' => 1,
- 'network' => 'dfrn',
+ 'rel' => Contact::FOLLOWER,
+ 'network' => Protocol::DFRN,
'location' => 'DFRN',
],
// Having the same name and nick allows us to test
'url' => 'http://localhost/profile/othercontact',
'pending' => 0,
'blocked' => 0,
- 'rel' => 0,
- 'network' => 'dfrn',
+ 'rel' => Contact::NOTHING,
+ 'network' => Protocol::DFRN,
'location' => 'DFRN',
],
[
'url' => 'http://localhost/profile/friendcontact',
'pending' => 0,
'blocked' => 0,
- 'rel' => 2,
- 'network' => 'dfrn',
+ 'rel' => Contact::SHARING,
+ 'network' => Protocol::DFRN,
'location' => 'DFRN',
],
[
'url' => 'http://localhost/profile/friendcontact',
'pending' => 0,
'blocked' => 0,
- 'rel' => 2,
- 'network' => 'dfrn',
+ 'rel' => Contact::SHARING,
+ 'network' => Protocol::DFRN,
'location' => 'DFRN',
],
[
'url' => 'http://localhost/profile/mutualcontact',
'pending' => 0,
'blocked' => 0,
- 'rel' => 3,
- 'network' => 'dfrn',
+ 'rel' => Contact::FRIEND,
+ 'network' => Protocol::DFRN,
'location' => 'DFRN',
],
[
'url' => 'http://localhost/profile/mutualcontact',
'pending' => 0,
'blocked' => 0,
- 'rel' => 2,
- 'network' => 'dfrn',
+ 'rel' => Contact::SHARING,
+ 'network' => Protocol::DFRN,
'location' => 'DFRN',
],
],
'author-id' => 42,
'owner-id' => 42,
'causer-id' => 42,
- 'network' => 'dfrn',
+ 'network' => Protocol::DFRN,
],
[
'uri-id' => 3,
'author-id' => 43,
'owner-id' => 43,
'causer-id' => 43,
- 'network' => 'dfrn',
+ 'network' => Protocol::DFRN,
],
[
'uri-id' => 6,
'author-id' => 44,
'owner-id' => 44,
'causer-id' => 44,
- 'network' => 'dfrn',
+ 'network' => Protocol::DFRN,
],
],
'post-thread-user' => [
'parent-uri' => '1',
'thr-parent-id' => 1,
'thr-parent' => '1',
- 'private' => 0,
+ 'private' => Item::PUBLIC,
'gravity' => GRAVITY_PARENT,
'author-link' => 'http://localhost/profile/selfcontact',
'wall' => 1,
'parent-uri' => '1',
'thr-parent-id' => 1,
'thr-parent' => '1',
- 'private' => 0,
+ 'private' => Item::PUBLIC,
'gravity' => GRAVITY_COMMENT,
'author-link' => 'http://localhost/profile/selfcontact',
'wall' => 1,
'parent-uri' => '3',
'thr-parent-id' => 3,
'thr-parent' => '3',
- 'private' => 0,
+ 'private' => Item::PUBLIC,
'gravity' => GRAVITY_PARENT,
'author-link' => 'http://localhost/profile/othercontact',
'wall' => 1,
'parent-uri' => '1',
'thr-parent-id' => 1,
'thr-parent' => '1',
- 'private' => 0,
+ 'private' => Item::PUBLIC,
'gravity' => GRAVITY_COMMENT,
'author-link' => 'http://localhost/profile/othercontact',
'wall' => 1,
'parent-uri' => '1',
'thr-parent-id' => 1,
'thr-parent' => '1',
- 'private' => 0,
+ 'private' => Item::PUBLIC,
'gravity' => GRAVITY_COMMENT,
'author-link' => 'http://localhost/profile/othercontact',
'wall' => 1,
'parent-uri' => '6',
'thr-parent-id' => 6,
'thr-parent' => '6',
- 'private' => 0,
+ 'private' => Item::PUBLIC,
'gravity' => GRAVITY_PARENT,
'author-link' => 'http://localhost/profile/othercontact',
'wall' => 1,