Completed
Push — work-fleets ( ea0fb4...874fb8 )
by SuperNova.WS
06:59
created
includes/alliance/ali_external_search.inc 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,18 +1,18 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-if(!defined('SN_IN_ALLY') || SN_IN_ALLY !== true) {
3
+if (!defined('SN_IN_ALLY') || SN_IN_ALLY !== true) {
4 4
   classSupernova::$debug->error("Attempt to call ALLIANCE page mode {$mode} directly - not from alliance.php", 'Forbidden', 403);
5 5
 }
6 6
 
7 7
 $template = gettemplate('ali_search', true);
8 8
 
9 9
 $ali_search_text = sys_get_param_str('searchtext');
10
-if($ali_search_text) {
10
+if ($ali_search_text) {
11 11
   $template->assign_var('SEARCH_TEXT', $ali_search_text);
12 12
 
13 13
   $search = DBStaticAlly::db_ally_search_by_name_or_tag($ali_search_text);
14
-  if(classSupernova::$db->db_num_rows($search)) {
15
-    while($ally_row = db_fetch($search)) {
14
+  if (classSupernova::$db->db_num_rows($search)) {
15
+    while ($ally_row = db_fetch($search)) {
16 16
       $template->assign_block_vars('alliances', array(
17 17
         'ID'          => $ally_row['id'],
18 18
         'TAG'         => $ally_row['ally_tag'],
Please login to merge, or discard this patch.
includes/constants.php 1 patch
Spacing   +240 added lines, -240 removed lines patch added patch discarded remove patch
@@ -38,8 +38,8 @@  discard block
 block discarded – undo
38 38
 
39 39
 // Game type constants starts with GAME_
40 40
 define('GAME_SUPERNOVA', 0);
41
-define('GAME_OGAME'    , 1);
42
-define('GAME_BLITZ'    , 2);
41
+define('GAME_OGAME', 1);
42
+define('GAME_BLITZ', 2);
43 43
 
44 44
 // Date & time range constants
45 45
 define('DATE_FOREVER', 2000000000);
@@ -52,27 +52,27 @@  discard block
 block discarded – undo
52 52
 define('PERIOD_YEAR', PERIOD_DAY * 365);
53 53
 define('PERIOD_FOREVER', PERIOD_YEAR * 100);
54 54
 
55
-define('PERIOD_MINUTE_2' , PERIOD_MINUTE * 2);
56
-define('PERIOD_MINUTE_3' , PERIOD_MINUTE * 3);
57
-define('PERIOD_MINUTE_5' , PERIOD_MINUTE * 5);
55
+define('PERIOD_MINUTE_2', PERIOD_MINUTE * 2);
56
+define('PERIOD_MINUTE_3', PERIOD_MINUTE * 3);
57
+define('PERIOD_MINUTE_5', PERIOD_MINUTE * 5);
58 58
 define('PERIOD_MINUTE_10', PERIOD_MINUTE * 10);
59
-define('PERIOD_DAY_3'    , PERIOD_DAY * 3);
60
-define('PERIOD_WEEK_2'   , PERIOD_WEEK * 2);
61
-define('PERIOD_MONTH_2'  , PERIOD_MONTH * 2);
62
-define('PERIOD_MONTH_3'  , PERIOD_MONTH * 3);
59
+define('PERIOD_DAY_3', PERIOD_DAY * 3);
60
+define('PERIOD_WEEK_2', PERIOD_WEEK * 2);
61
+define('PERIOD_MONTH_2', PERIOD_MONTH * 2);
62
+define('PERIOD_MONTH_3', PERIOD_MONTH * 3);
63 63
 
64 64
 define('FONT_SIZE_PERCENT_MIN', 56.25);
65 65
 define('FONT_SIZE_PERCENT_DEFAULT', 68.75);
66 66
 define('FONT_SIZE_PERCENT_MAX', 131.25);
67 67
 define('FONT_SIZE_PERCENT_STEP', 12.5);
68
-define('FONT_SIZE_PERCENT_DEFAULT_STRING', FONT_SIZE_PERCENT_DEFAULT . '%');
68
+define('FONT_SIZE_PERCENT_DEFAULT_STRING', FONT_SIZE_PERCENT_DEFAULT.'%');
69 69
 
70 70
 define('FONT_SIZE_PIXELS_BROWSER_BASE', 16);
71 71
 define('FONT_SIZE_PIXELS_MIN', 9);
72 72
 define('FONT_SIZE_PIXELS_DEFAULT', 11);
73 73
 define('FONT_SIZE_PIXELS_MAX', 21);
74 74
 define('FONT_SIZE_PIXELS_STEP', 1);
75
-define('FONT_SIZE_PIXELS_DEFAULT_STRING', FONT_SIZE_PIXELS_DEFAULT . 'px');
75
+define('FONT_SIZE_PIXELS_DEFAULT_STRING', FONT_SIZE_PIXELS_DEFAULT.'px');
76 76
 
77 77
 define('DEFAULT_PICTURE_EXTENSION_DOTTED', '.jpg');
78 78
 
@@ -115,54 +115,54 @@  discard block
 block discarded – undo
115 115
 define('SN_SYS_SEC_CHARS_ALLOWED', 'ABCDEFGHJKLMNPQRSTUVWXYZabcdefghkmnpqrstuvwxyz0123456789');
116 116
 
117 117
 // Mot qui sont interdit a la saisie !
118
-$ListCensure = array ( '/</', '/>/', '/script/i', '/doquery/i', '/http/i', '/javascript/i');
118
+$ListCensure = array('/</', '/>/', '/script/i', '/doquery/i', '/http/i', '/javascript/i');
119 119
 
120 120
 // Confirmation record types
121
-define('CONFIRM_REGISTRATION'  , 1);
121
+define('CONFIRM_REGISTRATION', 1);
122 122
 define('CONFIRM_PASSWORD_RESET', 2);
123
-define('CONFIRM_DELETE'        , 3);
123
+define('CONFIRM_DELETE', 3);
124 124
 
125 125
 define('AFFILIATE_MM_TO_REFERRAL_DM', 2);
126 126
 
127 127
 // Ally diplomacy statuses
128
-define('ALLY_DIPLOMACY_SELF'         , 'self');
129
-define('ALLY_DIPLOMACY_NEUTRAL'      , 'neutral');
130
-define('ALLY_DIPLOMACY_WAR'          , 'war');
131
-define('ALLY_DIPLOMACY_PEACE'        , 'peace');
128
+define('ALLY_DIPLOMACY_SELF', 'self');
129
+define('ALLY_DIPLOMACY_NEUTRAL', 'neutral');
130
+define('ALLY_DIPLOMACY_WAR', 'war');
131
+define('ALLY_DIPLOMACY_PEACE', 'peace');
132 132
 define('ALLY_DIPLOMACY_CONFEDERATION', 'confederation');
133
-define('ALLY_DIPLOMACY_FEDERATION'   , 'federation');
134
-define('ALLY_DIPLOMACY_UNION'        , 'union');
135
-define('ALLY_DIPLOMACY_MASTER'       , 'master');
136
-define('ALLY_DIPLOMACY_SLAVE'        , 'slave');
133
+define('ALLY_DIPLOMACY_FEDERATION', 'federation');
134
+define('ALLY_DIPLOMACY_UNION', 'union');
135
+define('ALLY_DIPLOMACY_MASTER', 'master');
136
+define('ALLY_DIPLOMACY_SLAVE', 'slave');
137 137
 
138 138
 define('ALLY_PROPOSE_SEND', 0);
139 139
 
140 140
 // Quest types
141
-define('QUEST_TYPE_BUILD'   , 1);
141
+define('QUEST_TYPE_BUILD', 1);
142 142
 define('QUEST_TYPE_RESEARCH', 2);
143
-define('QUEST_TYPE_COMBAT'  , 3);
143
+define('QUEST_TYPE_COMBAT', 3);
144 144
 
145
-define('QUEST_STATUS_NOT_STARTED' , 0);
146
-define('QUEST_STATUS_STARTED'     , 1);
147
-define('QUEST_STATUS_COMPLETE'    , 2);
145
+define('QUEST_STATUS_NOT_STARTED', 0);
146
+define('QUEST_STATUS_STARTED', 1);
147
+define('QUEST_STATUS_COMPLETE', 2);
148 148
 
149 149
 // *** Combat-related constants
150 150
 // *** Mission Type constants starts with MT_
151
-define('MT_NONE'     ,  0);
152
-define('MT_EXPLORE'  , 15);
153
-define('MT_COLONIZE' ,  7);
154
-define('MT_RECYCLE'  ,  8);
151
+define('MT_NONE', 0);
152
+define('MT_EXPLORE', 15);
153
+define('MT_COLONIZE', 7);
154
+define('MT_RECYCLE', 8);
155 155
 
156
-define('MT_RELOCATE' ,  4);
156
+define('MT_RELOCATE', 4);
157 157
 
158
-define('MT_TRANSPORT',  3);
159
-define('MT_HOLD'     ,  5);
158
+define('MT_TRANSPORT', 3);
159
+define('MT_HOLD', 5);
160 160
 
161
-define('MT_MISSILE'  , 10);
162
-define('MT_SPY'      ,  6);
163
-define('MT_ATTACK'   ,  1);
164
-define('MT_ACS'      ,  2);
165
-define('MT_DESTROY'  ,  9);
161
+define('MT_MISSILE', 10);
162
+define('MT_SPY', 6);
163
+define('MT_ATTACK', 1);
164
+define('MT_ACS', 2);
165
+define('MT_DESTROY', 9);
166 166
 // 11, 12, 13, 14, 16...
167 167
 
168 168
 // *** Planet Target constants starts with PT_
@@ -170,49 +170,49 @@  discard block
 block discarded – undo
170 170
 define('PT_ALL', 0);
171 171
 define('PT_PLANET', 1);
172 172
 define('PT_DEBRIS', 2);
173
-define('PT_MOON'  , 3);
173
+define('PT_MOON', 3);
174 174
 
175 175
 // *** Unit locations - shows db table where unit belong
176 176
 // Also cache indexes
177
-define('LOC_NONE',    -1);
177
+define('LOC_NONE', -1);
178 178
 define('LOC_UNIVERSE', 0);
179
-define('LOC_PLANET',   1);
180
-define('LOC_DEBRIS',   2); // Translates to `planets` table planet_type = 1, `debris_*` fields
181
-define('LOC_MOON',     3); // Translates to `planets` table planet_type = 3
182
-define('LOC_USER',     4);
183
-define('LOC_FLEET',    5);
184
-define('LOC_ALLY',     6);
185
-define('LOC_UNIT_NUMERIC',     7);
186
-define('LOC_UNIT_LIST',     8);
179
+define('LOC_PLANET', 1);
180
+define('LOC_DEBRIS', 2); // Translates to `planets` table planet_type = 1, `debris_*` fields
181
+define('LOC_MOON', 3); // Translates to `planets` table planet_type = 3
182
+define('LOC_USER', 4);
183
+define('LOC_FLEET', 5);
184
+define('LOC_ALLY', 6);
185
+define('LOC_UNIT_NUMERIC', 7);
186
+define('LOC_UNIT_LIST', 8);
187 187
 
188 188
 // ТОЛЬКО ВНУТРЕНЕЕ!!!
189
-define('LOC_UNIT',    'LOC_UNIT');
190
-define('LOC_QUE',     'LOC_QUE');
191
-define('LOC_LOCATION','LOC_LOCATION');
192
-define('LOC_LOCKS','LOC_LOCKS');
189
+define('LOC_UNIT', 'LOC_UNIT');
190
+define('LOC_QUE', 'LOC_QUE');
191
+define('LOC_LOCATION', 'LOC_LOCATION');
192
+define('LOC_LOCKS', 'LOC_LOCKS');
193 193
 
194 194
 // *** Caching masks
195
-define('CACHE_NOTHING'    ,  0);
196
-define('CACHE_FLEET'      ,  1);
197
-define('CACHE_PLANET'     ,  2);
198
-define('CACHE_USER'       ,  4);
199
-define('CACHE_SOURCE'     ,  8);
195
+define('CACHE_NOTHING', 0);
196
+define('CACHE_FLEET', 1);
197
+define('CACHE_PLANET', 2);
198
+define('CACHE_USER', 4);
199
+define('CACHE_SOURCE', 8);
200 200
 define('CACHE_DESTINATION', 16);
201
-define('CACHE_EVENT'      , 32);
201
+define('CACHE_EVENT', 32);
202 202
 
203
-define('CACHE_USER_SRC'  , CACHE_USER | CACHE_SOURCE);
204
-define('CACHE_USER_DST'  , CACHE_USER | CACHE_DESTINATION);
203
+define('CACHE_USER_SRC', CACHE_USER | CACHE_SOURCE);
204
+define('CACHE_USER_DST', CACHE_USER | CACHE_DESTINATION);
205 205
 define('CACHE_PLANET_SRC', CACHE_PLANET | CACHE_SOURCE);
206 206
 define('CACHE_PLANET_DST', CACHE_PLANET | CACHE_DESTINATION);
207
-define('CACHE_COMBAT'    , CACHE_FLEET | CACHE_PLANET | CACHE_USER | CACHE_SOURCE | CACHE_DESTINATION);
207
+define('CACHE_COMBAT', CACHE_FLEET | CACHE_PLANET | CACHE_USER | CACHE_SOURCE | CACHE_DESTINATION);
208 208
 
209
-define('CACHE_ALL'       , CACHE_FLEET | CACHE_PLANET | CACHE_USER | CACHE_SOURCE | CACHE_DESTINATION | CACHE_EVENT);
209
+define('CACHE_ALL', CACHE_FLEET | CACHE_PLANET | CACHE_USER | CACHE_SOURCE | CACHE_DESTINATION | CACHE_EVENT);
210 210
 
211
-define('CACHE_NONE'      , CACHE_NOTHING); // Alias for me
211
+define('CACHE_NONE', CACHE_NOTHING); // Alias for me
212 212
 
213 213
 // *** Event types
214 214
 define('EVENT_FLEET_ARRIVE', 1);
215
-define('EVENT_FLEET_STAY'  , 2);
215
+define('EVENT_FLEET_STAY', 2);
216 216
 define('EVENT_FLEET_RETURN', 3);
217 217
 
218 218
 // *** Constants for changing DM
@@ -267,10 +267,10 @@  discard block
 block discarded – undo
267 267
 
268 268
 
269 269
 // Operation error status HARDCODE!
270
-define('ERR_NONE'               , 0); // No error
271
-define('ERR_WARNING'            , 1); // There is warning - something altering normal operation process
272
-define('ERR_ERROR'              , 2); // There is error - something permits operation from process
273
-define('ERR_HACK'               , 4); // Operation is qualified as hack attempt
270
+define('ERR_NONE', 0); // No error
271
+define('ERR_WARNING', 1); // There is warning - something altering normal operation process
272
+define('ERR_ERROR', 2); // There is error - something permits operation from process
273
+define('ERR_HACK', 4); // Operation is qualified as hack attempt
274 274
 // New GLOBAL operation results
275 275
 //define('RESULT_DEFAULT' , 0); // Default result - all went OK or result really doesn't matter
276 276
 //define('RESULT_WARNING' , 1);
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
 define('SN_PAYMENT_REQUEST_OK', 0);
291 291
 define('SN_PAYMENT_REQUEST_ERROR_UNIT_AMOUNT', 1);
292 292
 define('SN_PAYMENT_REQUEST_ERROR_PAYLINK_UNSUPPORTED', 2);
293
-define('SN_PAYMENT_REQUEST_IP_WRONG', 3);  // Неправильный IP входящей системы - обычно хак
293
+define('SN_PAYMENT_REQUEST_IP_WRONG', 3); // Неправильный IP входящей системы - обычно хак
294 294
 define('SN_PAYMENT_REQUEST_COMMAND_UNSUPPORTED', 4); // Неподдерживаемая команда - обычно хак
295 295
 define('SN_PAYMENT_REQUEST_SIGNATURE_INVALID', 5); // Неправильная подпись или не сошлась контрольная сумма - обычно хак
296 296
 define('SN_MODULE_DISABLED', 6); // Модуль отключен // УНИВЕРСАЛЬНЫЙ ОТВЕТ!
@@ -563,16 +563,16 @@  discard block
 block discarded – undo
563 563
 //define('F_DEVICE_ID',     'F_DEVICE_ID');
564 564
 //define('F_DEVICE_CYPHER', 'F_DEVICE_CYPHER');
565 565
 
566
-define('F_PROVIDER_ID',   'F_PROVIDER_ID');
566
+define('F_PROVIDER_ID', 'F_PROVIDER_ID');
567 567
 // define('F_PROVIDER_LIST', 'F_PROVIDER_LIST');
568 568
 
569 569
 define('F_IMPERSONATE_STATUS', 'F_IMPERSONATE_STATUS');
570 570
 define('F_IMPERSONATE_OPERATOR', 'F_IMPERSONATE_OPERATOR');
571 571
 
572
-define('F_LOGIN_STATUS',  'F_LOGIN_STATUS');
572
+define('F_LOGIN_STATUS', 'F_LOGIN_STATUS');
573 573
 define('F_LOGIN_MESSAGE', 'F_LOGIN_MESSAGE');
574 574
 
575
-define('F_PLAYER_REGISTER_STATUS',  'F_PLAYER_REGISTER_STATUS');
575
+define('F_PLAYER_REGISTER_STATUS', 'F_PLAYER_REGISTER_STATUS');
576 576
 define('F_PLAYER_REGISTER_MESSAGE', 'F_PLAYER_REGISTER_MESSAGE');
577 577
 
578 578
 define('F_USER_ID', 'F_USER_ID');
@@ -616,69 +616,69 @@  discard block
 block discarded – undo
616 616
 
617 617
 
618 618
 // Option groups
619
-define('OPT_ALL',      0);
620
-define('OPT_MESSAGE',  1);
619
+define('OPT_ALL', 0);
620
+define('OPT_MESSAGE', 1);
621 621
 define('OPT_UNIVERSE', 2);
622 622
 define('OPT_INTERFACE', 3);
623 623
 
624 624
 // Message classes
625
-define('MSG_TYPE_OUTBOX'   ,  -1);
626
-define('MSG_TYPE_SPY'      ,   0);
627
-define('MSG_TYPE_PLAYER'   ,   1);
628
-define('MSG_TYPE_ALLIANCE' ,   2);
629
-define('MSG_TYPE_COMBAT'   ,   3);
630
-define('MSG_TYPE_RECYCLE'  ,   4);
631
-define('MSG_TYPE_TRANSPORT',   5);
632
-define('MSG_TYPE_ADMIN'    ,   6);
633
-define('MSG_TYPE_EXPLORE'  ,  15);
634
-define('MSG_TYPE_QUE'      ,  99);
635
-define('MSG_TYPE_NEW'      , 100);
625
+define('MSG_TYPE_OUTBOX', -1);
626
+define('MSG_TYPE_SPY', 0);
627
+define('MSG_TYPE_PLAYER', 1);
628
+define('MSG_TYPE_ALLIANCE', 2);
629
+define('MSG_TYPE_COMBAT', 3);
630
+define('MSG_TYPE_RECYCLE', 4);
631
+define('MSG_TYPE_TRANSPORT', 5);
632
+define('MSG_TYPE_ADMIN', 6);
633
+define('MSG_TYPE_EXPLORE', 15);
634
+define('MSG_TYPE_QUE', 99);
635
+define('MSG_TYPE_NEW', 100);
636 636
 
637 637
 // Attack verification statuses
638
-define('FLIGHT_NO_RESULT'           ,  -2);
639
-define('FLIGHT_ALLOWED_NEW'           ,  -1);
638
+define('FLIGHT_NO_RESULT', -2);
639
+define('FLIGHT_ALLOWED_NEW', -1);
640 640
 //define('FLIGHT_DO_NOTHING'           ,  0);
641
-define('FLIGHT_ALLOWED'           ,  0);
642
-define('FLIGHT_VECTOR_NO_TARGET'         ,  1);
643
-define('FLIGHT_PLAYER_OWN'               ,  2);
644
-define('FLIGHT_MISSION_IMPOSSIBLE'     ,  3);
645
-define('FLIGHT_MISSION_HOLD_NO_ALLY_DEPOSIT'   ,  4);
646
-define('FLIGHT_MISSION_RECYCLE_NO_DEBRIS'         ,  5);
647
-define('FLIGHT_PLAYER_VACATION'          ,  6);
648
-define('FLIGHT_PLAYER_SAME_IP'           ,  7);
649
-define('FLIGHT_PLAYER_BUFFING'           ,  8);
650
-define('FLIGHT_PLAYER_ADMIN'             ,  9);
651
-define('FLIGHT_PLAYER_NOOB'              , 10);
652
-define('FLIGHT_PLAYER_VACATION_OWN'      , 11);
653
-define('FLIGHT_MISSION_MISSILE_NO_SILO'           , 12);
654
-define('FLIGHT_MISSION_MISSILE_NO_MISSILES'        , 13);
655
-define('FLIGHT_SHIPS_NO_SHIPS'          , 14);
656
-define('FLIGHT_FLEET_NO_SLOTS'          , 15);
657
-define('FLIGHT_SHIPS_NOT_ENOUGH_OR_RESOURCES'          , 16);
658
-define('FLIGHT_SHIPS_NO_RECYCLERS'      , 17);
659
-define('FLIGHT_MISSION_SPY_NO_SPIES'          , 18);
660
-define('FLIGHT_SHIPS_NO_COLONIZER'      , 19);
661
-define('FLIGHT_MISSION_MISSILE_TOO_FAR'   , 20);
662
-define('FLIGHT_MISSION_MISSILE_WRONG_STRUCTURE'   , 21);
663
-define('FLIGHT_RESOURCES_FUEL_NOT_ENOUGH'           , 22);
664
-define('FLIGHT_RESOURCES_NOT_ENOUGH'      , 23);
665
-define('FLIGHT_MISSION_ACS_NOT_EXISTS'            , 24);
666
-define('FLIGHT_MISSION_ACS_MISSTARGET'    , 25);
667
-define('FLIGHT_FLEET_SPEED_WRONG'       , 26);
668
-define('FLIGHT_MISSION_ACS_TOO_LATE'      , 27);
669
-define('FLIGHT_MISSION_ATTACK_BASHING'           , 28);
670
-define('FLIGHT_MISSION_ATTACK_BASHING_WAR_DELAY' , 29);
671
-define('FLIGHT_MISSION_ACS_WRONG_TARGET'  , 30);
672
-define('FLIGHT_VECTOR_SAME_SOURCE'              , 31);
641
+define('FLIGHT_ALLOWED', 0);
642
+define('FLIGHT_VECTOR_NO_TARGET', 1);
643
+define('FLIGHT_PLAYER_OWN', 2);
644
+define('FLIGHT_MISSION_IMPOSSIBLE', 3);
645
+define('FLIGHT_MISSION_HOLD_NO_ALLY_DEPOSIT', 4);
646
+define('FLIGHT_MISSION_RECYCLE_NO_DEBRIS', 5);
647
+define('FLIGHT_PLAYER_VACATION', 6);
648
+define('FLIGHT_PLAYER_SAME_IP', 7);
649
+define('FLIGHT_PLAYER_BUFFING', 8);
650
+define('FLIGHT_PLAYER_ADMIN', 9);
651
+define('FLIGHT_PLAYER_NOOB', 10);
652
+define('FLIGHT_PLAYER_VACATION_OWN', 11);
653
+define('FLIGHT_MISSION_MISSILE_NO_SILO', 12);
654
+define('FLIGHT_MISSION_MISSILE_NO_MISSILES', 13);
655
+define('FLIGHT_SHIPS_NO_SHIPS', 14);
656
+define('FLIGHT_FLEET_NO_SLOTS', 15);
657
+define('FLIGHT_SHIPS_NOT_ENOUGH_OR_RESOURCES', 16);
658
+define('FLIGHT_SHIPS_NO_RECYCLERS', 17);
659
+define('FLIGHT_MISSION_SPY_NO_SPIES', 18);
660
+define('FLIGHT_SHIPS_NO_COLONIZER', 19);
661
+define('FLIGHT_MISSION_MISSILE_TOO_FAR', 20);
662
+define('FLIGHT_MISSION_MISSILE_WRONG_STRUCTURE', 21);
663
+define('FLIGHT_RESOURCES_FUEL_NOT_ENOUGH', 22);
664
+define('FLIGHT_RESOURCES_NOT_ENOUGH', 23);
665
+define('FLIGHT_MISSION_ACS_NOT_EXISTS', 24);
666
+define('FLIGHT_MISSION_ACS_MISSTARGET', 25);
667
+define('FLIGHT_FLEET_SPEED_WRONG', 26);
668
+define('FLIGHT_MISSION_ACS_TOO_LATE', 27);
669
+define('FLIGHT_MISSION_ATTACK_BASHING', 28);
670
+define('FLIGHT_MISSION_ATTACK_BASHING_WAR_DELAY', 29);
671
+define('FLIGHT_MISSION_ACS_WRONG_TARGET', 30);
672
+define('FLIGHT_VECTOR_SAME_SOURCE', 31);
673 673
 define('FLIGHT_RESOURCES_FORBIDDEN', 32);
674
-define('FLIGHT_MISSION_TRANSPORT_EMPTY_CARGO'   , 33);
675
-define('FLIGHT_SHIPS_NOT_ONLY_SPIES'       , 34);
676
-define('FLIGHT_FLEET_TOO_FAR'           , 35);
677
-define('FLIGHT_FLEET_OVERLOAD'        , 36);
678
-define('FLIGHT_MISSION_UNKNOWN'    , 37);
679
-define('FLIGHT_SHIPS_UNIT_WRONG'        , 38);
680
-define('FLIGHT_SHIPS_UNMOVABLE'        , 39);
681
-define('FLIGHT_SHIPS_NEGATIVE'  , 40);
674
+define('FLIGHT_MISSION_TRANSPORT_EMPTY_CARGO', 33);
675
+define('FLIGHT_SHIPS_NOT_ONLY_SPIES', 34);
676
+define('FLIGHT_FLEET_TOO_FAR', 35);
677
+define('FLIGHT_FLEET_OVERLOAD', 36);
678
+define('FLIGHT_MISSION_UNKNOWN', 37);
679
+define('FLIGHT_SHIPS_UNIT_WRONG', 38);
680
+define('FLIGHT_SHIPS_UNMOVABLE', 39);
681
+define('FLIGHT_SHIPS_NEGATIVE', 40);
682 682
 define('FLIGHT_RESOURCES_NEGATIVE', 41);
683 683
 define('FLIGHT_MISSION_MORATORIUM', 42);
684 684
 define('FLIGHT_PLAYER_CHILD_PROTECTION', 43);
@@ -723,12 +723,12 @@  discard block
 block discarded – undo
723 723
 
724 724
 
725 725
 // *** Races - Homeworlds
726
-define('RACE_NONE'    , 0);
727
-define('RACE_EARTH'   , 1);
728
-define('RACE_MOON'    , 2);
729
-define('RACE_MERCURY' , 3);
730
-define('RACE_VENUS'   , 4);
731
-define('RACE_MARS'    , 5);
726
+define('RACE_NONE', 0);
727
+define('RACE_EARTH', 1);
728
+define('RACE_MOON', 2);
729
+define('RACE_MERCURY', 3);
730
+define('RACE_VENUS', 4);
731
+define('RACE_MARS', 5);
732 732
 define('RACE_ASTEROID', 6);
733 733
 // define('MARKET_INFO'         , 7);
734 734
 
@@ -736,114 +736,114 @@  discard block
 block discarded – undo
736 736
 
737 737
 // *** Market variables
738 738
 // === Market blocks
739
-define('MARKET_ENTRY'        , 0);
740
-define('MARKET_RESOURCES'    , 1);
741
-define('MARKET_SCRAPPER'     , 2);
742
-define('MARKET_STOCKMAN'     , 3);
743
-define('MARKET_EXCHANGE'     , 4);
744
-define('MARKET_BANKER'       , 5);
745
-define('MARKET_PAWNSHOP'     , 6);
746
-define('MARKET_INFO'         , 7);
739
+define('MARKET_ENTRY', 0);
740
+define('MARKET_RESOURCES', 1);
741
+define('MARKET_SCRAPPER', 2);
742
+define('MARKET_STOCKMAN', 3);
743
+define('MARKET_EXCHANGE', 4);
744
+define('MARKET_BANKER', 5);
745
+define('MARKET_PAWNSHOP', 6);
746
+define('MARKET_INFO', 7);
747 747
 
748 748
 // === Market error statuses
749
-define('MARKET_NOTHING'              ,  0);
750
-define('MARKET_DEAL'                 ,  1);
751
-define('MARKET_DEAL_TRADE'           ,  2);
752
-define('MARKET_NO_DM'                ,  3);
753
-define('MARKET_NO_RESOURCES'         ,  4);
754
-define('MARKET_ZERO_DEAL'            ,  5);
755
-define('MARKET_NO_SHIPS'             ,  6);
756
-define('MARKET_NOT_A_SHIP'           ,  7);
757
-define('MARKET_NO_STOCK'             ,  8);
758
-define('MARKET_ZERO_RES_STOCK'       ,  9);
759
-define('MARKET_NEGATIVE_SHIPS'       , 10);
760
-
761
-define('MARKET_INFO_PLAYER'          , 12);
762
-define('MARKET_INFO_WRONG'           , 11);
749
+define('MARKET_NOTHING', 0);
750
+define('MARKET_DEAL', 1);
751
+define('MARKET_DEAL_TRADE', 2);
752
+define('MARKET_NO_DM', 3);
753
+define('MARKET_NO_RESOURCES', 4);
754
+define('MARKET_ZERO_DEAL', 5);
755
+define('MARKET_NO_SHIPS', 6);
756
+define('MARKET_NOT_A_SHIP', 7);
757
+define('MARKET_NO_STOCK', 8);
758
+define('MARKET_ZERO_RES_STOCK', 9);
759
+define('MARKET_NEGATIVE_SHIPS', 10);
760
+
761
+define('MARKET_INFO_PLAYER', 12);
762
+define('MARKET_INFO_WRONG', 11);
763 763
 define('MARKET_INFO_PLAYER_NOT_FOUND', 13);
764
-define('MARKET_INFO_PLAYER_WRONG'    , 14);
765
-define('MARKET_INFO_PLAYER_SAME'     , 15);
764
+define('MARKET_INFO_PLAYER_WRONG', 14);
765
+define('MARKET_INFO_PLAYER_SAME', 15);
766 766
 
767 767
 
768 768
 
769 769
 
770 770
 // *** Mercenary/talent bonus types
771
-define('BONUS_NONE'    ,            0);  // No bonus
772
-define('BONUS_PERCENT' ,            1);  // Percent on base value
773
-define('BONUS_ADD'     ,            2);  // Add
774
-define('BONUS_ABILITY' ,            3);  // Some ability
775
-define('BONUS_MULTIPLY',            4);  // Multiply by value
776
-define('BONUS_PERCENT_CUMULATIVE' , 5);  // Cumulative percent on base value
777
-define('BONUS_PERCENT_DEGRADED' ,   6);  // Bonus amount degraded with increase as pow(bonus, level) (?)
778
-define('BONUS_SPEED',               7);  // Speed bonus
771
+define('BONUS_NONE', 0); // No bonus
772
+define('BONUS_PERCENT', 1); // Percent on base value
773
+define('BONUS_ADD', 2); // Add
774
+define('BONUS_ABILITY', 3); // Some ability
775
+define('BONUS_MULTIPLY', 4); // Multiply by value
776
+define('BONUS_PERCENT_CUMULATIVE', 5); // Cumulative percent on base value
777
+define('BONUS_PERCENT_DEGRADED', 6); // Bonus amount degraded with increase as pow(bonus, level) (?)
778
+define('BONUS_SPEED', 7); // Speed bonus
779 779
 
780 780
 // *** Action constant (build should be replaced with ACTION)
781
-define('BUILD_CREATE' ,  1);
781
+define('BUILD_CREATE', 1);
782 782
 define('BUILD_DESTROY', -1);
783 783
 define('BUILD_AUTOCONVERT', 2);
784 784
 
785
-define('ACTION_SELL'       , -1);
786
-define('ACTION_NOTHING'    ,  0);
787
-define('ACTION_BUY'        ,  1);
788
-define('ACTION_USE'        ,  2);
789
-define('ACTION_DELETE'     ,  3);
785
+define('ACTION_SELL', -1);
786
+define('ACTION_NOTHING', 0);
787
+define('ACTION_BUY', 1);
788
+define('ACTION_USE', 2);
789
+define('ACTION_DELETE', 3);
790 790
 
791 791
 // *** Check unit availability codes
792
-define('BUILD_ALLOWED'         , 0); // HARDCODED! DO NOT CHANGE!
792
+define('BUILD_ALLOWED', 0); // HARDCODED! DO NOT CHANGE!
793 793
 define('BUILD_REQUIRE_NOT_MEET', 1);
794
-define('BUILD_AMOUNT_WRONG'    , 2);
795
-define('BUILD_QUE_WRONG'       , 3);
796
-define('BUILD_QUE_UNIT_WRONG'  , 4);
797
-define('BUILD_INDESTRUCTABLE'  , 5);
798
-define('BUILD_NO_RESOURCES'    , 6);
799
-define('BUILD_NO_UNITS'        , 7);
800
-define('BUILD_UNIT_BUSY'       , 8);
801
-define('BUILD_QUE_FULL'        , 9);
802
-define('BUILD_SILO_FULL'       ,10);
803
-define('BUILD_MAX_REACHED'     ,11);
804
-define('BUILD_SECTORS_NONE'    ,12);
794
+define('BUILD_AMOUNT_WRONG', 2);
795
+define('BUILD_QUE_WRONG', 3);
796
+define('BUILD_QUE_UNIT_WRONG', 4);
797
+define('BUILD_INDESTRUCTABLE', 5);
798
+define('BUILD_NO_RESOURCES', 6);
799
+define('BUILD_NO_UNITS', 7);
800
+define('BUILD_UNIT_BUSY', 8);
801
+define('BUILD_QUE_FULL', 9);
802
+define('BUILD_SILO_FULL', 10);
803
+define('BUILD_MAX_REACHED', 11);
804
+define('BUILD_SECTORS_NONE', 12);
805 805
 define('BUILD_AUTOCONVERT_AVAILABLE', 13);
806 806
 
807 807
 
808 808
 // *** Que types
809 809
 define('QUE_STRUCTURES', 1);
810
-define('QUE_HANGAR'    , 4);
811
-define('QUE_RESEARCH'  , 7);
812
-define('QUE_MERCENARY' , 600); // UNIT_MERCENARIES
810
+define('QUE_HANGAR', 4);
811
+define('QUE_RESEARCH', 7);
812
+define('QUE_MERCENARY', 600); // UNIT_MERCENARIES
813 813
 // *** Subque types
814
-define('SUBQUE_PLANET'  , 1);
815
-define('SUBQUE_MOON'    , 3);
816
-define('SUBQUE_FLEET'   , 4);
817
-define('SUBQUE_DEFENSE' , 6);
814
+define('SUBQUE_PLANET', 1);
815
+define('SUBQUE_MOON', 3);
816
+define('SUBQUE_FLEET', 4);
817
+define('SUBQUE_DEFENSE', 6);
818 818
 define('SUBQUE_RESEARCH', 7);
819 819
 
820 820
 // *** Que items
821
-define('QI_UNIT_ID'   , 0);
822
-define('QI_AMOUNT'    , 1);
823
-define('QI_TIME'      , 2);
824
-define('QI_MODE'      , 3);
825
-define('QI_QUE_ID'    , 4);
826
-define('QI_QUE_TYPE'  , 4);
827
-define('QI_PLANET_ID' , 5);
821
+define('QI_UNIT_ID', 0);
822
+define('QI_AMOUNT', 1);
823
+define('QI_TIME', 2);
824
+define('QI_MODE', 3);
825
+define('QI_QUE_ID', 4);
826
+define('QI_QUE_TYPE', 4);
827
+define('QI_PLANET_ID', 5);
828 828
 
829 829
 
830 830
 // *** Units
831 831
 
832 832
 // *** Sort options
833
-define('SORT_ASCENDING' , 0);
833
+define('SORT_ASCENDING', 0);
834 834
 define('SORT_DESCENDING', 1);
835 835
 
836
-define('SORT_ID'             , 0);
837
-define('SORT_LOCATION'       , 1);
838
-define('SORT_NAME'           , 2);
839
-define('SORT_SIZE'           , 3);
840
-define('SORT_EMAIL'          , 4);
841
-define('SORT_IP'             , 5);
836
+define('SORT_ID', 0);
837
+define('SORT_LOCATION', 1);
838
+define('SORT_NAME', 2);
839
+define('SORT_SIZE', 3);
840
+define('SORT_EMAIL', 4);
841
+define('SORT_IP', 5);
842 842
 define('SORT_TIME_REGISTERED', 6);
843 843
 define('SORT_TIME_LAST_VISIT', 7);
844
-define('SORT_TIME_BAN_UNTIL' , 8);
845
-define('SORT_REFERRAL_COUNT' , 9);
846
-define('SORT_REFERRAL_DM'    , 10);
844
+define('SORT_TIME_BAN_UNTIL', 8);
845
+define('SORT_REFERRAL_COUNT', 9);
846
+define('SORT_REFERRAL_DM', 10);
847 847
 
848 848
 
849 849
 define('HULL_SIZE_TINY', 1);
@@ -987,10 +987,10 @@  discard block
 block discarded – undo
987 987
 
988 988
 // === Artifacts
989 989
 define('UNIT_ARTIFACTS', 1000);
990
-define('ART_LHC', 1001);      // Additional moon chance
991
-define('ART_RCD_SMALL', 1002);   // Rapid Colony Deployment - Set of buildings up to 10th level - 10/14/ 3/0 -   405 DM
992
-define('ART_RCD_MEDIUM', 1003);  // Rapid Colony Deployment - Set of buildings up to 15th level - 15/20/ 8/0 -  4704 DM
993
-define('ART_RCD_LARGE', 1004);   // Rapid Colony Deployment - Set of buildings up to 20th level - 20/25/10/1 - 39790 DM
990
+define('ART_LHC', 1001); // Additional moon chance
991
+define('ART_RCD_SMALL', 1002); // Rapid Colony Deployment - Set of buildings up to 10th level - 10/14/ 3/0 -   405 DM
992
+define('ART_RCD_MEDIUM', 1003); // Rapid Colony Deployment - Set of buildings up to 15th level - 15/20/ 8/0 -  4704 DM
993
+define('ART_RCD_LARGE', 1004); // Rapid Colony Deployment - Set of buildings up to 20th level - 20/25/10/1 - 39790 DM
994 994
 define('ART_HEURISTIC_CHIP', 1005); // Speed up research
995 995
 define('ART_NANO_BUILDER', 1006); // Speed up building
996 996
 define('ART_NANO_CONSTRUCTOR', 1007); // RESERVED Speed up hangar constructions
@@ -1061,18 +1061,18 @@  discard block
 block discarded – undo
1061 1061
 define('UNIT_AWARD_MEDAL_BLITZ_R0_PLACE1', 2201); // Блиц-сервер, участник 0-го раунда, 1-е место
1062 1062
 define('UNIT_AWARD_MEDAL_BLITZ_R0_PLACE2', 2202); // Блиц-сервер, участник 0-го раунда, 2-е место
1063 1063
 define('UNIT_AWARD_MEDAL_BLITZ_R0_PLACE3', 2203); // Блиц-сервер, участник 0-го раунда, 3-е место
1064
-define('UNIT_AWARD_MEDAL_2016_WOMEN_DAY_BEST', 2204);  // Медаль Лучшему Кавалеру за максимум потраченной ММ/максимум одаренных женщин Женщине от Мужчины во время ивента 8 марта 2016 года
1064
+define('UNIT_AWARD_MEDAL_2016_WOMEN_DAY_BEST', 2204); // Медаль Лучшему Кавалеру за максимум потраченной ММ/максимум одаренных женщин Женщине от Мужчины во время ивента 8 марта 2016 года
1065 1065
 
1066 1066
 define('UNIT_AWARD_MEMORY', 2300); // Памятные знаки за существование и участие - например "4 года в игре". "Был онлайн в новогоднюю ночь 2013". итд
1067
-define('UNIT_AWARD_MEMORY_IMMORTAL', 2301);  // Бессмертный
1068
-define('UNIT_AWARD_MEMORY_2015_WOMEN_DAY', 2302);  // Значек за подарок Женщине от Мужчины во время ивента 8 марта 2015 года
1067
+define('UNIT_AWARD_MEMORY_IMMORTAL', 2301); // Бессмертный
1068
+define('UNIT_AWARD_MEMORY_2015_WOMEN_DAY', 2302); // Значек за подарок Женщине от Мужчины во время ивента 8 марта 2015 года
1069 1069
 define('UNIT_AWARD_MEMORY_BLITZ_R0', 2303); // Блиц-сервер, участник 0-го раунда
1070 1070
 define('UNIT_AWARD_MEMORY_SUPER_BORN_2015_SIMPLE', 2304); // День Рождения СН
1071 1071
 define('UNIT_AWARD_MEMORY_SUPER_BORN_2015_BRONZE', 2305); // День Рождения СН
1072 1072
 define('UNIT_AWARD_MEMORY_SUPER_BORN_2015_SILVER', 2306); // День Рождения СН
1073 1073
 define('UNIT_AWARD_MEMORY_SUPER_BORN_2015_GOLD', 2307); // День Рождения СН
1074 1074
 define('UNIT_AWARD_MEMORY_SUPER_BORN_2015_PLATINUM', 2308); // День Рождения СН
1075
-define('UNIT_AWARD_MEMORY_2016_WOMEN_DAY', 2309);  // Значек за подарок Женщине от Мужчины во время ивента 8 марта 2016 года
1075
+define('UNIT_AWARD_MEMORY_2016_WOMEN_DAY', 2309); // Значек за подарок Женщине от Мужчины во время ивента 8 марта 2016 года
1076 1076
 
1077 1077
 define('UNIT_AWARD_PENNANT', 2400); // Переходящий вымпел - индикация статуса на сервере: "Топ-1", "Топ", "Сабтоп", "Самый большой флот" итд
1078 1078
 define('UNIT_AWARD_BADGE', 2600); // Бейджики/значки за ачивки - например, "Построил 1000 кораблей"
@@ -1169,7 +1169,7 @@  discard block
 block discarded – undo
1169 1169
 
1170 1170
 define('UNIT_NEXT', 4000); // !!! Next unit start on 4000 !!!
1171 1171
 
1172
-define('GROUP_PART',         800000);
1172
+define('GROUP_PART', 800000);
1173 1173
 // Зарезервировано для запчастей: 800.001 - 899.999
1174 1174
 // define('GROUP_PART_HULL',    801000); // Корпуса - 1000 штук
1175 1175
 // define('GROUP_PART_ARMOR',   802000); // Броня - 1000 штук
@@ -1426,32 +1426,32 @@  discard block
 block discarded – undo
1426 1426
 
1427 1427
 
1428 1428
 // define('NICK_ID',               -1);
1429
-define('NICK_HTML',              0);
1430
-
1431
-define('NICK_FIRST',             1);
1432
-define('NICK_RACE',           1000);
1433
-define('NICK_GENDER',         2000);
1434
-define('NICK_AWARD',          3000);
1435
-define('NICK_VACATION',       3500);
1436
-define('NICK_BIRTHSDAY',      4000);
1437
-define('NICK_PREMIUM',        5000);
1438
-define('NICK_AUTH_LEVEL',     6000);
1439
-
1440
-define('NICK_HIGHLIGHT',      6300);
1441
-define('NICK_CLASS',          6450);
1442
-
1443
-define('NICK_NICK_CLASS',     6600);
1444
-define('NICK_NICK',           7000);
1429
+define('NICK_HTML', 0);
1430
+
1431
+define('NICK_FIRST', 1);
1432
+define('NICK_RACE', 1000);
1433
+define('NICK_GENDER', 2000);
1434
+define('NICK_AWARD', 3000);
1435
+define('NICK_VACATION', 3500);
1436
+define('NICK_BIRTHSDAY', 4000);
1437
+define('NICK_PREMIUM', 5000);
1438
+define('NICK_AUTH_LEVEL', 6000);
1439
+
1440
+define('NICK_HIGHLIGHT', 6300);
1441
+define('NICK_CLASS', 6450);
1442
+
1443
+define('NICK_NICK_CLASS', 6600);
1444
+define('NICK_NICK', 7000);
1445 1445
 define('NICK_NICK_CLASS_END', 7300);
1446 1446
 
1447
-define('NICK_ALLY_CLASS',     7600);
1448
-define('NICK_ALLY',           8000);
1447
+define('NICK_ALLY_CLASS', 7600);
1448
+define('NICK_ALLY', 8000);
1449 1449
 define('NICK_ALLY_CLASS_END', 8300);
1450 1450
 
1451
-define('NICK_CLASS_END',      8450);
1452
-define('NICK_HIGHLIGHT_END',  8600);
1451
+define('NICK_CLASS_END', 8450);
1452
+define('NICK_HIGHLIGHT_END', 8600);
1453 1453
 
1454
-define('NICK_LAST',           9999);
1454
+define('NICK_LAST', 9999);
1455 1455
 
1456 1456
 // Настройки игрока
1457 1457
 define('PLAYER_OPTION_MENU_SORT', 1);
@@ -1544,8 +1544,8 @@  discard block
 block discarded – undo
1544 1544
 define('LOG_ONLIINE_AGGREGATE_PERIOD_MINUTE_10', 1);
1545 1545
 
1546 1546
 define('BLITZ_REGISTER_DISABLED', 0);
1547
-define('BLITZ_REGISTER_OPEN'    , 1);
1548
-define('BLITZ_REGISTER_CLOSED'  , 2);
1547
+define('BLITZ_REGISTER_OPEN', 1);
1548
+define('BLITZ_REGISTER_CLOSED', 2);
1549 1549
 define('BLITZ_REGISTER_SHOW_LOGIN', 3);
1550 1550
 define('BLITZ_REGISTER_DISCLOSURE_NAMES', 4);
1551 1551
 
Please login to merge, or discard this patch.
tests.int/FleetTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
 define('SN_IN_FLEET', true);
6 6
 define('SN_RENDER_NAVBAR_PLANET', true);
7 7
 
8
-include('../common.' . substr(strrchr(__FILE__, '.'), 1));
8
+include('../common.'.substr(strrchr(__FILE__, '.'), 1));
9 9
 
10 10
 // TODO - Переместить это куда-нибудь
11 11
 $fleet_page = sys_get_param_int('fleet_page', sys_get_param_int('mode'));
@@ -192,8 +192,8 @@  discard block
 block discarded – undo
192 192
 //  break;
193 193
     }
194 194
 
195
-    if($exceptionCode !== null) {
196
-      print('<span style="color: red; font-size: 200%;">FAILED! Expected Exception [' . $exceptionCode . ']: "' . classLocale::$lang['fl_attack_error'][$exceptionCode] . '" - FAILED!</span><br />');
195
+    if ($exceptionCode !== null) {
196
+      print('<span style="color: red; font-size: 200%;">FAILED! Expected Exception ['.$exceptionCode.']: "'.classLocale::$lang['fl_attack_error'][$exceptionCode].'" - FAILED!</span><br />');
197 197
       print('<div style="color: red; font-size: 200%;">NO EXCEPTION RAISED</div>');
198 198
       pdie();
199 199
     } else {
@@ -203,8 +203,8 @@  discard block
 block discarded – undo
203 203
     if ($exceptionCode !== null && $e->getCode() === $exceptionCode) {
204 204
 //      print('<span style="color: darkgreen;">Exception [' . $exceptionCode . ']: "' . classLocale::$lang['fl_attack_error'][$exceptionCode] . '" - passed</span><br />');
205 205
     } else {
206
-      print('<div style="color: red; font-size: 200%;">Expected Exception [' . $exceptionCode . ']: "' . classLocale::$lang['fl_attack_error'][$exceptionCode] . '" - FAILED!</div>');
207
-      print('<div style="color: red; font-size: 200%;">Got Exception [' . $e->getCode() . ']: "' . $e->getMessage() . '"/"' . classLocale::$lang['fl_attack_error'][$e->getCode()] . '" . "</div>');
206
+      print('<div style="color: red; font-size: 200%;">Expected Exception ['.$exceptionCode.']: "'.classLocale::$lang['fl_attack_error'][$exceptionCode].'" - FAILED!</div>');
207
+      print('<div style="color: red; font-size: 200%;">Got Exception ['.$e->getCode().']: "'.$e->getMessage().'"/"'.classLocale::$lang['fl_attack_error'][$e->getCode()].'" . "</div>');
208 208
       throw $e;
209 209
     }
210 210
   }
Please login to merge, or discard this patch.
includes/classes/_unused/DbSqlPrepare.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -128,6 +128,9 @@
 block discarded – undo
128 128
     }
129 129
   }
130 130
 
131
+  /**
132
+   * @param string $comment
133
+   */
131 134
   protected function commentAdd($comment) {
132 135
     if (empty($this->values[static::COMMENT_PLACEHOLDER])) {
133 136
       $this->query .= static::COMMENT_PLACEHOLDER;
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
         // Removing comment placeholder from statement
165 165
         $this->queryPrepared = str_replace(static::COMMENT_PLACEHOLDER, DbSqlHelper::quoteComment($this->comment), $this->queryPrepared);
166 166
         // Removing comment value from values list
167
-        $this->paramsPrepared = array_filter($this->paramsPrepared, function ($value) { return $value != DbSqlPrepare::COMMENT_PLACEHOLDER; });
167
+        $this->paramsPrepared = array_filter($this->paramsPrepared, function($value) { return $value != DbSqlPrepare::COMMENT_PLACEHOLDER; });
168 168
         // TODO - Add comment value directly to statement
169 169
       }
170 170
 
@@ -268,9 +268,9 @@  discard block
 block discarded – undo
268 268
   }
269 269
 
270 270
   public function getIterator() {
271
-    if(DbSqlPrepare::$isUseGetResult) {
271
+    if (DbSqlPrepare::$isUseGetResult) {
272 272
       $mysqli_result = $this->statement->get_result();
273
-      if($mysqli_result instanceof mysqli_result) {
273
+      if ($mysqli_result instanceof mysqli_result) {
274 274
         $iterator = new DbMysqliResultIterator($this->statement->get_result());
275 275
       } else {
276 276
         $iterator = new DbEmptyIterator();
Please login to merge, or discard this patch.
includes/classes/DbQueryConstructor.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
   // TODO - rewrite
229 229
   public function getParamsFromStaticClass($className) {
230 230
     if (is_string($className) && $className && class_exists($className)) {
231
-      if(method_exists($className, 'getDb')) {
231
+      if (method_exists($className, 'getDb')) {
232 232
         $this->setDb($className::getDb());
233 233
       }
234 234
       $this->from($className::$_table);
@@ -317,9 +317,9 @@  discard block
 block discarded – undo
317 317
   }
318 318
 
319 319
   protected function compileFrom() {
320
-    $this->_compiledQuery[] = 'FROM `{{' . $this->escapeString($this->table) . '}}`';
320
+    $this->_compiledQuery[] = 'FROM `{{'.$this->escapeString($this->table).'}}`';
321 321
     if (!empty($this->alias)) {
322
-      $this->_compiledQuery[] = 'AS `' . $this->escapeString($this->alias) . '`';
322
+      $this->_compiledQuery[] = 'AS `'.$this->escapeString($this->alias).'`';
323 323
     }
324 324
   }
325 325
 
@@ -329,29 +329,29 @@  discard block
 block discarded – undo
329 329
 
330 330
   protected function compileWhere() {
331 331
     // TODO - fields should be escaped !!
332
-    !empty($this->where) ? $this->_compiledQuery[] = 'WHERE ' . implode(' AND ', $this->where) : false;
332
+    !empty($this->where) ? $this->_compiledQuery[] = 'WHERE '.implode(' AND ', $this->where) : false;
333 333
   }
334 334
 
335 335
   protected function compileGroupBy() {
336 336
     // TODO - fields should be escaped !!
337 337
 //    !empty($this->groupBy) ? $this->_compiledQuery[] = 'GROUP BY ' . implode(',', $this->arrayEscape($this->groupBy)) : false;
338
-    !empty($this->groupBy) ? $this->_compiledQuery[] = 'GROUP BY ' . $this->selectFieldsToString($this->groupBy) : false;
338
+    !empty($this->groupBy) ? $this->_compiledQuery[] = 'GROUP BY '.$this->selectFieldsToString($this->groupBy) : false;
339 339
   }
340 340
 
341 341
   protected function compileOrderBy() {
342 342
     // TODO - fields should be escaped !!
343
-    !empty($this->orderBy) ? $this->_compiledQuery[] = 'ORDER BY ' . implode(',', $this->arrayEscape($this->orderBy)) : false;
343
+    !empty($this->orderBy) ? $this->_compiledQuery[] = 'ORDER BY '.implode(',', $this->arrayEscape($this->orderBy)) : false;
344 344
   }
345 345
 
346 346
   protected function compileHaving() {
347 347
     // TODO - fields should be escaped !!
348
-    !empty($this->having) ? $this->_compiledQuery[] = 'HAVING ' . implode(' AND ', $this->having) : false;
348
+    !empty($this->having) ? $this->_compiledQuery[] = 'HAVING '.implode(' AND ', $this->having) : false;
349 349
   }
350 350
 
351 351
   protected function compileLimit() {
352 352
     // TODO - fields should be escaped !!
353 353
     if ($limit = $this->fetchOne ? 1 : $this->limit) {
354
-      $this->_compiledQuery[] = 'LIMIT ' . $limit . (!empty($this->offset) ? ' OFFSET ' . $this->offset : '');
354
+      $this->_compiledQuery[] = 'LIMIT '.$limit.(!empty($this->offset) ? ' OFFSET '.$this->offset : '');
355 355
     }
356 356
   }
357 357
 
@@ -395,14 +395,14 @@  discard block
 block discarded – undo
395 395
    */
396 396
   protected function processField($fieldName) {
397 397
     if (is_bool($fieldName)) {
398
-      $result = (string)intval($fieldName);
398
+      $result = (string) intval($fieldName);
399 399
     } elseif (is_numeric($fieldName)) {
400 400
       $result = $fieldName;
401 401
     } elseif (is_null($fieldName)) {
402 402
       $result = 'NULL';
403 403
     } else {
404 404
       // Field has other type - string or should be convertible to string
405
-      $result = (string)$fieldName;
405
+      $result = (string) $fieldName;
406 406
       if (!$fieldName instanceof DbSqlLiteral) {
407 407
         $result = $this->quoteField($fieldName);
408 408
       }
Please login to merge, or discard this patch.
Doc Comments   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -155,10 +155,17 @@  discard block
 block discarded – undo
155 155
     return $this->field(DbSqlLiteral::build($this->db)->literal($field));
156 156
   }
157 157
 
158
+  /**
159
+   * @param string $functionName
160
+   * @param string $alias
161
+   */
158 162
   public function fieldSingleFunction($functionName, $field = '*', $alias = DbSqlLiteral::SQL_LITERAL_ALIAS_NONE) {
159 163
     return $this->field(DbSqlLiteral::build($this->db)->buildSingleArgument($functionName, $field, $alias));
160 164
   }
161 165
 
166
+  /**
167
+   * @param string $alias
168
+   */
162 169
   public function fieldCount($field = '*', $alias = DbSqlLiteral::SQL_LITERAL_ALIAS_NONE) {
163 170
     return $this->field(DbSqlLiteral::build($this->db)->count($field, $alias));
164 171
   }
@@ -240,7 +247,7 @@  discard block
 block discarded – undo
240 247
 
241 248
   /**
242 249
    * @param db_mysql|null $db
243
-   * @param string|object|DBStaticRecord|DbSqlAware $className
250
+   * @param string $className
244 251
    *
245 252
    * @return static
246 253
    */
@@ -435,7 +442,6 @@  discard block
 block discarded – undo
435 442
   }
436 443
 
437 444
   /**
438
-   * @param bool $skip_query_check
439 445
    *
440 446
    * @return DbEmptyIterator|DbMysqliResultIterator
441 447
    */
@@ -444,7 +450,6 @@  discard block
 block discarded – undo
444 450
   }
445 451
 
446 452
   /**
447
-   * @param bool $skip_query_check
448 453
    *
449 454
    * @return array
450 455
    */
@@ -455,7 +460,6 @@  discard block
 block discarded – undo
455 460
   }
456 461
 
457 462
   /**
458
-   * @param bool $skip_query_check
459 463
    *
460 464
    * @return mixed|null
461 465
    */
Please login to merge, or discard this patch.
includes/classes/DBStaticRecord.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
     $stmt =
85 85
       static::buildDBQ()
86 86
         ->fields($fieldList)
87
-        ->where(static::$_idField . '=' . $recordId);
87
+        ->where(static::$_idField.'='.$recordId);
88 88
 
89 89
     if ($forUpdate) {
90 90
       $stmt->setForUpdate();
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
       $query =
106 106
         static::buildDBQ()
107 107
           ->fields(static::$_idField)
108
-          ->where(array("`" . static::$_idField . "` IN (" . implode(',', $idList) . ")"))
108
+          ->where(array("`".static::$_idField."` IN (".implode(',', $idList).")"))
109 109
           ->selectIterator();
110 110
     } else {
111 111
       $query = new DbEmptyIterator();
Please login to merge, or discard this patch.
includes/classes/Pimple/Container.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -239,7 +239,7 @@
 block discarded – undo
239 239
 
240 240
         $factory = $this->values[$id];
241 241
 
242
-        $extended = function ($c) use ($callable, $factory) {
242
+        $extended = function($c) use ($callable, $factory) {
243 243
             return $callable($factory($c), $c);
244 244
         };
245 245
 
Please login to merge, or discard this patch.
includes/classes/DbResultIterator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@
 block discarded – undo
125 125
    * @since 5.1.0
126 126
    */
127 127
   public function count() {
128
-    throw new Exception('You should implement ' . get_called_class() . '::count()');
128
+    throw new Exception('You should implement '.get_called_class().'::count()');
129 129
   }
130 130
 
131 131
 }
Please login to merge, or discard this patch.
includes/init.php 1 patch
Spacing   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 // Защита от двойного инита
4
-if(defined('INIT')) {
4
+if (defined('INIT')) {
5 5
   return;
6 6
 }
7 7
 
@@ -19,22 +19,22 @@  discard block
 block discarded – undo
19 19
 define('SN_DEBUG_PDUMP_CALLER', true);
20 20
 
21 21
 // Бенчмарк
22
-register_shutdown_function(function () {
23
-  if(defined('IN_AJAX')) {
22
+register_shutdown_function(function() {
23
+  if (defined('IN_AJAX')) {
24 24
     return;
25 25
   }
26 26
 
27 27
   global $user, $locale_cache_statistic;
28 28
 
29
-  print('<hr><div class="benchmark">Benchmark ' . (microtime(true) - SN_TIME_MICRO) . 's, memory: ' . number_format(memory_get_usage() - SN_MEM_START) .
30
-    (!empty($locale_cache_statistic['misses']) ? ', LOCALE MISSED' : '') .
31
-    (class_exists('classSupernova') && is_object(classSupernova::$db) ? ', DB time: ' . classSupernova::$db->time_mysql_total . 'ms' : '') .
29
+  print('<hr><div class="benchmark">Benchmark '.(microtime(true) - SN_TIME_MICRO).'s, memory: '.number_format(memory_get_usage() - SN_MEM_START).
30
+    (!empty($locale_cache_statistic['misses']) ? ', LOCALE MISSED' : '').
31
+    (class_exists('classSupernova') && is_object(classSupernova::$db) ? ', DB time: '.classSupernova::$db->time_mysql_total.'ms' : '').
32 32
     '</div>');
33
-  if($user['authlevel'] >= 2 && file_exists(SN_ROOT_PHYSICAL . 'badqrys.txt') && @filesize(SN_ROOT_PHYSICAL . 'badqrys.txt') > 0) {
33
+  if ($user['authlevel'] >= 2 && file_exists(SN_ROOT_PHYSICAL.'badqrys.txt') && @filesize(SN_ROOT_PHYSICAL.'badqrys.txt') > 0) {
34 34
     echo '<a href="badqrys.txt" target="_blank" style="color:red">', 'HACK ALERT!', '</a>';
35 35
   }
36 36
 
37
-  if(!empty($locale_cache_statistic['misses'])) {
37
+  if (!empty($locale_cache_statistic['misses'])) {
38 38
     print('<!--');
39 39
     pdump($locale_cache_statistic);
40 40
     print('-->');
@@ -54,47 +54,47 @@  discard block
 block discarded – undo
54 54
 
55 55
 define('SN_TIME_NOW_GMT_STRING', gmdate(DATE_ATOM, SN_TIME_NOW));
56 56
 
57
-if(strpos(strtolower($_SERVER['SERVER_NAME']), 'google.') !== false) {
57
+if (strpos(strtolower($_SERVER['SERVER_NAME']), 'google.') !== false) {
58 58
   define('SN_GOOGLE', true);
59 59
 }
60 60
 
61 61
 // Эти три строки должны быть В ЭТОМ ФАЙЛЕ, ПО ЭТОМУ ПУТИ и ПЕРЕД ЭТИМ ИНКЛЮДОМ!!!
62
-define('SN_ROOT_PHYSICAL', str_replace(array('\\', '//'), '/', dirname(__DIR__) . '/'));
62
+define('SN_ROOT_PHYSICAL', str_replace(array('\\', '//'), '/', dirname(__DIR__).'/'));
63 63
 define('SN_ROOT_PHYSICAL_STR_LEN', strlen(SN_ROOT_PHYSICAL));
64 64
 $phpbb_root_path = SN_ROOT_PHYSICAL; // Это нужно для работы PTL
65 65
 
66
-$sn_root_relative = str_replace(array('\\', '//'), '/', getcwd() . '/');
66
+$sn_root_relative = str_replace(array('\\', '//'), '/', getcwd().'/');
67 67
 //$sn_root_relative .= $sn_root_relative[strlen($sn_root_relative) - 1] == '/' ? '' : '/';
68 68
 $sn_root_relative = str_replace(SN_ROOT_PHYSICAL, '', $sn_root_relative);
69 69
 $sn_root_relative .= basename($_SERVER['SCRIPT_NAME']);
70 70
 $sn_root_relative = str_replace($sn_root_relative, '', $_SERVER['SCRIPT_NAME']);
71 71
 define('SN_ROOT_RELATIVE', $sn_root_relative);
72 72
 
73
-define('SN_ROOT_VIRTUAL', 'http' . (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? 's' : '') . '://' . $_SERVER['HTTP_HOST'] . SN_ROOT_RELATIVE);
73
+define('SN_ROOT_VIRTUAL', 'http'.(!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? 's' : '').'://'.$_SERVER['HTTP_HOST'].SN_ROOT_RELATIVE);
74 74
 define('SN_ROOT_VIRTUAL_PARENT', str_replace('//google.', '//', SN_ROOT_VIRTUAL));
75 75
 
76 76
 $phpEx = strpos($phpEx = substr(strrchr(__FILE__, '.'), 1), '/') === false ? $phpEx : '';
77 77
 define('PHP_EX', $phpEx); // PHP extension on this server
78
-define('DOT_PHP_EX', '.' . PHP_EX); // PHP extension on this server
78
+define('DOT_PHP_EX', '.'.PHP_EX); // PHP extension on this server
79 79
 
80 80
 
81 81
 header('Content-type: text/html; charset=utf-8');
82 82
 ob_start();
83 83
 ini_set('error_reporting', E_ALL ^ E_NOTICE);
84 84
 
85
-empty($classRoot) ? $classRoot = SN_ROOT_PHYSICAL . 'includes/classes/' : false;
86
-spl_autoload_register(function ($class) use ($classRoot) {
85
+empty($classRoot) ? $classRoot = SN_ROOT_PHYSICAL.'includes/classes/' : false;
86
+spl_autoload_register(function($class) use ($classRoot) {
87 87
   $class = str_replace('\\', '/', $class);
88
-  if (file_exists($classRoot . $class . '.php')) {
89
-    require_once $classRoot . $class . '.php';
90
-  } elseif (file_exists($classRoot . 'UBE/' . $class . '.php')) {
91
-    require_once $classRoot . 'UBE/' . $class . '.php';
88
+  if (file_exists($classRoot.$class.'.php')) {
89
+    require_once $classRoot.$class.'.php';
90
+  } elseif (file_exists($classRoot.'UBE/'.$class.'.php')) {
91
+    require_once $classRoot.'UBE/'.$class.'.php';
92 92
   }
93 93
 });
94 94
 
95 95
 require_once 'constants.php';
96
-require_once SN_ROOT_PHYSICAL . "includes/db" . DOT_PHP_EX;
97
-require_once(SN_ROOT_PHYSICAL . "includes/init/init_functions" . DOT_PHP_EX);
96
+require_once SN_ROOT_PHYSICAL."includes/db".DOT_PHP_EX;
97
+require_once(SN_ROOT_PHYSICAL."includes/init/init_functions".DOT_PHP_EX);
98 98
 
99 99
 /**
100 100
  * @var classConfig    $config
@@ -114,8 +114,8 @@  discard block
 block discarded – undo
114 114
 // define('BE_DEBUG', true); // Отладка боевого движка
115 115
 classSupernova::init_debug_state();
116 116
 
117
-require_once(SN_ROOT_PHYSICAL . "includes/vars/vars" . DOT_PHP_EX);
118
-require_once(SN_ROOT_PHYSICAL . "includes/general" . DOT_PHP_EX);
117
+require_once(SN_ROOT_PHYSICAL."includes/vars/vars".DOT_PHP_EX);
118
+require_once(SN_ROOT_PHYSICAL."includes/general".DOT_PHP_EX);
119 119
 
120 120
 init_update();
121 121
 
@@ -124,28 +124,28 @@  discard block
 block discarded – undo
124 124
   ? trim(strip_tags($_GET['page']))
125 125
   : str_replace(DOT_PHP_EX, '', str_replace(SN_ROOT_RELATIVE, '', str_replace('\\', '/', $_SERVER['SCRIPT_NAME'])));
126 126
 define('INITIAL_PAGE', $sn_page_name_original);
127
-define('SN_COOKIE', (classSupernova::$config->COOKIE_NAME ? classSupernova::$config->COOKIE_NAME : 'SuperNova') . (defined('SN_GOOGLE') ? '_G' : ''));
128
-define('SN_COOKIE_I', SN_COOKIE . AUTH_COOKIE_IMPERSONATE_SUFFIX);
129
-define('SN_COOKIE_D', SN_COOKIE . '_D');
130
-define('SN_COOKIE_T', SN_COOKIE . '_T'); // Time measure cookie
131
-define('SN_COOKIE_F', SN_COOKIE . '_F'); // Font size cookie
132
-define('SN_COOKIE_U', SN_COOKIE . '_U'); // Current user cookie aka user ID
133
-define('SN_COOKIE_U_I', SN_COOKIE_U . AUTH_COOKIE_IMPERSONATE_SUFFIX); // Current impersonator user cookie aka impersonator user ID
127
+define('SN_COOKIE', (classSupernova::$config->COOKIE_NAME ? classSupernova::$config->COOKIE_NAME : 'SuperNova').(defined('SN_GOOGLE') ? '_G' : ''));
128
+define('SN_COOKIE_I', SN_COOKIE.AUTH_COOKIE_IMPERSONATE_SUFFIX);
129
+define('SN_COOKIE_D', SN_COOKIE.'_D');
130
+define('SN_COOKIE_T', SN_COOKIE.'_T'); // Time measure cookie
131
+define('SN_COOKIE_F', SN_COOKIE.'_F'); // Font size cookie
132
+define('SN_COOKIE_U', SN_COOKIE.'_U'); // Current user cookie aka user ID
133
+define('SN_COOKIE_U_I', SN_COOKIE_U.AUTH_COOKIE_IMPERSONATE_SUFFIX); // Current impersonator user cookie aka impersonator user ID
134 134
 define('TEMPLATE_NAME', classSupernova::$config->game_default_template ? classSupernova::$config->game_default_template : 'OpenGame');
135
-define('TEMPLATE_PATH', 'design/templates/' . TEMPLATE_NAME);
136
-define('TEMPLATE_DIR', SN_ROOT_PHYSICAL . TEMPLATE_PATH);
135
+define('TEMPLATE_PATH', 'design/templates/'.TEMPLATE_NAME);
136
+define('TEMPLATE_DIR', SN_ROOT_PHYSICAL.TEMPLATE_PATH);
137 137
 define('DEFAULT_SKINPATH', classSupernova::$config->game_default_skin ? classSupernova::$config->game_default_skin : 'skins/EpicBlue/');
138 138
 define('DEFAULT_LANG', classSupernova::$config->game_default_language ? classSupernova::$config->game_default_language : 'ru');
139 139
 define('FMT_DATE', classSupernova::$config->int_format_date ? classSupernova::$config->int_format_date : 'd.m.Y');
140 140
 define('FMT_TIME', classSupernova::$config->int_format_time ? classSupernova::$config->int_format_time : 'H:i:s');
141
-define('FMT_DATE_TIME', FMT_DATE . ' ' . FMT_TIME);
141
+define('FMT_DATE_TIME', FMT_DATE.' '.FMT_TIME);
142 142
 
143 143
 $HTTP_ACCEPT_LANGUAGE = DEFAULT_LANG;
144 144
 
145
-require_once(SN_ROOT_PHYSICAL . "includes/template" . DOT_PHP_EX);
145
+require_once(SN_ROOT_PHYSICAL."includes/template".DOT_PHP_EX);
146 146
 $template_result = array('.' => array('result' => array()));
147 147
 
148
-sn_sys_load_php_files(SN_ROOT_PHYSICAL . "includes/functions/", PHP_EX);
148
+sn_sys_load_php_files(SN_ROOT_PHYSICAL."includes/functions/", PHP_EX);
149 149
 
150 150
 
151 151
 
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 // Конфиг - часть манифеста?
158 158
 classSupernova::$auth = new core_auth();
159 159
 
160
-sn_sys_load_php_files(SN_ROOT_PHYSICAL . "modules/", PHP_EX, true);
160
+sn_sys_load_php_files(SN_ROOT_PHYSICAL."modules/", PHP_EX, true);
161 161
 // Здесь - потому что core_auth модуль лежит в другом каталоге и его нужно инициализировать отдельно
162 162
 
163 163
 // Подключаем дефолтную страницу
@@ -165,10 +165,10 @@  discard block
 block discarded – undo
165 165
 // Сейчас мы делаем это здесь только для того, что бы содержание дефолтной страницы оказалось вверху. Что не факт, что нужно всегда
166 166
 // Но нужно, пока у нас есть не MVC-страницы
167 167
 $sn_page_data = $sn_data['pages'][$sn_page_name];
168
-$sn_page_name_file = 'includes/pages/' . $sn_page_data['filename'] . DOT_PHP_EX;
169
-if($sn_page_name && isset($sn_page_data) && file_exists($sn_page_name_file)) {
168
+$sn_page_name_file = 'includes/pages/'.$sn_page_data['filename'].DOT_PHP_EX;
169
+if ($sn_page_name && isset($sn_page_data) && file_exists($sn_page_name_file)) {
170 170
   require_once($sn_page_name_file);
171
-  if(is_array($sn_page_data['options'])) {
171
+  if (is_array($sn_page_data['options'])) {
172 172
     classSupernova::$options = array_merge(classSupernova::$options, $sn_page_data['options']);
173 173
   }
174 174
 }
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
 
179 179
 
180 180
 // А теперь проверяем - поддерживают ли у нас загруженный код такую страницу
181
-if(!isset($sn_data['pages'][$sn_page_name])) {
181
+if (!isset($sn_data['pages'][$sn_page_name])) {
182 182
   $sn_page_name = '';
183 183
 }
184 184
 
@@ -186,6 +186,6 @@  discard block
 block discarded – undo
186 186
 classLocale::$lang = $lang = new classLocale(classSupernova::$config->server_locale_log_usage);
187 187
 classLocale::$lang->lng_switch(sys_get_param_str('lang'));
188 188
 
189
-if(!defined('DEBUG_INIT_SKIP_SECONDARY') || DEBUG_INIT_SKIP_SECONDARY !== true) {
189
+if (!defined('DEBUG_INIT_SKIP_SECONDARY') || DEBUG_INIT_SKIP_SECONDARY !== true) {
190 190
   require_once "init_secondary.php";
191 191
 }
Please login to merge, or discard this patch.