From baf38dc6f99c619bc99f1c40d9a89a119260e93d Mon Sep 17 00:00:00 2001 From: Vladyslav Date: Fri, 31 Aug 2018 13:02:00 +0300 Subject: [PATCH] Sorting of villages +Fixed sorting of villages in the profile overview of the player and in the side menu of the village list (multivillage). Reduced to the real Travian. --- GameEngine/Database.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GameEngine/Database.php b/GameEngine/Database.php index 447c5335..a0dd69dd 100755 --- a/GameEngine/Database.php +++ b/GameEngine/Database.php @@ -1902,7 +1902,7 @@ class MYSQLi_DB implements IDbConnection { switch ($mode) { // by owner ID - case 0: $q = "SELECT * FROM " . TB_PREFIX . "vdata WHERE owner IN(".implode(', ', $uid).") ORDER BY capital DESC,pop DESC"; + case 0: $q = "SELECT * FROM " . TB_PREFIX . "vdata WHERE owner IN(".implode(', ', $uid).") ORDER BY pop DESC"; break; // capital villages where owner is a real player (i.e. not Natars etc.) @@ -7796,7 +7796,7 @@ References: User ID/Message ID, Mode // no need to cache this method function getArrayMemberVillage($uid) { list($uid) = $this->escape_input((int) $uid); - $q = 'SELECT a.wref, a.name, b.x, b.y from '.TB_PREFIX.'vdata AS a left join '.TB_PREFIX.'wdata AS b ON b.id = a.wref where owner = '.$uid.' order by capital DESC,pop DESC'; + $q = 'SELECT a.wref, a.name, b.x, b.y from '.TB_PREFIX.'vdata AS a left join '.TB_PREFIX.'wdata AS b ON b.id = a.wref where owner = '.$uid.' ORDER BY name ASC'; $result = mysqli_query($this->dblink,$q); $array = $this->mysqli_fetch_all($result); return $array;