mirror of
https://github.com/friendica/friendica
synced 2025-04-22 05:50:13 +00:00
API: (hopefully) improves speed of the public timeline
This commit is contained in:
parent
cd8ce7eada
commit
24cc82f396
6 changed files with 124 additions and 11 deletions
|
@ -342,13 +342,14 @@ class Post
|
|||
* @param array $selected Array of selected fields, empty for all
|
||||
* @param array $condition Array of fields for condition
|
||||
* @param array $params Array of several parameters
|
||||
* @param bool $user_mode true = post-user-view, false = post-view
|
||||
*
|
||||
* @return boolean|object
|
||||
* @throws \Exception
|
||||
*/
|
||||
public static function selectForUser($uid, array $selected = [], array $condition = [], $params = [])
|
||||
public static function selectForUser($uid, array $selected = [], array $condition = [], $params = [], bool $user_mode = true)
|
||||
{
|
||||
return self::selectViewForUser('post-user-view', $uid, $selected, $condition, $params);
|
||||
return self::selectViewForUser($user_mode ? 'post-user-view' : 'post-view', $uid, $selected, $condition, $params);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue