@@ -10,6 +10,7 @@ discard block |
||
| 10 | 10 | * |
| 11 | 11 | * 1.0 - copyright (c) 2010 by Gorlum for http://supernova.ws |
| 12 | 12 | * @version 1.0 |
| 13 | + * @param integer $lab_require |
|
| 13 | 14 | */ |
| 14 | 15 | function eco_get_lab_max_effective_level(&$user, $lab_require) |
| 15 | 16 | { |
@@ -193,6 +194,9 @@ discard block |
||
| 193 | 194 | return $result; |
| 194 | 195 | } |
| 195 | 196 | |
| 197 | +/** |
|
| 198 | + * @param integer[] $unit_list |
|
| 199 | + */ |
|
| 196 | 200 | function eco_is_builds_in_que($planet_que, $unit_list) |
| 197 | 201 | { |
| 198 | 202 | $eco_is_builds_in_que = false; |
@@ -55,6 +55,9 @@ discard block |
||
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | |
| 58 | +/** |
|
| 59 | + * @param integer $build_mode |
|
| 60 | + */ |
|
| 58 | 61 | function que_build($user, $planet, $build_mode = BUILD_CREATE, $redirect = true) { |
| 59 | 62 | global $lang, $config; |
| 60 | 63 | |
@@ -378,6 +381,9 @@ discard block |
||
| 378 | 381 | return classSupernova::db_que_list_by_type_location($user_id, $planet_id, $que_type, $for_update); |
| 379 | 382 | } |
| 380 | 383 | |
| 384 | +/** |
|
| 385 | + * @param integer $unit_id |
|
| 386 | + */ |
|
| 381 | 387 | function que_add_unit($unit_id, $user = array(), $planet = array(), $build_data, $unit_level = 0, $unit_amount = 1, $build_mode = BUILD_CREATE) { |
| 382 | 388 | // TODO Унифицировать проверки |
| 383 | 389 | |
@@ -141,6 +141,9 @@ |
||
| 141 | 141 | "); |
| 142 | 142 | } |
| 143 | 143 | |
| 144 | +/** |
|
| 145 | + * @param string $email_unsafe |
|
| 146 | + */ |
|
| 144 | 147 | function player_create($username_unsafe, $email_unsafe, $options) { |
| 145 | 148 | sn_db_transaction_check(true); |
| 146 | 149 | |
@@ -1,5 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | +/** |
|
| 4 | + * @return double |
|
| 5 | + */ |
|
| 3 | 6 | function flt_fleet_speed($user, $fleet) |
| 4 | 7 | { |
| 5 | 8 | if (!is_array($fleet)) |
@@ -29,6 +29,9 @@ |
||
| 29 | 29 | } |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | +/** |
|
| 33 | + * @param string $group_name |
|
| 34 | + */ |
|
| 32 | 35 | function flt_spy_scan($target_planet, $group_name, $section_title, $target_user = array()) |
| 33 | 36 | { |
| 34 | 37 | global $lang; |
@@ -26,6 +26,10 @@ |
||
| 26 | 26 | return true; |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | +/** |
|
| 30 | + * @param integer $mode |
|
| 31 | + * @param integer $mercenary_id |
|
| 32 | + */ |
|
| 29 | 33 | function mrc_mercenary_hire($mode, $user, $mercenary_id) { |
| 30 | 34 | global $config, $lang, $sn_powerup_buy_discounts; |
| 31 | 35 | |
@@ -46,8 +46,7 @@ |
||
| 46 | 46 | sn_db_transaction_commit(); |
| 47 | 47 | sys_redirect("galaxy.php?mode=name&galaxy={$uni_galaxy}&system={$uni_system}"); |
| 48 | 48 | } |
| 49 | - } |
|
| 50 | - catch (exception $e) |
|
| 49 | + } catch (exception $e) |
|
| 51 | 50 | { |
| 52 | 51 | sn_db_transaction_rollback(); |
| 53 | 52 | $template->assign_block_vars('result', array( |
@@ -79,8 +79,7 @@ |
||
| 79 | 79 | |
| 80 | 80 | sn_db_transaction_commit(); |
| 81 | 81 | throw new Exception($info_action, ERR_NONE); |
| 82 | - } |
|
| 83 | - catch (Exception $e) |
|
| 82 | + } catch (Exception $e) |
|
| 84 | 83 | { |
| 85 | 84 | sn_db_transaction_rollback(); |
| 86 | 85 | |
@@ -35,8 +35,7 @@ |
||
| 35 | 35 | if($planetrow['id_owner']) { |
| 36 | 36 | $global_data = sys_o_get_updated($user, $planetrow, SN_TIME_NOW); |
| 37 | 37 | $planetrow = $global_data['planet']; |
| 38 | - } |
|
| 39 | - else { |
|
| 38 | + } else { |
|
| 40 | 39 | // Locking user record |
| 41 | 40 | $user = db_user_by_id($user['id'], true); |
| 42 | 41 | } |