From 1f340e392fba94fae58f7a274a3be27096813160 Mon Sep 17 00:00:00 2001 From: lalka2018 <99399973+lalka2016@users.noreply.github.com> Date: Tue, 14 Nov 2023 15:16:37 +0300 Subject: [PATCH] Show audios in reverse order --- Web/Models/Repositories/Audios.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Web/Models/Repositories/Audios.php b/Web/Models/Repositories/Audios.php index ad5e822e..64457299 100644 --- a/Web/Models/Repositories/Audios.php +++ b/Web/Models/Repositories/Audios.php @@ -77,7 +77,7 @@ class Audios function getByEntityID(int $entity, int $offset = 0, ?int $limit = NULL, ?int& $deleted = nullptr): \Traversable { $limit ??= OPENVK_DEFAULT_PER_PAGE; - $iter = $this->rels->where("entity", $entity)->limit($limit, $offset); + $iter = $this->rels->where("entity", $entity)->limit($limit, $offset)->order("index DESC"); foreach($iter as $rel) { $audio = $this->get($rel->audio); if(!$audio || $audio->isDeleted()) {