mirror of
https://github.com/slawkens/myaac.git
synced 2025-06-10 23:04:30 +02:00
fix for othire where size is saved in houses.tiles
This commit is contained in:
parent
58598742e8
commit
9a475f2c57
@ -165,6 +165,8 @@ if(isset($_POST['town']) && isset($_POST['state']) && isset($_POST['order']) &&
|
||||
foreach($players_info->fetchAll() as $player)
|
||||
$players[$player['houseid']] = array('name' => $player['ownername']);
|
||||
|
||||
$hasTilesColumn = $db->hasColumn('houses', 'tiles');
|
||||
|
||||
$houses = array();
|
||||
foreach($houses_info->fetchAll() as $house)
|
||||
{
|
||||
@ -185,7 +187,7 @@ if(isset($_POST['town']) && isset($_POST['state']) && isset($_POST['order']) &&
|
||||
$houseRent = 'Free';
|
||||
}
|
||||
|
||||
$houses[] = array('owner' => $owner, 'name' => $house['name'], 'size' => $house['size'], 'rent' => $house['rent'], 'rentedBy' => $houseRent);
|
||||
$houses[] = array('owner' => $owner, 'name' => $house['name'], 'size' => ($hasTilesColumn ? $house['tiles'] : $house['size']), 'rent' => $house['rent'], 'rentedBy' => $houseRent);
|
||||
}
|
||||
|
||||
$housesSearch = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user