mirror of
https://github.com/openvk/openvk
synced 2024-11-13 10:39:24 +03:00
Videos: DESC sorting instead of ASC
This commit is contained in:
parent
af45a85ff7
commit
b1a4a4a895
1 changed files with 1 additions and 1 deletions
|
@ -37,7 +37,7 @@ class Videos
|
|||
function getByUser(User $user, int $page = 1, ?int $perPage = NULL): \Traversable
|
||||
{
|
||||
$perPage = $perPage ?? OPENVK_DEFAULT_PER_PAGE;
|
||||
foreach($this->videos->where("owner", $user->getId())->where(["deleted" => 0, "unlisted" => 0])->page($page, $perPage) as $video)
|
||||
foreach($this->videos->where("owner", $user->getId())->where(["deleted" => 0, "unlisted" => 0])->page($page, $perPage)->order("created DESC") as $video)
|
||||
yield new Video($video);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue