mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 17:29:21 +02:00
fix #136
This commit is contained in:
parent
38294420d5
commit
ae8af396f4
@ -165,6 +165,7 @@ 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 +186,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;
|
||||
@ -203,4 +204,4 @@ $twig->display('houses.html.twig', array(
|
||||
'cleanOldHouse' => isset($cleanOld) ? $cleanOld : null,
|
||||
'housesSearch' => $housesSearch,
|
||||
'houses' => isset($houses) ? $houses : null
|
||||
));
|
||||
));
|
||||
|
Loading…
x
Reference in New Issue
Block a user