@@ -50,7 +50,7 @@ |
||
50 | 50 | } |
51 | 51 | |
52 | 52 | public function __get($property) { |
53 | - if (in_array($property, ['height', 'width',])) { |
|
53 | + if (in_array($property, ['height', 'width', ])) { |
|
54 | 54 | return $this->getImageContainer() ? $this->getImageContainer()->$property : 0; |
55 | 55 | } |
56 | 56 |
@@ -9,7 +9,7 @@ |
||
9 | 9 | * @param int $query_limit |
10 | 10 | */ |
11 | 11 | function nws_render(&$user, &$template, $query_where = '', $query_limit = 20) { |
12 | - if($user['authlevel'] < AUTH_LEVEL_ADMINISTRATOR) { |
|
12 | + if ($user['authlevel'] < AUTH_LEVEL_ADMINISTRATOR) { |
|
13 | 13 | $query_where .= (!empty($query_where) ? ' AND ' : '') |
14 | 14 | . '`tsTimeStamp` <= (NOW())'; |
15 | 15 | } |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | |
54 | 54 | $sprite = new Sprite($images, $layout, $scaleToPx); |
55 | 55 | $sprite->generate(); |
56 | - $sprite->saveOutput($dirOut, $outName, [$cssPrefix, $cssSuffix, $outName, $relativeUrl,]); |
|
56 | + $sprite->saveOutput($dirOut, $outName, [$cssPrefix, $cssSuffix, $outName, $relativeUrl, ]); |
|
57 | 57 | |
58 | 58 | print "Folder/filter processed\n\n"; |
59 | 59 | } |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | $images = []; |
102 | 102 | |
103 | 103 | foreach (scandir($dirRealPath) as $fileNameOnly) { |
104 | - if (in_array($fileNameOnly, ['.', '..',]) || is_dir($fullPath = "$dirRealPath/$fileNameOnly")) { |
|
104 | + if (in_array($fileNameOnly, ['.', '..', ]) || is_dir($fullPath = "$dirRealPath/$fileNameOnly")) { |
|
105 | 105 | continue; |
106 | 106 | } |
107 | 107 | $images = self::tryReadFile($fullPath, $images); |
@@ -33,10 +33,10 @@ |
||
33 | 33 | $gifDecoder = new Decoder($gifStream); |
34 | 34 | |
35 | 35 | /** Run decoder. Pass callback function to process decoded Frames when they're ready. */ |
36 | - $gifDecoder->decode(function (FrameDecodedEvent $event) { |
|
36 | + $gifDecoder->decode(function(FrameDecodedEvent $event) { |
|
37 | 37 | $this->frames[] = $event->decodedFrame; |
38 | 38 | |
39 | - $this->width += $event->decodedFrame->getSize()->getWidth(); |
|
39 | + $this->width += $event->decodedFrame->getSize()->getWidth(); |
|
40 | 40 | $this->maxWidth = max($this->maxWidth, $event->decodedFrame->getSize()->getWidth()); |
41 | 41 | |
42 | 42 | $this->height = max($this->height, $event->decodedFrame->getSize()->getHeight()); |
@@ -27,7 +27,7 @@ |
||
27 | 27 | * @return static|null |
28 | 28 | */ |
29 | 29 | public function fillLine($image, $gridSize) { |
30 | - if($image->isAnimatedGif()) { |
|
30 | + if ($image->isAnimatedGif()) { |
|
31 | 31 | $line = new SpriteLineGif(); |
32 | 32 | } else { |
33 | 33 | $line = $this->isFull($gridSize) ? new static() : $this; |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | $line->generate($this->height, $scaleToPx); |
81 | 81 | |
82 | 82 | $this->height += $line->height; |
83 | - $this->width = max($this->width, $line->width); |
|
83 | + $this->width = max($this->width, $line->width); |
|
84 | 84 | |
85 | 85 | // $line->image->savePng(__DIR__ . '/../gif_line_' . $this->height . '.png'); // TODO remove debug |
86 | 86 | } |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | protected function createGrid() { |
165 | 165 | $this->lineIndex = 0; |
166 | 166 | |
167 | - usort($this->imageList, function (ImageFile $a, ImageFile $b) { return $b->height - $a->height; }); |
|
167 | + usort($this->imageList, function(ImageFile $a, ImageFile $b) { return $b->height - $a->height; }); |
|
168 | 168 | |
169 | 169 | $prevLine = new SpriteLine(); |
170 | 170 | foreach ($this->imageList as $image) { |
@@ -238,9 +238,9 @@ discard block |
||
238 | 238 | 'advGoogleLeftMenuCode' => '(Place here code for banner)', |
239 | 239 | |
240 | 240 | // Alliance bonus calculations |
241 | - 'ali_bonus_algorithm' => 0, // Bonus calculation algorithm |
|
241 | + 'ali_bonus_algorithm' => 0, // Bonus calculation algorithm |
|
242 | 242 | 'ali_bonus_brackets' => 10, // Brackets count for ALI_BONUS_BY_RANK |
243 | - 'ali_bonus_brackets_divisor' => 10,// Bonus divisor for ALI_BONUS_BY_RANK |
|
243 | + 'ali_bonus_brackets_divisor' => 10, // Bonus divisor for ALI_BONUS_BY_RANK |
|
244 | 244 | 'ali_bonus_divisor' => 10000000, // Rank divisor for ALI_BONUS_BY_POINTS |
245 | 245 | 'ali_bonus_members' => 10, // Minimum alliance size to start using bonus |
246 | 246 | |
@@ -282,7 +282,7 @@ discard block |
||
282 | 282 | |
283 | 283 | 'eco_scale_storage' => 1, |
284 | 284 | 'eco_stockman_fleet' => '', // Black Market - Starting amount of s/h ship merchant to sell |
285 | - 'eco_stockman_fleet_populate' => 1, // Populate empty Stockman fleet with ships or not |
|
285 | + 'eco_stockman_fleet_populate' => 1, // Populate empty Stockman fleet with ships or not |
|
286 | 286 | 'empire_mercenary_base_period' => PERIOD_MONTH, // Base |
287 | 287 | 'empire_mercenary_temporary' => 0, // Temporary empire-wide mercenaries |
288 | 288 | |
@@ -293,22 +293,22 @@ discard block |
||
293 | 293 | 'energy_basic_income' => 0, |
294 | 294 | |
295 | 295 | // Bashing protection settings |
296 | - 'fleet_bashing_attacks' => 3, // Max amount of attack per wave - 3 by default |
|
297 | - 'fleet_bashing_interval' => 1800, // Maximum interval between attacks when they still count as one wave - 30m by default |
|
298 | - 'fleet_bashing_scope' => 86400, // Interval on which bashing waves counts - 24h by default |
|
299 | - 'fleet_bashing_war_delay' => 43200, // Delay before start bashing after declaring war to alliance - 12h by default |
|
300 | - 'fleet_bashing_waves' => 3, // Max amount of waves per day - 3 by default |
|
296 | + 'fleet_bashing_attacks' => 3, // Max amount of attack per wave - 3 by default |
|
297 | + 'fleet_bashing_interval' => 1800, // Maximum interval between attacks when they still count as one wave - 30m by default |
|
298 | + 'fleet_bashing_scope' => 86400, // Interval on which bashing waves counts - 24h by default |
|
299 | + 'fleet_bashing_war_delay' => 43200, // Delay before start bashing after declaring war to alliance - 12h by default |
|
300 | + 'fleet_bashing_waves' => 3, // Max amount of waves per day - 3 by default |
|
301 | 301 | |
302 | 302 | 'Fleet_Cdr' => 30, |
303 | 303 | 'fleet_speed' => 1, |
304 | 304 | |
305 | - 'fleet_update_dispatch_time' => 3, // (float) Maximum seconds fleet dispatch can run, Default 3s |
|
306 | - 'fleet_update_interval' => 4, // How often fleet dispatch worker should run |
|
305 | + 'fleet_update_dispatch_time' => 3, // (float) Maximum seconds fleet dispatch can run, Default 3s |
|
306 | + 'fleet_update_interval' => 4, // How often fleet dispatch worker should run |
|
307 | 307 | self::FLEET_UPDATE_MAX_RUN_TIME => 30, // (int) seconds. How long fleet dispatch worker can run. Should be 1 second or more |
308 | 308 | 'fleet_update_lock' => '', // SQL time when lock was acquired |
309 | 309 | |
310 | - 'game_adminEmail' => 'root@localhost', // Admin email to show to users |
|
311 | - 'game_counter' => 0, // Does built-in page hit counter is on? |
|
310 | + 'game_adminEmail' => 'root@localhost', // Admin email to show to users |
|
311 | + 'game_counter' => 0, // Does built-in page hit counter is on? |
|
312 | 312 | // Defaults |
313 | 313 | 'game_default_language' => 'ru', |
314 | 314 | 'game_default_skin' => 'skins/EpicBlue/', |
@@ -322,14 +322,14 @@ discard block |
||
322 | 322 | 'game_maxSystem' => 199, |
323 | 323 | 'game_maxPlanet' => 15, |
324 | 324 | // Game global settings |
325 | - 'game_mode' => 0, // 0 - SuperNova, 1 - oGame |
|
325 | + 'game_mode' => 0, // 0 - SuperNova, 1 - oGame |
|
326 | 326 | 'game_name' => 'SuperNova', // Server name (would be on banners and on top of left menu) |
327 | 327 | |
328 | 328 | 'game_news_actual' => PERIOD_DAY_3, // How long announcement would be marked as "New". In seconds. Default - 3 days |
329 | - 'game_news_overview' => 3, // How much last news to show in Overview page |
|
330 | - 'game_news_overview_show' => PERIOD_WEEK_2, // How long news will be shown in Overview page in seconds. Default - 2 weeks |
|
329 | + 'game_news_overview' => 3, // How much last news to show in Overview page |
|
330 | + 'game_news_overview_show' => PERIOD_WEEK_2, // How long news will be shown in Overview page in seconds. Default - 2 weeks |
|
331 | 331 | // Noob protection |
332 | - 'game_noob_factor' => 5, // Multiplier to divide "stronger" and "weaker" users |
|
332 | + 'game_noob_factor' => 5, // Multiplier to divide "stronger" and "weaker" users |
|
333 | 333 | 'game_noob_points' => 5000, // Below this point user treated as noob. 0 to disable |
334 | 334 | |
335 | 335 | 'game_multiaccount_enabled' => 0, // 1 - allow interactions for players with same IP (multiaccount) |
@@ -384,12 +384,12 @@ discard block |
||
384 | 384 | 'payment_currency_exchange_wmz' => 1, |
385 | 385 | 'payment_currency_exchange_pln' => 3.86, |
386 | 386 | |
387 | - 'payment_lot_price' => 1, // Lot's price in default currency |
|
388 | - 'payment_lot_size' => 2500, // Lot size. Also service as minimum amount of DM that could be bought with one transaction |
|
387 | + 'payment_lot_price' => 1, // Lot's price in default currency |
|
388 | + 'payment_lot_size' => 2500, // Lot size. Also service as minimum amount of DM that could be bought with one transaction |
|
389 | 389 | |
390 | 390 | 'planet_capital_cost' => 25000, // Cost in DM to move Capital to current planet |
391 | - 'planet_capital_mining_rate' => 2.0, // Capital Mining rates |
|
392 | - 'planet_capital_building_rate' => 2.0, // Capital Building rates |
|
391 | + 'planet_capital_mining_rate' => 2.0, // Capital Mining rates |
|
392 | + 'planet_capital_building_rate' => 2.0, // Capital Building rates |
|
393 | 393 | 'planet_teleport_cost' => 50000, // Cost of planet teleportation |
394 | 394 | 'planet_teleport_timeout' => 86400, // Timeout for next teleportation |
395 | 395 | |
@@ -411,7 +411,7 @@ discard block |
||
411 | 411 | 'resource_multiplier' => 1, |
412 | 412 | |
413 | 413 | //Role play system |
414 | - 'rpg_bonus_divisor' => 10, // Amount of DM referral should get for partner have 1 DM bonus |
|
414 | + 'rpg_bonus_divisor' => 10, // Amount of DM referral should get for partner have 1 DM bonus |
|
415 | 415 | 'rpg_bonus_minimum' => 10000, // Minimum DM amount for starting paying bonuses to affiliate |
416 | 416 | |
417 | 417 | // Black Market - General |
@@ -476,12 +476,12 @@ discard block |
||
476 | 476 | 'url_purchase_metamatter' => '', |
477 | 477 | 'url_rules' => '', |
478 | 478 | |
479 | - 'users_amount' => 1, // Total users count |
|
479 | + 'users_amount' => 1, // Total users count |
|
480 | 480 | 'game_users_online_timeout' => PERIOD_MINUTE_15, // Seconds, How long user should consider ONLINE for online counter |
481 | - 'game_users_update_online' => 30, // How often user online should be refreshed (seconds) |
|
482 | - 'var_online_user_time' => 0, // When last time user online was refreshed |
|
483 | - 'var_online_user_count' => 0, // Last calculated online user count |
|
484 | - 'server_log_online' => 0, // Log online user count |
|
481 | + 'game_users_update_online' => 30, // How often user online should be refreshed (seconds) |
|
482 | + 'var_online_user_time' => 0, // When last time user online was refreshed |
|
483 | + 'var_online_user_count' => 0, // Last calculated online user count |
|
484 | + 'server_log_online' => 0, // Log online user count |
|
485 | 485 | |
486 | 486 | 'user_birthday_celebrate' => 0, // When last time celebrations (i.e. gift-giving) was made - timestamp |
487 | 487 | 'user_birthday_gift' => 0, // User birthday gift - Dark Matter points |
@@ -111,7 +111,7 @@ |
||
111 | 111 | static public function defineTimeDiff() { |
112 | 112 | $user_time_diff = playerTimeDiff::user_time_diff_get(); |
113 | 113 | |
114 | - $time_diff = (float)$user_time_diff[self::TIME_DIFF] + $user_time_diff[self::TIME_DIFF_UTC_OFFSET]; |
|
114 | + $time_diff = (float) $user_time_diff[self::TIME_DIFF] + $user_time_diff[self::TIME_DIFF_UTC_OFFSET]; |
|
115 | 115 | |
116 | 116 | define('SN_CLIENT_TIME_DIFF', $time_diff); |
117 | 117 | define('SN_CLIENT_TIME_LOCAL', SN_TIME_NOW + SN_CLIENT_TIME_DIFF); |
@@ -692,7 +692,7 @@ |
||
692 | 692 | } |
693 | 693 | } |
694 | 694 | |
695 | - $updater->upd_log_message("Migrated {$patched}/{$total} festival configuration records"); |
|
695 | + $updater->upd_log_message("migrated {$patched}/{$total} festival configuration records"); |
|
696 | 696 | } |
697 | 697 | |
698 | 698 | $updater->upd_alter_table('que', ['DROP KEY `que_id`',], $updater->isIndexExists('que', 'que_id')); |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | } |
243 | 243 | |
244 | 244 | /** @noinspection SpellCheckingInspection */ |
245 | - $updater->upd_alter_table('users', ["DROP COLUMN `dpath`",], $updater->isFieldExists('users', 'dpath')); |
|
245 | + $updater->upd_alter_table('users', ["DROP COLUMN `dpath`", ], $updater->isFieldExists('users', 'dpath')); |
|
246 | 246 | |
247 | 247 | // 2017-06-12 13:47:36 42c1 |
248 | 248 | $updater->new_version = 42; |
@@ -255,14 +255,14 @@ discard block |
||
255 | 255 | |
256 | 256 | // 2017-10-11 09:51:49 43a4.3 |
257 | 257 | $updater->upd_alter_table('messages', |
258 | - ["ADD COLUMN `message_json` tinyint(1) unsigned NOT NULL DEFAULT 0 AFTER `message_text`",], |
|
258 | + ["ADD COLUMN `message_json` tinyint(1) unsigned NOT NULL DEFAULT 0 AFTER `message_text`", ], |
|
259 | 259 | !$updater->isFieldExists('messages', 'message_json') |
260 | 260 | ); |
261 | 261 | |
262 | 262 | |
263 | 263 | // 2017-10-17 09:49:24 43a6.0 |
264 | 264 | // Removing old index i_user_id |
265 | - $updater->upd_alter_table('counter', ['DROP KEY `i_user_id`',], $updater->isIndexExists('counter', 'i_user_id')); |
|
265 | + $updater->upd_alter_table('counter', ['DROP KEY `i_user_id`', ], $updater->isIndexExists('counter', 'i_user_id')); |
|
266 | 266 | // Adding new index I_counter_user_id |
267 | 267 | $updater->upd_alter_table('counter', |
268 | 268 | [ |
@@ -316,7 +316,7 @@ discard block |
||
316 | 316 | ); |
317 | 317 | } |
318 | 318 | |
319 | - $updater->updPatchApply(1, function () use ($updater) { |
|
319 | + $updater->updPatchApply(1, function() use ($updater) { |
|
320 | 320 | $q = $updater->upd_do_query("SELECT `messageid`, `user` FROM `{{chat}}`", true); |
321 | 321 | while ($row = db_fetch($q)) { |
322 | 322 | if (strpos($row['user'], 'a:') !== 0) { |
@@ -339,7 +339,7 @@ discard block |
||
339 | 339 | }); |
340 | 340 | |
341 | 341 | // 2018-03-07 09:23:41 43a13.23 + 2018-03-07 12:00:47 43a13.24 |
342 | - $updater->updPatchApply(2, function () use ($updater) { |
|
342 | + $updater->updPatchApply(2, function() use ($updater) { |
|
343 | 343 | $updater->upd_alter_table('festival_gifts', [ |
344 | 344 | "ADD COLUMN `disclosure` tinyint(1) unsigned NOT NULL DEFAULT 0 AFTER `amount`", |
345 | 345 | "ADD COLUMN `message` VARCHAR(4096) CHARSET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' AFTER `disclosure`", |
@@ -347,7 +347,7 @@ discard block |
||
347 | 347 | }); |
348 | 348 | |
349 | 349 | // 2018-03-12 13:23:10 43a13.33 |
350 | - $updater->updPatchApply(3, function () use ($updater) { |
|
350 | + $updater->updPatchApply(3, function() use ($updater) { |
|
351 | 351 | $updater->upd_alter_table('player_options', |
352 | 352 | [ |
353 | 353 | "MODIFY COLUMN `value` VARCHAR(16000) CHARSET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT ''", |
@@ -357,7 +357,7 @@ discard block |
||
357 | 357 | }); |
358 | 358 | |
359 | 359 | // 2018-03-24 21:31:51 43a16.16 - OiS |
360 | - $updater->updPatchApply(4, function () use ($updater) { |
|
360 | + $updater->updPatchApply(4, function() use ($updater) { |
|
361 | 361 | if (!$updater->isTableExists('festival_ois_player')) { |
362 | 362 | $updater->upd_create_table( |
363 | 363 | 'festival_ois_player', |
@@ -376,7 +376,7 @@ discard block |
||
376 | 376 | }); |
377 | 377 | |
378 | 378 | // 2018-03-25 08:11:39 43a16.21 |
379 | - $updater->updPatchApply(5, function () use ($updater) { |
|
379 | + $updater->updPatchApply(5, function() use ($updater) { |
|
380 | 380 | $updater->upd_alter_table( |
381 | 381 | 'que', |
382 | 382 | "ADD COLUMN `que_unit_one_time_raw` DECIMAL(20,5) NOT NULL DEFAULT 0", |
@@ -393,7 +393,7 @@ discard block |
||
393 | 393 | $updater->upd_log_version_update(); |
394 | 394 | |
395 | 395 | // 2018-12-21 14:00:41 44a5 Module "ad_promo_code" support |
396 | - $updater->updPatchApply(6, function () use ($updater) { |
|
396 | + $updater->updPatchApply(6, function() use ($updater) { |
|
397 | 397 | if (!$updater->isTableExists('ad_promo_codes')) { |
398 | 398 | $updater->upd_create_table( |
399 | 399 | 'ad_promo_codes', |
@@ -434,7 +434,7 @@ discard block |
||
434 | 434 | }); |
435 | 435 | |
436 | 436 | // 2018-12-22 11:42:20 44a12 |
437 | - $updater->updPatchApply(7, function () use ($updater) { |
|
437 | + $updater->updPatchApply(7, function() use ($updater) { |
|
438 | 438 | // Creating table for HTTP query strings |
439 | 439 | $updater->upd_create_table( |
440 | 440 | 'security_query_strings', |
@@ -576,7 +576,7 @@ discard block |
||
576 | 576 | $updater->upd_log_version_update(); |
577 | 577 | |
578 | 578 | // 2019-08-15 00:10:48 45a8 |
579 | - $updater->updPatchApply(8, function () use ($updater) { |
|
579 | + $updater->updPatchApply(8, function() use ($updater) { |
|
580 | 580 | if (!$updater->isTableExists('player_ignore')) { |
581 | 581 | $updater->upd_create_table( |
582 | 582 | 'player_ignore', |
@@ -597,7 +597,7 @@ discard block |
||
597 | 597 | }, PATCH_REGISTER); |
598 | 598 | |
599 | 599 | // 2019-08-21 20:14:18 45a19 |
600 | - $updater->updPatchApply(9, function () use ($updater) { |
|
600 | + $updater->updPatchApply(9, function() use ($updater) { |
|
601 | 601 | $updater->upd_alter_table('payment', [ |
602 | 602 | 'ADD COLUMN `payment_method_id` smallint DEFAULT NULL AFTER `payment_module_name`', |
603 | 603 | 'ADD KEY `I_payment_method_id` (`payment_method_id`)', |
@@ -605,7 +605,7 @@ discard block |
||
605 | 605 | }, PATCH_REGISTER); |
606 | 606 | |
607 | 607 | // 2020-02-18 21:00:19 45a71 |
608 | - $updater->updPatchApply(10, function () use ($updater) { |
|
608 | + $updater->updPatchApply(10, function() use ($updater) { |
|
609 | 609 | $name = classConfig::FLEET_UPDATE_MAX_RUN_TIME; |
610 | 610 | if (!SN::$gc->config->pass()->$name) { |
611 | 611 | SN::$gc->config->pass()->$name = 30; |
@@ -621,14 +621,14 @@ discard block |
||
621 | 621 | $updater->upd_log_version_update(); |
622 | 622 | |
623 | 623 | // 2021-03-03 13:41:05 46a13 |
624 | - $updater->updPatchApply(11, function () use ($updater) { |
|
624 | + $updater->updPatchApply(11, function() use ($updater) { |
|
625 | 625 | $updater->upd_alter_table('festival_gifts', [ |
626 | 626 | 'ADD COLUMN `gift_unit_id` bigint(20) NOT NULL DEFAULT 0 AFTER `amount`', |
627 | 627 | ], !$updater->isFieldExists('festival_gifts', 'gift_unit_id')); |
628 | 628 | }, PATCH_REGISTER); |
629 | 629 | |
630 | 630 | // 2024-04-13 13:04:16 46a127 |
631 | - $updater->updPatchApply(12, function () use ($updater) { |
|
631 | + $updater->updPatchApply(12, function() use ($updater) { |
|
632 | 632 | $updater->upd_alter_table('config', [ |
633 | 633 | "ADD COLUMN `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP", |
634 | 634 | "ADD COLUMN `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP", |
@@ -697,28 +697,28 @@ discard block |
||
697 | 697 | $updater->upd_log_message("Migrated {$patched}/{$total} festival configuration records"); |
698 | 698 | } |
699 | 699 | |
700 | - $updater->upd_alter_table('que', ['DROP KEY `que_id`',], $updater->isIndexExists('que', 'que_id')); |
|
701 | - $updater->upd_alter_table('counter', ['DROP KEY `counter_id`',], $updater->isIndexExists('counter', 'counter_id')); |
|
702 | - $updater->upd_alter_table('captain', ['DROP KEY `captain_id`',], $updater->isIndexExists('captain', 'captain_id')); |
|
700 | + $updater->upd_alter_table('que', ['DROP KEY `que_id`', ], $updater->isIndexExists('que', 'que_id')); |
|
701 | + $updater->upd_alter_table('counter', ['DROP KEY `counter_id`', ], $updater->isIndexExists('counter', 'counter_id')); |
|
702 | + $updater->upd_alter_table('captain', ['DROP KEY `captain_id`', ], $updater->isIndexExists('captain', 'captain_id')); |
|
703 | 703 | }, PATCH_REGISTER); |
704 | 704 | |
705 | 705 | // 2024-10-21 21:08:03 46a147 |
706 | - $updater->updPatchApply(13, function () use ($updater) { |
|
706 | + $updater->updPatchApply(13, function() use ($updater) { |
|
707 | 707 | $updater->indexDropIfExists('planets', 'id'); |
708 | 708 | $updater->indexDropIfExists('users', 'I_user_id_name'); |
709 | 709 | |
710 | 710 | $updater->indexReplace( |
711 | 711 | 'que', |
712 | 712 | 'I_que_planet_id', |
713 | - ['que_planet_id', 'que_player_id',], |
|
714 | - function () use ($updater) { |
|
713 | + ['que_planet_id', 'que_player_id', ], |
|
714 | + function() use ($updater) { |
|
715 | 715 | $updater->constraintDropIfExists('que', 'FK_que_planet_id'); |
716 | 716 | }, |
717 | - function () use ($updater) { |
|
717 | + function() use ($updater) { |
|
718 | 718 | // CONSTRAINT `FK_que_player_id` FOREIGN KEY (`que_player_id`) REFERENCES `sn_users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE |
719 | 719 | $updater->upd_alter_table( |
720 | 720 | 'que', |
721 | - ['ADD CONSTRAINT `FK_que_planet_id` FOREIGN KEY (`que_planet_id`) REFERENCES `{{planets}}` (`id`) ON DELETE CASCADE ON UPDATE CASCADE',], |
|
721 | + ['ADD CONSTRAINT `FK_que_planet_id` FOREIGN KEY (`que_planet_id`) REFERENCES `{{planets}}` (`id`) ON DELETE CASCADE ON UPDATE CASCADE', ], |
|
722 | 722 | true |
723 | 723 | ); |
724 | 724 | } |