@@ -829,10 +829,17 @@ |
||
829 | 829 | |
830 | 830 | // OK v4.5 |
831 | 831 | // TODO - REMEMBER_ME |
832 | + |
|
833 | + /** |
|
834 | + * @param integer $period |
|
835 | + */ |
|
832 | 836 | protected static function cookie_set($value, $impersonate = false, $period = null) { |
833 | 837 | sn_setcookie($impersonate ? SN_COOKIE_U_I : SN_COOKIE_U, $value, $period === null ? SN_TIME_NOW + PERIOD_YEAR : $period, SN_ROOT_RELATIVE); |
834 | 838 | } |
835 | 839 | |
840 | + /** |
|
841 | + * @param string $message |
|
842 | + */ |
|
836 | 843 | protected static function flog($message, $die = false) { |
837 | 844 | if(!defined('DEBUG_AUTH') || !DEBUG_AUTH) { |
838 | 845 | return; |
@@ -180,6 +180,9 @@ discard block |
||
180 | 180 | } |
181 | 181 | |
182 | 182 | |
183 | + /** |
|
184 | + * @param string $query |
|
185 | + */ |
|
183 | 186 | function security_watch_user_queries($query) { |
184 | 187 | // TODO Заменить это на новый логгер |
185 | 188 | global $config, $is_watching, $user, $debug; |
@@ -202,6 +205,9 @@ discard block |
||
202 | 205 | } |
203 | 206 | |
204 | 207 | |
208 | + /** |
|
209 | + * @param string $query |
|
210 | + */ |
|
205 | 211 | function security_query_check_bad_words($query) { |
206 | 212 | global $user, $dm_change_legit, $mm_change_legit; |
207 | 213 |
@@ -55,6 +55,9 @@ |
||
55 | 55 | return true; |
56 | 56 | } |
57 | 57 | |
58 | + /** |
|
59 | + * @param string $query_string |
|
60 | + */ |
|
58 | 61 | function mysql_query($query_string) { |
59 | 62 | return mysql_query($query_string, $this->link); |
60 | 63 | } |
@@ -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 = 0, $unit_snid = 0) { |
73 | 79 | return classSupernova::db_del_record_list(LOC_UNIT, |
74 | 80 | "`unit_location_type` = {$unit_location_type}" . |
@@ -70,8 +70,8 @@ |
||
70 | 70 | /** |
71 | 71 | * Vector constructor. |
72 | 72 | * |
73 | - * @param int|string $galaxy |
|
74 | - * @param int|Vector|array $system |
|
73 | + * @param integer $galaxy |
|
74 | + * @param integer $system |
|
75 | 75 | * @param int $planet |
76 | 76 | * @param int $type |
77 | 77 | */ |
@@ -14,6 +14,9 @@ |
||
14 | 14 | $this->design = $gc->design; |
15 | 15 | } |
16 | 16 | |
17 | + /** |
|
18 | + * @param integer $authorAccessLevel |
|
19 | + */ |
|
17 | 20 | protected function applyElements($elements, $text, $authorAccessLevel = AUTH_LEVEL_REGISTERED) { |
18 | 21 | foreach ($elements as $auth_level => $element) { |
19 | 22 | if ($auth_level > $authorAccessLevel) { |
@@ -309,7 +309,7 @@ discard block |
||
309 | 309 | * <p>null - транзакция НЕ должна быть запущена</p> |
310 | 310 | * <p>true - транзакция должна быть запущена - для совместимости с $for_update</p> |
311 | 311 | * <p>false - всё равно - для совместимости с $for_update</p> |
312 | - * @return bool Текущий статус транзакции |
|
312 | + * @return null|boolean Текущий статус транзакции |
|
313 | 313 | */ |
314 | 314 | public static function db_transaction_check($status = null) { |
315 | 315 | $error_msg = false; |
@@ -376,7 +376,7 @@ discard block |
||
376 | 376 | /** |
377 | 377 | * Блокирует указанные таблицу/список таблиц |
378 | 378 | * |
379 | - * @param string|array $tables Таблица/список таблиц для блокировки. Названия таблиц - без префиксов |
|
379 | + * @param string $tables Таблица/список таблиц для блокировки. Названия таблиц - без префиксов |
|
380 | 380 | * <p>string - название таблицы для блокировки</p> |
381 | 381 | * <p>array - массив, где ключ - имя таблицы, а значение - условия блокировки элементов</p> |
382 | 382 | */ |
@@ -97,9 +97,7 @@ |
||
97 | 97 | /** |
98 | 98 | * Gets accessor for later use |
99 | 99 | * |
100 | - * @param string $accessor |
|
101 | 100 | * |
102 | - * @param string $varName |
|
103 | 101 | * |
104 | 102 | * @return callable|null |
105 | 103 | */ |
@@ -94,6 +94,10 @@ discard block |
||
94 | 94 | * @param null|\db_mysql $db |
95 | 95 | */ |
96 | 96 | // TODO - $db should be supplied externally |
97 | + |
|
98 | + /** |
|
99 | + * @param db_mysql $db |
|
100 | + */ |
|
97 | 101 | public function __construct($db = null) { |
98 | 102 | $this->db = empty($db) ? classSupernova::$gc->db : $db; |
99 | 103 | } |
@@ -205,7 +209,7 @@ discard block |
||
205 | 209 | |
206 | 210 | |
207 | 211 | /** |
208 | - * @param $table |
|
212 | + * @param string $table |
|
209 | 213 | * |
210 | 214 | * @return $this |
211 | 215 | */ |
@@ -313,7 +317,7 @@ discard block |
||
313 | 317 | /** |
314 | 318 | * Wrapper for db_escape() |
315 | 319 | * |
316 | - * @param mixed $string |
|
320 | + * @param string $string |
|
317 | 321 | * |
318 | 322 | * @return string |
319 | 323 | */ |
@@ -344,7 +348,7 @@ discard block |
||
344 | 348 | /** |
345 | 349 | * Quote mysql DB identifier |
346 | 350 | * |
347 | - * @param mixed $fieldName |
|
351 | + * @param string $fieldName |
|
348 | 352 | * |
349 | 353 | * @return string |
350 | 354 | */ |
@@ -391,7 +395,7 @@ discard block |
||
391 | 395 | /** |
392 | 396 | * Quote table name with `{{ }}` |
393 | 397 | * |
394 | - * @param mixed $tableName |
|
398 | + * @param string $tableName |
|
395 | 399 | * |
396 | 400 | * @return string |
397 | 401 | */ |
@@ -438,7 +442,7 @@ discard block |
||
438 | 442 | |
439 | 443 | |
440 | 444 | /** |
441 | - * @param $command |
|
445 | + * @param string $command |
|
442 | 446 | */ |
443 | 447 | protected function buildCommand($command) { |
444 | 448 | switch ($this->command = $command) { |