mirror of
https://github.com/shlinkio/shlink.git
synced 2025-02-25 18:45:27 -06:00
Added last check on ShortUrlsOrdering which makes sure everything keeps behaving as it used to
This commit is contained in:
@@ -60,4 +60,9 @@ final class ShortUrlsOrdering
|
|||||||
{
|
{
|
||||||
return $this->orderDirection;
|
return $this->orderDirection;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function hasOrderField(): bool
|
||||||
|
{
|
||||||
|
return $this->orderField !== null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ class ShortUrlRepository extends EntityRepository implements ShortUrlRepositoryI
|
|||||||
}
|
}
|
||||||
|
|
||||||
// In case the ordering has been specified, the query could be more complex. Process it
|
// In case the ordering has been specified, the query could be more complex. Process it
|
||||||
if ($orderBy !== null) {
|
if ($orderBy !== null && $orderBy->hasOrderField()) {
|
||||||
return $this->processOrderByForList($qb, $orderBy);
|
return $this->processOrderByForList($qb, $orderBy);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user