@@ -15,12 +15,12 @@ discard block |
||
| 15 | 15 | $fleet_row = &$mission_data['fleet']; |
| 16 | 16 | $destination_planet = &$mission_data['dst_planet']; |
| 17 | 17 | |
| 18 | - if(!$fleet_row) |
|
| 18 | + if (!$fleet_row) |
|
| 19 | 19 | { |
| 20 | 20 | return CACHE_NOTHING; |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | - if(!isset($destination_planet['id'])) |
|
| 23 | + if (!isset($destination_planet['id'])) |
|
| 24 | 24 | { |
| 25 | 25 | // doquery("UPDATE {{fleets}} SET `fleet_mess` = 1 WHERE `fleet_id` = {$fleet_row['fleet_id']} LIMIT 1;"); |
| 26 | 26 | DbFleetStatic::fleet_send_back($mission_data['fleet']); |
@@ -32,12 +32,12 @@ discard block |
||
| 32 | 32 | $RecyclerCapacity = 0; |
| 33 | 33 | $OtherFleetCapacity = 0; |
| 34 | 34 | $fleet_array = sys_unit_str2arr($fleet_row['fleet_array']); |
| 35 | - foreach($fleet_array as $unit_id => $unit_count) |
|
| 35 | + foreach ($fleet_array as $unit_id => $unit_count) |
|
| 36 | 36 | { |
| 37 | - if(in_array($unit_id, sn_get_groups('fleet'))) |
|
| 37 | + if (in_array($unit_id, sn_get_groups('fleet'))) |
|
| 38 | 38 | { |
| 39 | 39 | $capacity = get_unit_param($unit_id, P_CAPACITY) * $unit_count; |
| 40 | - if(in_array($unit_id, sn_get_groups('flt_recyclers'))) |
|
| 40 | + if (in_array($unit_id, sn_get_groups('flt_recyclers'))) |
|
| 41 | 41 | { |
| 42 | 42 | $RecyclerCapacity += $capacity; |
| 43 | 43 | } |
@@ -49,19 +49,19 @@ discard block |
||
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | $IncomingFleetGoods = $fleet_row["fleet_resource_metal"] + $fleet_row["fleet_resource_crystal"] + $fleet_row["fleet_resource_deuterium"]; |
| 52 | - if($IncomingFleetGoods > $OtherFleetCapacity) |
|
| 52 | + if ($IncomingFleetGoods > $OtherFleetCapacity) |
|
| 53 | 53 | { |
| 54 | 54 | $RecyclerCapacity -= ($IncomingFleetGoods - $OtherFleetCapacity); |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | - if(($destination_planet["debris_metal"] + $destination_planet["debris_crystal"]) <= $RecyclerCapacity) |
|
| 57 | + if (($destination_planet["debris_metal"] + $destination_planet["debris_crystal"]) <= $RecyclerCapacity) |
|
| 58 | 58 | { |
| 59 | 59 | $RecycledGoods["metal"] = $destination_planet["debris_metal"]; |
| 60 | 60 | $RecycledGoods["crystal"] = $destination_planet["debris_crystal"]; |
| 61 | 61 | } |
| 62 | 62 | else |
| 63 | 63 | { |
| 64 | - if (($destination_planet["debris_metal"] > $RecyclerCapacity / 2) AND |
|
| 64 | + if (($destination_planet["debris_metal"] > $RecyclerCapacity / 2) AND |
|
| 65 | 65 | ($destination_planet["debris_crystal"] > $RecyclerCapacity / 2)) |
| 66 | 66 | { |
| 67 | 67 | $RecycledGoods["metal"] = $RecyclerCapacity / 2; |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | } |
| 96 | 96 | } |
| 97 | 97 | } |
| 98 | - $NewCargo['Metal'] = $fleet_row["fleet_resource_metal"] + $RecycledGoods["metal"]; |
|
| 98 | + $NewCargo['Metal'] = $fleet_row["fleet_resource_metal"] + $RecycledGoods["metal"]; |
|
| 99 | 99 | $NewCargo['Crystal'] = $fleet_row["fleet_resource_crystal"] + $RecycledGoods["crystal"]; |
| 100 | 100 | $NewCargo['Deuterium'] = $fleet_row["fleet_resource_deuterium"]; |
| 101 | 101 | |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | HelperString::numberFloorAndFormat($RecycledGoods["metal"]), $lang['Metal'], |
| 109 | 109 | HelperString::numberFloorAndFormat($RecycledGoods["crystal"]), $lang['Crystal'] |
| 110 | 110 | ); |
| 111 | - msg_send_simple_message ( $fleet_row['fleet_owner'], '', $fleet_row['fleet_start_time'], MSG_TYPE_RECYCLE, $lang['sys_mess_spy_control'], $lang['sys_recy_report'], $Message); |
|
| 111 | + msg_send_simple_message($fleet_row['fleet_owner'], '', $fleet_row['fleet_start_time'], MSG_TYPE_RECYCLE, $lang['sys_mess_spy_control'], $lang['sys_recy_report'], $Message); |
|
| 112 | 112 | |
| 113 | 113 | // $QryUpdateFleet = "UPDATE {{fleets}} SET `fleet_mess` = 1,`fleet_resource_metal` = '{$NewCargo['Metal']}',`fleet_resource_crystal` = '{$NewCargo['Crystal']}',`fleet_resource_deuterium` = '{$NewCargo['Deuterium']}' "; |
| 114 | 114 | // $QryUpdateFleet .= "WHERE `fleet_id` = '{$fleet_row['fleet_id']}' LIMIT 1;"; |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | function flt_mission_destroy($mission_data) { |
| 11 | 11 | $fleet_row = $mission_data['fleet']; |
| 12 | 12 | $destination_planet = $mission_data['dst_planet']; |
| 13 | - if(!$destination_planet || !is_array($destination_planet) || $destination_planet['planet_type'] != PT_MOON) { |
|
| 13 | + if (!$destination_planet || !is_array($destination_planet) || $destination_planet['planet_type'] != PT_MOON) { |
|
| 14 | 14 | DbFleetStatic::fleet_send_back($fleet_row); |
| 15 | 15 | |
| 16 | 16 | return CACHE_FLEET; |
@@ -4,7 +4,7 @@ |
||
| 4 | 4 | |
| 5 | 5 | function flt_mission_hold(&$mission_data) |
| 6 | 6 | { |
| 7 | - if($mission_data['fleet']['fleet_end_stay'] < SN_TIME_NOW) |
|
| 7 | + if ($mission_data['fleet']['fleet_end_stay'] < SN_TIME_NOW) |
|
| 8 | 8 | { |
| 9 | 9 | DbFleetStatic::fleet_send_back($mission_data['fleet']); |
| 10 | 10 | // doquery("UPDATE {{fleets}} SET `fleet_mess` = 1 WHERE `fleet_id` = '{$fleet_row['fleet_id']}' LIMIT 1;"); |
@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | $fleet_row = &$mission_data['fleet']; |
| 16 | 16 | $destination_planet = &$mission_data['dst_planet']; |
| 17 | 17 | |
| 18 | - if(!$destination_planet || !is_array($destination_planet) || $fleet_row['fleet_owner'] != $destination_planet['id_owner']) |
|
| 18 | + if (!$destination_planet || !is_array($destination_planet) || $fleet_row['fleet_owner'] != $destination_planet['id_owner']) |
|
| 19 | 19 | { |
| 20 | 20 | // doquery("UPDATE {{fleets}} SET `fleet_mess` = 1 WHERE `fleet_id` = {$fleet_row['fleet_id']} LIMIT 1;"); |
| 21 | 21 | DbFleetStatic::fleet_send_back($mission_data['fleet']); |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | $mission_data['src_planet']['name'], uni_render_coordinates_href($fleet_row, 'fleet_start_', 3, ''), $destination_planet['name'], uni_render_coordinates_href($fleet_row, 'fleet_end_', 3, ''), |
| 29 | 29 | $fleet_row['fleet_resource_metal'], $lang['Metal'], $fleet_row['fleet_resource_crystal'], $lang['Crystal'], $fleet_row['fleet_resource_deuterium'], $lang['Deuterium']) . |
| 30 | 30 | '<br />' . $lang['sys_relocate_mess_user']; |
| 31 | - foreach(sys_unit_str2arr($fleet_row['fleet_array']) as $ship_id => $ship_count) |
|
| 31 | + foreach (sys_unit_str2arr($fleet_row['fleet_array']) as $ship_id => $ship_count) |
|
| 32 | 32 | { |
| 33 | 33 | $Message .= $lang['tech'][$ship_id] . ' - ' . $ship_count . '<br />'; |
| 34 | 34 | } |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | * @inheritdoc |
| 90 | 90 | */ |
| 91 | 91 | public function update() { |
| 92 | - if($this->getShipCount() < 1) { |
|
| 92 | + if ($this->getShipCount() < 1) { |
|
| 93 | 93 | return $this->delete(); |
| 94 | 94 | } else { |
| 95 | 95 | return parent::update(); |
@@ -153,12 +153,12 @@ discard block |
||
| 153 | 153 | |
| 154 | 154 | $shipCount = floor($shipCount); |
| 155 | 155 | |
| 156 | - if($this->shipList[$shipSnId] + $shipCount < 0) { |
|
| 156 | + if ($this->shipList[$shipSnId] + $shipCount < 0) { |
|
| 157 | 157 | throw new \Exception("Trying to deduct more ships [{$shipSnId}] '{$shipCount}' when fleet [{$this->id}] has only {$this->shipList[$shipSnId]}"); |
| 158 | 158 | } |
| 159 | 159 | |
| 160 | 160 | $this->shipList[$shipSnId] += $shipCount; |
| 161 | - if($this->shipList[$shipSnId] < 1) { |
|
| 161 | + if ($this->shipList[$shipSnId] < 1) { |
|
| 162 | 162 | unset($this->shipList[$shipSnId]); |
| 163 | 163 | } |
| 164 | 164 | |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | |
| 184 | 184 | $resourceCount = ceil($resourceCount); |
| 185 | 185 | |
| 186 | - if($this->resources[$resourceId] + $resourceCount < 0) { |
|
| 186 | + if ($this->resources[$resourceId] + $resourceCount < 0) { |
|
| 187 | 187 | throw new \Exception("FLEET ERROR! Trying to deduct more resources [{$resourceId}] '{$resourceCount}' when fleet [{$this->id}] has only {$this->resources[$resourceId]}"); |
| 188 | 188 | } |
| 189 | 189 | |
@@ -379,7 +379,7 @@ |
||
| 379 | 379 | public function dbLoadRecord($id) { |
| 380 | 380 | $result = parent::dbLoadRecord($id); |
| 381 | 381 | |
| 382 | - if(!$this->isNew()) { |
|
| 382 | + if (!$this->isNew()) { |
|
| 383 | 383 | $this->resources[RES_METAL] = $this->_getContainer()->metal; |
| 384 | 384 | $this->resources[RES_CRYSTAL] = $this->_getContainer()->crystal; |
| 385 | 385 | $this->resources[RES_DEUTERIUM] = $this->_getContainer()->deuterium; |
@@ -426,8 +426,8 @@ |
||
| 426 | 426 | protected function getTravelData() { |
| 427 | 427 | $travel_data = flt_travel_data( |
| 428 | 428 | $this->getFleetOwnerRecord(), |
| 429 | - ['galaxy' => $this->fleet_start_galaxy, 'system' => $this->fleet_start_system, 'planet' => $this->fleet_start_planet,], |
|
| 430 | - ['galaxy' => $this->fleet_end_galaxy, 'system' => $this->fleet_end_system, 'planet' => $this->fleet_end_planet,], |
|
| 429 | + ['galaxy' => $this->fleet_start_galaxy, 'system' => $this->fleet_start_system, 'planet' => $this->fleet_start_planet, ], |
|
| 430 | + ['galaxy' => $this->fleet_end_galaxy, 'system' => $this->fleet_end_system, 'planet' => $this->fleet_end_planet, ], |
|
| 431 | 431 | $this->getShipListArray(), |
| 432 | 432 | $this->speedPercentTenth |
| 433 | 433 | ); |
@@ -170,9 +170,9 @@ discard block |
||
| 170 | 170 | 'advGoogleLeftMenuCode' => '(Place here code for banner)', |
| 171 | 171 | |
| 172 | 172 | // Alliance bonus calculations |
| 173 | - 'ali_bonus_algorithm' => 0, // Bonus calculation algorithm |
|
| 173 | + 'ali_bonus_algorithm' => 0, // Bonus calculation algorithm |
|
| 174 | 174 | 'ali_bonus_brackets' => 10, // Brackets count for ALI_BONUS_BY_RANK |
| 175 | - 'ali_bonus_brackets_divisor' => 10,// Bonus divisor for ALI_BONUS_BY_RANK |
|
| 175 | + 'ali_bonus_brackets_divisor' => 10, // Bonus divisor for ALI_BONUS_BY_RANK |
|
| 176 | 176 | 'ali_bonus_divisor' => 10000000, // Rank divisor for ALI_BONUS_BY_POINTS |
| 177 | 177 | 'ali_bonus_members' => 10, // Minimum alliance size to start using bonus |
| 178 | 178 | |
@@ -214,7 +214,7 @@ discard block |
||
| 214 | 214 | |
| 215 | 215 | 'eco_scale_storage' => 1, |
| 216 | 216 | 'eco_stockman_fleet' => '', // Black Market - Starting amount of s/h ship merchant to sell |
| 217 | - 'eco_stockman_fleet_populate' => 1, // Populate empty Stockman fleet with ships or not |
|
| 217 | + 'eco_stockman_fleet_populate' => 1, // Populate empty Stockman fleet with ships or not |
|
| 218 | 218 | 'empire_mercenary_base_period' => PERIOD_MONTH, // Base |
| 219 | 219 | 'empire_mercenary_temporary' => 0, // Temporary empire-wide mercenaries |
| 220 | 220 | |
@@ -225,11 +225,11 @@ discard block |
||
| 225 | 225 | 'energy_basic_income' => 0, |
| 226 | 226 | |
| 227 | 227 | // Bashing protection settings |
| 228 | - 'fleet_bashing_attacks' => 3, // Max amount of attack per wave - 3 by default |
|
| 229 | - 'fleet_bashing_interval' => 1800, // Maximum interval between attacks when they still count as one wave - 30m by default |
|
| 230 | - 'fleet_bashing_scope' => 86400, // Interval on which bashing waves counts - 24h by default |
|
| 231 | - 'fleet_bashing_war_delay' => 43200, // Delay before start bashing after declaring war to alliance - 12h by default |
|
| 232 | - 'fleet_bashing_waves' => 3, // Max amount of waves per day - 3 by default |
|
| 228 | + 'fleet_bashing_attacks' => 3, // Max amount of attack per wave - 3 by default |
|
| 229 | + 'fleet_bashing_interval' => 1800, // Maximum interval between attacks when they still count as one wave - 30m by default |
|
| 230 | + 'fleet_bashing_scope' => 86400, // Interval on which bashing waves counts - 24h by default |
|
| 231 | + 'fleet_bashing_war_delay' => 43200, // Delay before start bashing after declaring war to alliance - 12h by default |
|
| 232 | + 'fleet_bashing_waves' => 3, // Max amount of waves per day - 3 by default |
|
| 233 | 233 | |
| 234 | 234 | 'Fleet_Cdr' => 30, |
| 235 | 235 | 'fleet_speed' => 1, |
@@ -237,8 +237,8 @@ discard block |
||
| 237 | 237 | 'fleet_update_interval' => 4, |
| 238 | 238 | 'fleet_update_lock' => '', // SQL time when lock was acquired |
| 239 | 239 | |
| 240 | - 'game_adminEmail' => 'root@localhost', // Admin's email to show to users |
|
| 241 | - 'game_counter' => 0, // Does built-in page hit counter is on? |
|
| 240 | + 'game_adminEmail' => 'root@localhost', // Admin's email to show to users |
|
| 241 | + 'game_counter' => 0, // Does built-in page hit counter is on? |
|
| 242 | 242 | // Defaults |
| 243 | 243 | 'game_default_language' => 'ru', |
| 244 | 244 | 'game_default_skin' => 'skins/EpicBlue/', |
@@ -252,14 +252,14 @@ discard block |
||
| 252 | 252 | 'game_maxSystem' => 199, |
| 253 | 253 | 'game_maxPlanet' => 15, |
| 254 | 254 | // Game global settings |
| 255 | - 'game_mode' => 0, // 0 - SuperNova, 1 - oGame |
|
| 255 | + 'game_mode' => 0, // 0 - SuperNova, 1 - oGame |
|
| 256 | 256 | 'game_name' => 'SuperNova', // Server name (would be on banners and on top of left menu) |
| 257 | 257 | |
| 258 | 258 | 'game_news_actual' => PERIOD_DAY_3, // How long announcement would be marked as "New". In seconds. Default - 3 days |
| 259 | - 'game_news_overview' => 3, // How much last news to show in Overview page |
|
| 260 | - 'game_news_overview_show' => PERIOD_WEEK_2, // How long news will be shown in Overview page in seconds. Default - 2 weeks |
|
| 259 | + 'game_news_overview' => 3, // How much last news to show in Overview page |
|
| 260 | + 'game_news_overview_show' => PERIOD_WEEK_2, // How long news will be shown in Overview page in seconds. Default - 2 weeks |
|
| 261 | 261 | // Noob protection |
| 262 | - 'game_noob_factor' => 5, // Multiplier to divide "stronger" and "weaker" users |
|
| 262 | + 'game_noob_factor' => 5, // Multiplier to divide "stronger" and "weaker" users |
|
| 263 | 263 | 'game_noob_points' => 5000, // Below this point user threated as noob. 0 to disable |
| 264 | 264 | |
| 265 | 265 | 'game_multiaccount_enabled' => 0, // 1 - allow interactions for players with same IP (multiaccounts) |
@@ -313,12 +313,12 @@ discard block |
||
| 313 | 313 | 'payment_currency_exchange_wmu' => 30, |
| 314 | 314 | 'payment_currency_exchange_wmz' => 1, |
| 315 | 315 | |
| 316 | - 'payment_lot_price' => 1, // Lot price in default currency |
|
| 317 | - 'payment_lot_size' => 2500, // Lot size. Also service as minimum amount of DM that could be bought with one transaction |
|
| 316 | + 'payment_lot_price' => 1, // Lot price in default currency |
|
| 317 | + 'payment_lot_size' => 2500, // Lot size. Also service as minimum amount of DM that could be bought with one transaction |
|
| 318 | 318 | |
| 319 | 319 | 'planet_capital_cost' => 25000, // Cost in DM to move Capital to current planet |
| 320 | - 'planet_capital_mining_rate' => 2.0, // Capital Mining rates |
|
| 321 | - 'planet_capital_building_rate' => 2.0, // Capital Building rates |
|
| 320 | + 'planet_capital_mining_rate' => 2.0, // Capital Mining rates |
|
| 321 | + 'planet_capital_building_rate' => 2.0, // Capital Building rates |
|
| 322 | 322 | 'planet_teleport_cost' => 50000, // Cost of planet teleportation |
| 323 | 323 | 'planet_teleport_timeout' => 86400, // Timeout for next teleportation |
| 324 | 324 | |
@@ -340,7 +340,7 @@ discard block |
||
| 340 | 340 | 'resource_multiplier' => 1, |
| 341 | 341 | |
| 342 | 342 | //Roleplay system |
| 343 | - 'rpg_bonus_divisor' => 10, // Amount of DM referral shoud get for partner have 1 DM bonus |
|
| 343 | + 'rpg_bonus_divisor' => 10, // Amount of DM referral shoud get for partner have 1 DM bonus |
|
| 344 | 344 | 'rpg_bonus_minimum' => 10000, // Minimum DM ammount for starting paying bonuses to affiliate |
| 345 | 345 | |
| 346 | 346 | // Black Market - General |
@@ -405,12 +405,12 @@ discard block |
||
| 405 | 405 | 'url_purchase_metamatter' => '', |
| 406 | 406 | 'url_rules' => '', |
| 407 | 407 | |
| 408 | - 'users_amount' => 1, // Total users count |
|
| 408 | + 'users_amount' => 1, // Total users count |
|
| 409 | 409 | 'game_users_online_timeout' => PERIOD_MINUTE_15, // Seconds, How long user should considered ONLINE for online counter |
| 410 | - 'game_users_update_online' => 30, // How often user online should be refreshed (seconds) |
|
| 411 | - 'var_online_user_time' => 0, // When last time user online was refreshed |
|
| 412 | - 'var_online_user_count' => 0, // Last calculated online user count |
|
| 413 | - 'server_log_online' => 0, // Log online user count |
|
| 410 | + 'game_users_update_online' => 30, // How often user online should be refreshed (seconds) |
|
| 411 | + 'var_online_user_time' => 0, // When last time user online was refreshed |
|
| 412 | + 'var_online_user_count' => 0, // Last calculated online user count |
|
| 413 | + 'server_log_online' => 0, // Log online user count |
|
| 414 | 414 | |
| 415 | 415 | 'user_birthday_celebrate' => 0, // When last time celebrations (i.e. giftgiving) was made |
| 416 | 416 | 'user_birthday_gift' => 0, // User birthday gift |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | function sys_user_vacation($user) { |
| 13 | 13 | global $config; |
| 14 | 14 | |
| 15 | - if(sys_get_param_str('vacation') == 'leave') { |
|
| 15 | + if (sys_get_param_str('vacation') == 'leave') { |
|
| 16 | 16 | if ($user['vacation'] < SN_TIME_NOW) { |
| 17 | 17 | $user['vacation'] = 0; |
| 18 | 18 | $user['vacation_next'] = SN_TIME_NOW + $config->player_vacation_timeout; |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | } |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | - if($user['vacation']) { |
|
| 23 | + if ($user['vacation']) { |
|
| 24 | 24 | // sn_sys_logout(false, true); |
| 25 | 25 | // core_auth::logout(false, true); |
| 26 | 26 | |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | \DBAL\DbQuery::build()->setTable('users')->setValues($field_set)->doInsert(); |
| 164 | 164 | $user_new = db_user_by_id(db_insert_id()); |
| 165 | 165 | |
| 166 | - if(!($options['galaxy'] && $options['system'] && $options['planet'])) { |
|
| 166 | + if (!($options['galaxy'] && $options['system'] && $options['planet'])) { |
|
| 167 | 167 | $options['galaxy'] = SN::$config->LastSettedGalaxyPos; |
| 168 | 168 | $options['system'] = SN::$config->LastSettedSystemPos; |
| 169 | 169 | $segment_size = floor(SN::$config->game_maxPlanet / 3); |
@@ -171,19 +171,19 @@ discard block |
||
| 171 | 171 | $segment++; |
| 172 | 172 | $options['planet'] = mt_rand(1 + $segment * $segment_size, ($segment + 1) * $segment_size); |
| 173 | 173 | |
| 174 | - while(true) { |
|
| 175 | - if($options['planet'] > SN::$config->game_maxPlanet) { |
|
| 174 | + while (true) { |
|
| 175 | + if ($options['planet'] > SN::$config->game_maxPlanet) { |
|
| 176 | 176 | $options['planet'] = mt_rand(0, $segment_size - 1) + 1; |
| 177 | 177 | $options['system']++; |
| 178 | 178 | } |
| 179 | - if($options['system'] > SN::$config->game_maxSystem) { |
|
| 179 | + if ($options['system'] > SN::$config->game_maxSystem) { |
|
| 180 | 180 | $options['system'] = 1; |
| 181 | 181 | $options['galaxy']++; |
| 182 | 182 | } |
| 183 | 183 | $options['galaxy'] > SN::$config->game_maxGalaxy ? $options['galaxy'] = 1 : false; |
| 184 | 184 | |
| 185 | 185 | $galaxy_row = DBStaticPlanet::db_planet_by_gspt($options['galaxy'], $options['system'], $options['planet'], PT_PLANET, true, 'id'); |
| 186 | - if(!$galaxy_row['id']) { |
|
| 186 | + if (!$galaxy_row['id']) { |
|
| 187 | 187 | SN::$config->db_saveItem(array( |
| 188 | 188 | 'LastSettedGalaxyPos' => $options['galaxy'], |
| 189 | 189 | 'LastSettedSystemPos' => $options['system'], |
@@ -204,7 +204,7 @@ discard block |
||
| 204 | 204 | $username_safe = db_escape($username_unsafe); |
| 205 | 205 | doquery("REPLACE INTO `{{player_name_history}}` SET `player_id` = {$user_new['id']}, `player_name` = '{$username_safe}'"); |
| 206 | 206 | |
| 207 | - if(!empty($options['partner_id']) && ($referral_row = db_user_by_id($options['partner_id'], true))) { |
|
| 207 | + if (!empty($options['partner_id']) && ($referral_row = db_user_by_id($options['partner_id'], true))) { |
|
| 208 | 208 | doquery("INSERT INTO `{{referrals}}` SET `id` = {$user_new['id']}, `id_partner` = {$options['partner_id']}"); |
| 209 | 209 | } |
| 210 | 210 | |