@@ -70,6 +70,9 @@ discard block |
||
70 | 70 | $this->numqueries = 0; |
71 | 71 | } |
72 | 72 | |
73 | + /** |
|
74 | + * @param string $mes |
|
75 | + */ |
|
73 | 76 | function add($mes) { |
74 | 77 | $this->log .= $mes; |
75 | 78 | $this->numqueries++; |
@@ -185,6 +188,9 @@ discard block |
||
185 | 188 | return $error_backtrace; |
186 | 189 | } |
187 | 190 | |
191 | + /** |
|
192 | + * @param string $die_message |
|
193 | + */ |
|
188 | 194 | function error_fatal($die_message, $details = 'There is a fatal error on page') { |
189 | 195 | // TODO - Записывать детали ошибки в лог-файл |
190 | 196 | die($die_message); |
@@ -323,7 +323,7 @@ discard block |
||
323 | 323 | * <p>null - транзакция НЕ должна быть запущена</p> |
324 | 324 | * <p>true - транзакция должна быть запущена - для совместимости с $for_update</p> |
325 | 325 | * <p>false - всё равно - для совместимости с $for_update</p> |
326 | - * @return bool Текущий статус транзакции |
|
326 | + * @return null|boolean Текущий статус транзакции |
|
327 | 327 | */ |
328 | 328 | public static function db_transaction_check($status = null) { |
329 | 329 | $error_msg = false; |
@@ -399,7 +399,7 @@ discard block |
||
399 | 399 | /** |
400 | 400 | * Блокирует указанные таблицу/список таблиц |
401 | 401 | * |
402 | - * @param string|array $tables Таблица/список таблиц для блокировки. Названия таблиц - без префиксов |
|
402 | + * @param string $tables Таблица/список таблиц для блокировки. Названия таблиц - без префиксов |
|
403 | 403 | * <p>string - название таблицы для блокировки</p> |
404 | 404 | * <p>array - массив, где ключ - имя таблицы, а значение - условия блокировки элементов</p> |
405 | 405 | */ |
@@ -587,6 +587,9 @@ discard block |
||
587 | 587 | return $result; |
588 | 588 | } |
589 | 589 | |
590 | + /** |
|
591 | + * @param integer $location_type |
|
592 | + */ |
|
590 | 593 | public static function db_ins_field_set($location_type, $field_set, $serialize = false) { |
591 | 594 | // TODO multiinsert |
592 | 595 | !sn_db_field_set_is_safe($field_set) ? $field_set = sn_db_field_set_make_safe($field_set, $serialize) : false; |
@@ -809,7 +812,7 @@ discard block |
||
809 | 812 | * @param $location_type |
810 | 813 | * @param $location_id |
811 | 814 | * |
812 | - * @return array|bool |
|
815 | + * @return boolean |
|
813 | 816 | */ |
814 | 817 | public static function db_get_unit_list_by_location($user_id = 0, $location_type, $location_id) |
815 | 818 | { |
@@ -21,11 +21,19 @@ discard block |
||
21 | 21 | return empty($result) ? null : $result; |
22 | 22 | } |
23 | 23 | |
24 | + /** |
|
25 | + * @param integer $galaxy |
|
26 | + * @param integer $system |
|
27 | + * @param integer $planet |
|
28 | + */ |
|
24 | 29 | public static function db_planet_by_gspt_safe($galaxy, $system, $planet, $planet_type, $for_update = false, $fields = '*') { |
25 | 30 | return classSupernova::db_get_record_list(LOC_PLANET, |
26 | 31 | "{{planets}}.`galaxy` = {$galaxy} AND {{planets}}.`system` = {$system} AND {{planets}}.`planet` = {$planet} AND {{planets}}.`planet_type` = {$planet_type}", true); |
27 | 32 | } |
28 | 33 | |
34 | + /** |
|
35 | + * @param integer $planet_type |
|
36 | + */ |
|
29 | 37 | public static function db_planet_by_gspt($galaxy, $system, $planet, $planet_type, $for_update = false, $fields = '*') { |
30 | 38 | $galaxy = intval($galaxy); |
31 | 39 | $system = intval($system); |
@@ -120,6 +128,9 @@ discard block |
||
120 | 128 | "`id_owner` = '{$user_row['id']}' {$conditions} ORDER BY {$order_by}"); |
121 | 129 | } |
122 | 130 | |
131 | + /** |
|
132 | + * @param integer $planet_id |
|
133 | + */ |
|
123 | 134 | public static function db_planet_list_by_user_or_planet($user_id, $planet_id) { |
124 | 135 | if(!($user_id = idval($user_id)) && !($planet_id = idval($planet_id))) { |
125 | 136 | return false; |
@@ -138,6 +149,9 @@ discard block |
||
138 | 149 | return classSupernova::db_upd_record_by_id(LOC_PLANET, $planet_id, $set); |
139 | 150 | } |
140 | 151 | |
152 | + /** |
|
153 | + * @param integer $ui_planet_type |
|
154 | + */ |
|
141 | 155 | public static function db_planet_set_by_gspt($ui_galaxy, $ui_system, $ui_planet, $ui_planet_type = PT_ALL, $set) { |
142 | 156 | if(!($set = trim($set))) { |
143 | 157 | return false; |
@@ -56,6 +56,9 @@ discard block |
||
56 | 56 | WHERE unit_player_id = {$user_id} AND unit_location_type = " . LOC_PLANET . " AND unit_level > 0 AND unit_snid IN (" . STRUC_LABORATORY . ", " . STRUC_LABORATORY_NANO . ");"); |
57 | 57 | } |
58 | 58 | |
59 | + /** |
|
60 | + * @param string $set |
|
61 | + */ |
|
59 | 62 | public static function db_unit_set_by_id($unit_id, $set) { |
60 | 63 | return classSupernova::db_upd_record_by_id(LOC_UNIT, $unit_id, $set); |
61 | 64 | } |
@@ -69,6 +72,9 @@ discard block |
||
69 | 72 | return classSupernova::db_ins_record(LOC_UNIT, $set); |
70 | 73 | } |
71 | 74 | |
75 | + /** |
|
76 | + * @param integer $unit_location_type |
|
77 | + */ |
|
72 | 78 | public static function db_unit_list_delete($user_id = 0, $unit_location_type, $unit_location_id, $unit_snid = 0) { |
73 | 79 | return classSupernova::db_del_record_list(LOC_UNIT, |
74 | 80 | "`unit_location_type` = {$unit_location_type} AND `unit_location_id` = {$unit_location_id}" . |
@@ -293,7 +293,7 @@ |
||
293 | 293 | } |
294 | 294 | |
295 | 295 | /** |
296 | - * @param $ranklist |
|
296 | + * @param string $ranklist |
|
297 | 297 | * @param $user |
298 | 298 | */ |
299 | 299 | public static function db_ally_update_ranklist($ranklist, $user) { |
@@ -19,9 +19,9 @@ discard block |
||
19 | 19 | |
20 | 20 | /** |
21 | 21 | * @param $user_id |
22 | - * @param $nick |
|
22 | + * @param string $nick |
|
23 | 23 | * @param $ally_id |
24 | - * @param $message |
|
24 | + * @param string $message |
|
25 | 25 | * @param $chat_message_sender_name |
26 | 26 | * @param $chat_message_recipient_id |
27 | 27 | * @param $chat_message_recipient_name |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | * @param $alliance |
58 | 58 | * @param $where_add |
59 | 59 | * @param $start_row |
60 | - * @param $page_limit |
|
60 | + * @param integer $page_limit |
|
61 | 61 | * |
62 | 62 | * @return array|bool|mysqli_result|null |
63 | 63 | */ |
@@ -75,7 +75,7 @@ |
||
75 | 75 | |
76 | 76 | |
77 | 77 | /** |
78 | - * @param $fleet_group_id_list |
|
78 | + * @param string $fleet_group_id_list |
|
79 | 79 | */ |
80 | 80 | public static function db_acs_delete_by_list($fleet_group_id_list) { |
81 | 81 | doquery("DELETE FROM {{aks}} WHERE `id` IN ({$fleet_group_id_list})"); |
@@ -25,9 +25,9 @@ |
||
25 | 25 | } |
26 | 26 | |
27 | 27 | /** |
28 | - * @param $template |
|
29 | - * @param $query_where |
|
30 | - * @param $query_limit |
|
28 | + * @param template $template |
|
29 | + * @param string $query_where |
|
30 | + * @param integer $query_limit |
|
31 | 31 | * |
32 | 32 | * @return array|bool|mysqli_result|null |
33 | 33 | */ |
@@ -17,7 +17,7 @@ |
||
17 | 17 | * @param $user |
18 | 18 | * @param $survey_id |
19 | 19 | * @param $survey_vote_id |
20 | - * @param $user_name_safe |
|
20 | + * @param string $user_name_safe |
|
21 | 21 | */ |
22 | 22 | public static function db_survey_vote_insert(&$user, $survey_id, $survey_vote_id, $user_name_safe) { |
23 | 23 | doquery("INSERT INTO {{survey_votes}} SET `survey_parent_id` = {$survey_id}, `survey_parent_answer_id` = {$survey_vote_id}, `survey_vote_user_id` = {$user['id']}, `survey_vote_user_name` = '{$user_name_safe}';"); |