@@ -11,6 +11,9 @@ discard block |
||
| 11 | 11 | |
| 12 | 12 | require_once('db/db_queries.php'); |
| 13 | 13 | |
| 14 | +/** |
|
| 15 | + * @param string $tablename |
|
| 16 | + */ |
|
| 14 | 17 | function db_change_units_perform($query, $tablename, $object_id) { |
| 15 | 18 | $query = implode(',', $query); |
| 16 | 19 | if($query && $object_id) { |
@@ -67,11 +70,8 @@ discard block |
||
| 67 | 70 | /** |
| 68 | 71 | * Функция проверяет статус транзакции |
| 69 | 72 | * |
| 70 | - * @param null|true|false $status Должна ли быть запущена транзакция в момент проверки |
|
| 71 | - * <p>null - транзакция НЕ должна быть запущена</p> |
|
| 72 | - * <p>true - транзакция должна быть запущена - для совместимости с $for_update</p> |
|
| 73 | - * <p>false - всё равно - для совместимости с $for_update</p> |
|
| 74 | - * @return bool Текущий статус транзакции |
|
| 73 | + * @param boolean $transaction_should_be_started |
|
| 74 | + * @return null|boolean Текущий статус транзакции |
|
| 75 | 75 | */ |
| 76 | 76 | function sn_db_transaction_check($transaction_should_be_started = null) { |
| 77 | 77 | return classSupernova::db_transaction_check($transaction_should_be_started); |
@@ -80,6 +80,9 @@ |
||
| 80 | 80 | } |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | +/** |
|
| 84 | + * @param string $prefix_table_name |
|
| 85 | + */ |
|
| 83 | 86 | function upd_load_table_info($prefix_table_name, $prefixed = true) { |
| 84 | 87 | global $config, $update_tables, $update_indexes, $update_indexes_full, $update_foreigns; |
| 85 | 88 | |
@@ -21,11 +21,20 @@ 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 | + * @param integer $planet_type |
|
| 29 | + */ |
|
| 24 | 30 | public static function db_planet_by_gspt_safe($galaxy, $system, $planet, $planet_type, $for_update = false, $fields = '*') { |
| 25 | 31 | return classSupernova::db_get_record_list(LOC_PLANET, |
| 26 | 32 | "{{planets}}.`galaxy` = {$galaxy} AND {{planets}}.`system` = {$system} AND {{planets}}.`planet` = {$planet} AND {{planets}}.`planet_type` = {$planet_type}", true); |
| 27 | 33 | } |
| 28 | 34 | |
| 35 | + /** |
|
| 36 | + * @param integer $planet_type |
|
| 37 | + */ |
|
| 29 | 38 | public static function db_planet_by_gspt($galaxy, $system, $planet, $planet_type, $for_update = false, $fields = '*') { |
| 30 | 39 | $galaxy = intval($galaxy); |
| 31 | 40 | $system = intval($system); |
@@ -114,6 +123,9 @@ discard block |
||
| 114 | 123 | "`id_owner` = '{$user_row['id']}' {$conditions} ORDER BY {$order_by}"); |
| 115 | 124 | } |
| 116 | 125 | |
| 126 | + /** |
|
| 127 | + * @param integer $planet_id |
|
| 128 | + */ |
|
| 117 | 129 | public static function db_planet_list_by_user_or_planet($user_id, $planet_id) { |
| 118 | 130 | if(!($user_id = idval($user_id)) && !($planet_id = idval($planet_id))) { |
| 119 | 131 | return false; |
@@ -130,6 +142,9 @@ discard block |
||
| 130 | 142 | return classSupernova::db_upd_record_by_id(LOC_PLANET, $planet_id, $set); |
| 131 | 143 | } |
| 132 | 144 | |
| 145 | + /** |
|
| 146 | + * @param integer $ui_planet_type |
|
| 147 | + */ |
|
| 133 | 148 | public static function db_planet_set_by_gspt($ui_galaxy, $ui_system, $ui_planet, $ui_planet_type = PT_ALL, $set) { |
| 134 | 149 | if(!($set = trim($set))) { |
| 135 | 150 | return false; |
@@ -10,6 +10,9 @@ |
||
| 10 | 10 | |
| 11 | 11 | class AllianceStatic { |
| 12 | 12 | |
| 13 | + /** |
|
| 14 | + * @param string $string |
|
| 15 | + */ |
|
| 13 | 16 | public static function parseTitleList($string) { |
| 14 | 17 | global $ally_rights; |
| 15 | 18 | |
@@ -168,6 +168,9 @@ discard block |
||
| 168 | 168 | } |
| 169 | 169 | |
| 170 | 170 | |
| 171 | + /** |
|
| 172 | + * @param string $path |
|
| 173 | + */ |
|
| 171 | 174 | protected function lng_try_filepath($path, $file_path_relative) { |
| 172 | 175 | $file_path = SN_ROOT_PHYSICAL . ($path && file_exists(SN_ROOT_PHYSICAL . $path . $file_path_relative) ? $path : '') . $file_path_relative; |
| 173 | 176 | return file_exists($file_path) ? $file_path : false; |
@@ -278,6 +281,9 @@ discard block |
||
| 278 | 281 | return null; |
| 279 | 282 | } |
| 280 | 283 | |
| 284 | + /** |
|
| 285 | + * @param string $language_new |
|
| 286 | + */ |
|
| 281 | 287 | public function lng_switch($language_new) { |
| 282 | 288 | global $language, $user, $sn_mvc; |
| 283 | 289 | |
@@ -171,7 +171,7 @@ |
||
| 171 | 171 | /** |
| 172 | 172 | * @param $db_changeset |
| 173 | 173 | * |
| 174 | - * @return bool |
|
| 174 | + * @return boolean|null |
|
| 175 | 175 | * @deprecated |
| 176 | 176 | */ |
| 177 | 177 | public static function db_changeset_apply($db_changeset) { |
@@ -55,7 +55,6 @@ |
||
| 55 | 55 | |
| 56 | 56 | |
| 57 | 57 | /** |
| 58 | - * @param array $array |
|
| 59 | 58 | * |
| 60 | 59 | * @return array |
| 61 | 60 | */ |
@@ -37,7 +37,6 @@ |
||
| 37 | 37 | * TableSchema constructor. |
| 38 | 38 | * |
| 39 | 39 | * @param string $tableName |
| 40 | - * @param \db_mysql|null $db |
|
| 41 | 40 | */ |
| 42 | 41 | public function __construct($tableName, Schema $dbSchema) { |
| 43 | 42 | $this->dbSchema = $dbSchema; |
@@ -41,8 +41,8 @@ |
||
| 41 | 41 | /** |
| 42 | 42 | * Convert $delimiter delimited string to array |
| 43 | 43 | * |
| 44 | - * @param mixed $string |
|
| 45 | - * @param string $delimiter |
|
| 44 | + * @param string $string |
|
| 45 | + * @param string string |
|
| 46 | 46 | * |
| 47 | 47 | * @return array |
| 48 | 48 | */ |