From 8af1adbb492434e9eeaba28520b4d951dfdfe545 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Kova=CC=81cs?= Date: Sat, 23 Apr 2016 16:40:31 -0300 Subject: [PATCH] Fixed issue #102 --- src/xgp3.0.0/upload/application/controllers/adm/users.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/xgp3.0.0/upload/application/controllers/adm/users.php b/src/xgp3.0.0/upload/application/controllers/adm/users.php index aa7a1b752..12a432e07 100755 --- a/src/xgp3.0.0/upload/application/controllers/adm/users.php +++ b/src/xgp3.0.0/upload/application/controllers/adm/users.php @@ -1034,7 +1034,8 @@ private function saveBuildings($type = 1) // REMOVE LAST COMMA //$query_string = substr_replace($query_string, '', -1); // QUERY END - $query_string .= " `planet_field_current` = '" . $total_fields . "' "; + $query_string .= " `planet_field_current` = '" . $total_fields . "', "; + $query_string .= " `planet_field_max` = IF(`planet_type` = 3, 1 + `building_mondbasis` * " . FIELDS_BY_MOONBASIS_LEVEL . ", `planet_field_max`) "; $query_string .= " WHERE `building_planet_id` = '" . parent::$db->escapeValue($id_get) . "' AND `planet_id` = '" . parent::$db->escapeValue($id_get) . "';";