From 763acc4fd06b5c346fc39b0386587961bab1d909 Mon Sep 17 00:00:00 2001 From: Dan Chadwick Date: Thu, 11 Apr 2024 13:10:33 -0700 Subject: [PATCH] update sort --- .../custom/ufc/src/Controller/RecentFightsController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/modules/custom/ufc/src/Controller/RecentFightsController.php b/web/modules/custom/ufc/src/Controller/RecentFightsController.php index d30f0c3..97bc139 100644 --- a/web/modules/custom/ufc/src/Controller/RecentFightsController.php +++ b/web/modules/custom/ufc/src/Controller/RecentFightsController.php @@ -34,8 +34,8 @@ public static function create(ContainerInterface $container) { public function getRecentFights() { $query = $this->entityTypeManager->getStorage('node')->getQuery(); $query->accessCheck(TRUE); - $query->condition('type', 'fight')->sort('created', 'DESC'); - $query->range(0, 14); + $query->condition('type', 'fight')->sort('created', 'DESC')->sort('nid', 'DESC'); + $query->range(0, 13); $nids = $query->execute(); $all_fights = Node::loadMultiple($nids); $fights = [];