mirror of
https://github.com/openvk/openvk
synced 2024-12-22 16:42:32 +03:00
Show audios in reverse order
This commit is contained in:
parent
2ea91360c8
commit
1f340e392f
1 changed files with 1 additions and 1 deletions
|
@ -77,7 +77,7 @@ class Audios
|
||||||
function getByEntityID(int $entity, int $offset = 0, ?int $limit = NULL, ?int& $deleted = nullptr): \Traversable
|
function getByEntityID(int $entity, int $offset = 0, ?int $limit = NULL, ?int& $deleted = nullptr): \Traversable
|
||||||
{
|
{
|
||||||
$limit ??= OPENVK_DEFAULT_PER_PAGE;
|
$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) {
|
foreach($iter as $rel) {
|
||||||
$audio = $this->get($rel->audio);
|
$audio = $this->get($rel->audio);
|
||||||
if(!$audio || $audio->isDeleted()) {
|
if(!$audio || $audio->isDeleted()) {
|
||||||
|
|
Loading…
Reference in a new issue