Test Failed
Push — master ( 247090...f61425 )
by SuperNova.WS
18:56 queued 11:23
created
classes/template_compile.php 1 patch
Braces   +33 added lines, -66 removed lines patch added patch discarded remove patch
@@ -37,8 +37,7 @@  discard block
 block discarded – undo
37 37
 *
38 38
 * @package phpBB3
39 39
 */
40
-class template_compile
41
-{
40
+class template_compile {
42 41
   var $template;
43 42
 
44 43
   // Various storage arrays
@@ -58,8 +57,7 @@  discard block
 block discarded – undo
58 57
   * Load template source from file
59 58
   * @access private
60 59
   */
61
-  function _tpl_load_file($handle, $store_in_db = false)
62
-  {
60
+  function _tpl_load_file($handle, $store_in_db = false) {
63 61
     // Try and open template for read
64 62
     if (!file_exists($this->template->files[$handle]))
65 63
     {
@@ -69,8 +67,7 @@  discard block
 block discarded – undo
69 67
 
70 68
         return;
71 69
         trigger_error("template->_tpl_load_file(): File {$this->template->files[$handle]} does not exist or is empty", E_USER_ERROR);
72
-      }
73
-      else
70
+      } else
74 71
       {
75 72
         $this->template->files[$handle] = $this->template->files_inherit[$handle];
76 73
       }
@@ -106,8 +103,7 @@  discard block
 block discarded – undo
106 103
   * the ones that exist in zend_language_scanner.l
107 104
   * @access private
108 105
   */
109
-  function remove_php_tags(&$code)
110
-  {
106
+  function remove_php_tags(&$code) {
111 107
     // This matches the information gathered from the internal PHP lexer
112 108
     $match = array(
113 109
       '#<([\?%])=?.*?\1>#s',
@@ -122,8 +118,7 @@  discard block
 block discarded – undo
122 118
   * The all seeing all doing compile method. Parts are inspired by or directly from Smarty
123 119
   * @access private
124 120
   */
125
-  function compile($code, $no_echo = false, $echo_var = '')
126
-  {
121
+  function compile($code, $no_echo = false, $echo_var = '') {
127 122
     if ($echo_var)
128 123
     {
129 124
       global $$echo_var;
@@ -226,15 +221,13 @@  discard block
 block discarded – undo
226 221
               $var = substr($temp, 2, -1);
227 222
               //$file = $this->template->_tpldata['DEFINE']['.'][$var];
228 223
               $temp = "\$this->_tpldata['DEFINE']['.']['$var']";
229
-            }
230
-            else
224
+            } else
231 225
             {
232 226
               $var = substr($temp, 1, -1);
233 227
               //$file = $this->template->_rootref[$var];
234 228
               $temp = "\$this->_rootref['$var']";
235 229
             }
236
-          }
237
-          else
230
+          } else
238 231
           {
239 232
             $file = $temp;
240 233
           }
@@ -293,8 +286,7 @@  discard block
 block discarded – undo
293 286
   * Compile variables
294 287
   * @access private
295 288
   */
296
-  function compile_var_tags(&$text_blocks)
297
-  {
289
+  function compile_var_tags(&$text_blocks) {
298 290
     // including $lang variable
299 291
     // global $lang, $config; // NOT NEDEED - $lang now is global!
300 292
 
@@ -368,8 +360,7 @@  discard block
 block discarded – undo
368 360
   * Compile blocks
369 361
   * @access private
370 362
   */
371
-  function compile_tag_block($tag_args)
372
-  {
363
+  function compile_tag_block($tag_args) {
373 364
     $no_nesting = false;
374 365
 
375 366
     // Is the designer wanting to call another loop in a loop?
@@ -392,8 +383,7 @@  discard block
 block discarded – undo
392 383
       if ($match[2] < 0)
393 384
       {
394 385
         $loop_start = '($_' . $tag_args . '_count ' . $match[2] . ' < 0 ? 0 : $_' . $tag_args . '_count ' . $match[2] . ')';
395
-      }
396
-      else
386
+      } else
397 387
       {
398 388
         $loop_start = '($_' . $tag_args . '_count < ' . $match[2] . ' ? $_' . $tag_args . '_count : ' . $match[2] . ')';
399 389
       }
@@ -401,17 +391,14 @@  discard block
 block discarded – undo
401 391
       if (strlen($match[3]) < 1 || $match[3] == -1)
402 392
       {
403 393
         $loop_end = '$_' . $tag_args . '_count';
404
-      }
405
-      else if ($match[3] >= 0)
394
+      } else if ($match[3] >= 0)
406 395
       {
407 396
         $loop_end = '(' . ($match[3] + 1) . ' > $_' . $tag_args . '_count ? $_' . $tag_args . '_count : ' . ($match[3] + 1) . ')';
408
-      }
409
-      else //if ($match[3] < -1)
397
+      } else //if ($match[3] < -1)
410 398
       {
411 399
         $loop_end = '$_' . $tag_args . '_count' . ($match[3] + 1);
412 400
       }
413
-    }
414
-    else
401
+    } else
415 402
     {
416 403
       $loop_start = 0;
417 404
       $loop_end = '$_' . $tag_args . '_count';
@@ -424,8 +411,7 @@  discard block
 block discarded – undo
424 411
     {
425 412
       // We need to implode $no_nesting times from the end...
426 413
       $block = array_slice($this->block_names, -$no_nesting);
427
-    }
428
-    else
414
+    } else
429 415
     {
430 416
       $block = $this->block_names;
431 417
     }
@@ -435,8 +421,7 @@  discard block
 block discarded – undo
435 421
       // Block is not nested.
436 422
       $tag_template_php = '$_' . $tag_args . "_count = (isset(\$this->_tpldata['$tag_args'])) ? sizeof(\$this->_tpldata['$tag_args']) : 0;";
437 423
       $varref = "\$this->_tpldata['$tag_args']";
438
-    }
439
-    else
424
+    } else
440 425
     {
441 426
       // This block is nested.
442 427
       // Generate a namespace string for this block.
@@ -475,8 +460,7 @@  discard block
 block discarded – undo
475 460
   * some adaptions for our block level methods
476 461
   * @access private
477 462
   */
478
-  function compile_tag_if($tag_args, $elseif)
479
-  {
463
+  function compile_tag_if($tag_args, $elseif) {
480 464
     // Tokenize args for 'if' tag.
481 465
     preg_match_all('/(?:
482 466
       "[^"\\\\]*(?:\\\\.[^"\\\\]*)*"         |
@@ -584,8 +568,7 @@  discard block
 block discarded – undo
584 568
           if (preg_match('#^((?:[a-z0-9\-_]+\.)+)?(\$)?(?=[A-Za-z])([A-Za-z0-9\-_]+)#s', $token, $varrefs))
585 569
           {
586 570
             $token = (!empty($varrefs[1])) ? $this->generate_block_data_ref(substr($varrefs[1], 0, -1), true, $varrefs[2]) . '[\'' . $varrefs[3] . '\']' : (($varrefs[2]) ? '$this->_tpldata[\'DEFINE\'][\'.\'][\'' . $varrefs[3] . '\']' : '$this->_rootref[\'' . $varrefs[3] . '\']');
587
-          }
588
-          else if (preg_match('#^\.((?:[a-z0-9\-_]+\.?)+)$#s', $token, $varrefs))
571
+          } else if (preg_match('#^\.((?:[a-z0-9\-_]+\.?)+)$#s', $token, $varrefs))
589 572
           {
590 573
             // Allow checking if loops are set with .loopname
591 574
             // It is also possible to check the loop count by doing <!-- IF .loopname > 1 --> for example
@@ -601,8 +584,7 @@  discard block
 block discarded – undo
601 584
 
602 585
               // Add the block reference for the last child.
603 586
               $varref .= "['" . $block . "']";
604
-            }
605
-            else
587
+            } else
606 588
             {
607 589
               $varref = '$this->_tpldata';
608 590
 
@@ -610,8 +592,7 @@  discard block
 block discarded – undo
610 592
               $varref .= "['" . $blocks[0] . "']";
611 593
             }
612 594
             $token = "sizeof($varref)";
613
-          }
614
-          else if (!empty($token))
595
+          } else if (!empty($token))
615 596
           {
616 597
             $token = '(' . $token . ')';
617 598
           }
@@ -632,8 +613,7 @@  discard block
 block discarded – undo
632 613
   * Compile DEFINE tags
633 614
   * @access private
634 615
   */
635
-  function compile_tag_define($tag_args, $op)
636
-  {
616
+  function compile_tag_define($tag_args, $op) {
637 617
     preg_match('#^((?:[a-z0-9\-_]+\.)+)?\$(?=[A-Z])([A-Z0-9_\-]*)(?: = (\'?)([^\']*)(\'?))?$#', $tag_args, $match);
638 618
 
639 619
     if (empty($match[2]) || (!isset($match[4]) && $op))
@@ -656,8 +636,7 @@  discard block
 block discarded – undo
656 636
 
657 637
       // Now replace the php code
658 638
       $match[4] = "'" . str_replace(array('<?php echo ', '; ?>'), array("' . ", " . '"), $match[4]) . "'";
659
-    }
660
-    else
639
+    } else
661 640
     {
662 641
       preg_match('#true|false|\.#i', $match[4], $type);
663 642
 
@@ -685,8 +664,7 @@  discard block
 block discarded – undo
685 664
   * Compile INCLUDE tag
686 665
   * @access private
687 666
   */
688
-  function compile_tag_include($tag_args)
689
-  {
667
+  function compile_tag_include($tag_args) {
690 668
     // Process dynamic includes
691 669
     if ($tag_args[0] == '$')
692 670
     {
@@ -700,8 +678,7 @@  discard block
 block discarded – undo
700 678
   * Compile INCLUDE_PHP tag
701 679
   * @access private
702 680
   */
703
-  function compile_tag_include_php($tag_args)
704
-  {
681
+  function compile_tag_include_php($tag_args) {
705 682
     return "\$this->_php_include('$tag_args');";
706 683
   }
707 684
 
@@ -710,8 +687,7 @@  discard block
 block discarded – undo
710 687
   * This is from Smarty
711 688
   * @access private
712 689
   */
713
-  function _parse_is_expr($is_arg, $tokens)
714
-  {
690
+  function _parse_is_expr($is_arg, $tokens) {
715 691
     $expr_end = 0;
716 692
     $negate_expr = false;
717 693
 
@@ -719,8 +695,7 @@  discard block
 block discarded – undo
719 695
     {
720 696
       $negate_expr = true;
721 697
       $expr_type = array_shift($tokens);
722
-    }
723
-    else
698
+    } else
724 699
     {
725 700
       $expr_type = $first_token;
726 701
     }
@@ -733,8 +708,7 @@  discard block
 block discarded – undo
733 708
           $expr_end++;
734 709
           $expr_arg = $tokens[$expr_end++];
735 710
           $expr = "!(($is_arg / $expr_arg) % $expr_arg)";
736
-        }
737
-        else
711
+        } else
738 712
         {
739 713
           $expr = "!($is_arg & 1)";
740 714
         }
@@ -746,8 +720,7 @@  discard block
 block discarded – undo
746 720
           $expr_end++;
747 721
           $expr_arg = $tokens[$expr_end++];
748 722
           $expr = "(($is_arg / $expr_arg) % $expr_arg)";
749
-        }
750
-        else
723
+        } else
751 724
         {
752 725
           $expr = "($is_arg & 1)";
753 726
         }
@@ -786,8 +759,7 @@  discard block
 block discarded – undo
786 759
    *
787 760
    * @return string
788 761
    */
789
-  private function generate_block_varref($namespace, $varname, $defop = false)
790
-  {
762
+  private function generate_block_varref($namespace, $varname, $defop = false) {
791 763
     // Strip the trailing period.
792 764
     $namespace = substr($namespace, 0, -1);
793 765
 
@@ -810,8 +782,7 @@  discard block
 block discarded – undo
810 782
   * NOTE: does not expect a trailing "." on the blockname.
811 783
   * @access private
812 784
   */
813
-  function generate_block_data_ref($blockname, $include_last_iterator, $defop = false)
814
-  {
785
+  function generate_block_data_ref($blockname, $include_last_iterator, $defop = false) {
815 786
     // Get an array of the blocks involved.
816 787
     $blocks = explode('.', $blockname);
817 788
     $blockcount = sizeof($blocks) - 1;
@@ -833,12 +804,10 @@  discard block
 block discarded – undo
833 804
         $varref .= '[$_' . $blocks[$blockcount] . '_i]';
834 805
       }
835 806
       return $varref;
836
-    }
837
-    else if ($include_last_iterator)
807
+    } else if ($include_last_iterator)
838 808
     {
839 809
       return '$_'. $blocks[$blockcount] . '_val';
840
-    }
841
-    else
810
+    } else
842 811
     {
843 812
       return '$_'. $blocks[$blockcount - 1] . '_val[\''. $blocks[$blockcount]. '\']';
844 813
     }
@@ -848,8 +817,7 @@  discard block
 block discarded – undo
848 817
   * Write compiled file to cache directory
849 818
   * @access private
850 819
   */
851
-  function compile_write($handle, $data)
852
-  {
820
+  function compile_write($handle, $data) {
853 821
     $filename = $this->template->cachepath . str_replace('/', '.', $this->template->filename[$handle]) . DOT_PHP_EX;
854 822
 
855 823
     $data = "<?php if (!defined('INSIDE')) exit;" . ((strpos($data, '<?php') === 0) ? substr($data, 5) : ' ?>' . $data);
@@ -873,8 +841,7 @@  discard block
 block discarded – undo
873 841
   * Minifies template w/i PHP code by removing extra spaces
874 842
   * @access private
875 843
   */
876
-  function minify($html)
877
-  {
844
+  function minify($html) {
878 845
     if(!SN::$config->tpl_minifier)
879 846
     {
880 847
       return $html;
Please login to merge, or discard this patch.
fleet.php 1 patch
Switch Indentation   +131 added lines, -131 removed lines patch added patch discarded remove patch
@@ -78,121 +78,121 @@  discard block
 block discarded – undo
78 78
 }
79 79
 
80 80
 switch ($fleet_page) {
81
-  case 3:
81
+    case 3:
82 82
 
83
-  case 2:
84
-    $fleet_group_mr = sys_get_param_id('fleet_group');
85
-    $fleetarray     = json_decode(base64_decode(str_rot13(sys_get_param('usedfleet'))), true);
86
-    $fleetarray = is_array($fleetarray) ? $fleetarray : array();
83
+    case 2:
84
+      $fleet_group_mr = sys_get_param_id('fleet_group');
85
+      $fleetarray     = json_decode(base64_decode(str_rot13(sys_get_param('usedfleet'))), true);
86
+      $fleetarray = is_array($fleetarray) ? $fleetarray : array();
87 87
 
88
-    foreach($fleetarray as $ship_id => &$ship_amount) {
89
-      if(!in_array($ship_id, sn_get_groups('fleet')) || (string)floatval($ship_amount) != $ship_amount || $ship_amount < 1) {
90
-        $debug->warning('Supplying wrong ship in ship list on fleet page', 'Hack attempt', 302, array('base_dump' => true));
91
-        die();
92
-      }
93
-      $ship_amount = floatval($ship_amount);
94
-    }
95
-
96
-    $UsedPlanet = false;
97
-    $YourPlanet = false;
98
-    $missiontype = array();
99
-    if ($planet > SN::$config->game_maxPlanet) {
100
-      $target_mission = MT_EXPLORE;
101
-      $missiontype[MT_EXPLORE] = $lang['type_mission'][MT_EXPLORE];
102
-    } elseif ($galaxy && $system && $planet) {
103
-      $check_type = $planet_type == PT_MOON ? PT_MOON : PT_PLANET;
104
-
105
-      $TargetPlanet = DBStaticPlanet::db_planet_by_gspt($galaxy, $system, $planet, $check_type);
106
-
107
-      if ($TargetPlanet['id_owner']) {
108
-        $UsedPlanet = true;
109
-        if ($TargetPlanet['id_owner'] == $user['id']) {
110
-          $YourPlanet = true;
88
+      foreach($fleetarray as $ship_id => &$ship_amount) {
89
+        if(!in_array($ship_id, sn_get_groups('fleet')) || (string)floatval($ship_amount) != $ship_amount || $ship_amount < 1) {
90
+          $debug->warning('Supplying wrong ship in ship list on fleet page', 'Hack attempt', 302, array('base_dump' => true));
91
+          die();
111 92
         }
93
+        $ship_amount = floatval($ship_amount);
112 94
       }
113 95
 
114
-      if (!$UsedPlanet) {
115
-        if ($fleetarray[SHIP_COLONIZER]) {
116
-          $missiontype[MT_COLONIZE] = $lang['type_mission'][MT_COLONIZE];
117
-          $target_mission = MT_COLONIZE;
118
-          $planet_type = PT_PLANET;
119
-        } else {
120
-          SnTemplate::messageBox("<font color=\"red\"><b>" . $lang['fl_no_planet_type'] . "</b></font>", $lang['fl_error']);
121
-        }
122
-      } else {
123
-        $recyclers = 0;
124
-        foreach(sn_get_groups('flt_recyclers') as $recycler_id) {
125
-          $recyclers += $fleetarray[$recycler_id];
96
+      $UsedPlanet = false;
97
+      $YourPlanet = false;
98
+      $missiontype = array();
99
+      if ($planet > SN::$config->game_maxPlanet) {
100
+        $target_mission = MT_EXPLORE;
101
+        $missiontype[MT_EXPLORE] = $lang['type_mission'][MT_EXPLORE];
102
+      } elseif ($galaxy && $system && $planet) {
103
+        $check_type = $planet_type == PT_MOON ? PT_MOON : PT_PLANET;
104
+
105
+        $TargetPlanet = DBStaticPlanet::db_planet_by_gspt($galaxy, $system, $planet, $check_type);
106
+
107
+        if ($TargetPlanet['id_owner']) {
108
+          $UsedPlanet = true;
109
+          if ($TargetPlanet['id_owner'] == $user['id']) {
110
+            $YourPlanet = true;
111
+          }
126 112
         }
127
-        if ($recyclers > 0 && $planet_type == PT_DEBRIS) {
128
-          $target_mission = MT_RECYCLE;
129
-          $missiontype[MT_RECYCLE] = $lang['type_mission'][MT_RECYCLE];
130
-        } elseif ($planet_type == PT_PLANET || $planet_type == PT_MOON) {
131
-          if ($YourPlanet) {
132
-            $missiontype[MT_RELOCATE] = $lang['type_mission'][MT_RELOCATE];
133
-            $missiontype[MT_TRANSPORT] = $lang['type_mission'][MT_TRANSPORT];
113
+
114
+        if (!$UsedPlanet) {
115
+          if ($fleetarray[SHIP_COLONIZER]) {
116
+            $missiontype[MT_COLONIZE] = $lang['type_mission'][MT_COLONIZE];
117
+            $target_mission = MT_COLONIZE;
118
+            $planet_type = PT_PLANET;
134 119
           } else {
135
-            // Not Your Planet
136
-            if ($fleetarray[SHIP_SPY]) {
137
-              // Only spy missions if any spy
138
-              $missiontype[MT_SPY] = $lang['type_mission'][MT_SPY];
120
+            SnTemplate::messageBox("<font color=\"red\"><b>" . $lang['fl_no_planet_type'] . "</b></font>", $lang['fl_error']);
121
+          }
122
+        } else {
123
+          $recyclers = 0;
124
+          foreach(sn_get_groups('flt_recyclers') as $recycler_id) {
125
+            $recyclers += $fleetarray[$recycler_id];
126
+          }
127
+          if ($recyclers > 0 && $planet_type == PT_DEBRIS) {
128
+            $target_mission = MT_RECYCLE;
129
+            $missiontype[MT_RECYCLE] = $lang['type_mission'][MT_RECYCLE];
130
+          } elseif ($planet_type == PT_PLANET || $planet_type == PT_MOON) {
131
+            if ($YourPlanet) {
132
+              $missiontype[MT_RELOCATE] = $lang['type_mission'][MT_RELOCATE];
133
+              $missiontype[MT_TRANSPORT] = $lang['type_mission'][MT_TRANSPORT];
139 134
             } else {
140
-              // If no spies...
141
-              if ($fleet_group_mr) {
142
-                $missiontype[MT_AKS] = $lang['type_mission'][MT_AKS];
135
+              // Not Your Planet
136
+              if ($fleetarray[SHIP_SPY]) {
137
+                // Only spy missions if any spy
138
+                $missiontype[MT_SPY] = $lang['type_mission'][MT_SPY];
143 139
               } else {
144
-                $missiontype[MT_ATTACK] = $lang['type_mission'][MT_ATTACK];
145
-                $missiontype[MT_TRANSPORT] = $lang['type_mission'][MT_TRANSPORT];
146
-
147
-                $missiontype[MT_HOLD] = $lang['type_mission'][MT_HOLD];
148
-
149
-                if($planet_type == PT_MOON && $fleetarray[SHIP_HUGE_DEATH_STAR]) {
150
-                  $missiontype[MT_DESTROY] = $lang['type_mission'][MT_DESTROY];
140
+                // If no spies...
141
+                if ($fleet_group_mr) {
142
+                  $missiontype[MT_AKS] = $lang['type_mission'][MT_AKS];
143
+                } else {
144
+                  $missiontype[MT_ATTACK] = $lang['type_mission'][MT_ATTACK];
145
+                  $missiontype[MT_TRANSPORT] = $lang['type_mission'][MT_TRANSPORT];
146
+
147
+                  $missiontype[MT_HOLD] = $lang['type_mission'][MT_HOLD];
148
+
149
+                  if($planet_type == PT_MOON && $fleetarray[SHIP_HUGE_DEATH_STAR]) {
150
+                    $missiontype[MT_DESTROY] = $lang['type_mission'][MT_DESTROY];
151
+                  }
151 152
                 }
152 153
               }
153 154
             }
154 155
           }
155 156
         }
156 157
       }
157
-    }
158
-
159
-    if (!$target_mission && is_array($missiontype)) {
160
-      $target_mission = MT_ATTACK;
161
-    }
162
-
163
-//    $sn_group_missions = sn_get_groups('missions');
164
-//    foreach($sn_group_missions as $mission_id => $cork) {
165
-//      $missiontype[$mission_id] = $lang['type_mission'][$mission_id];
166
-//    }
167
-//
168
-//
169
-    ksort($missiontype);
170
-
171
-    $speed_percent = sys_get_param_int('speed', 10);
172
-    $travel_data   = flt_travel_data($user, $planetrow, array('galaxy' => $galaxy, 'system' => $system, 'planet' => $planet), $fleetarray, $speed_percent);
173
-
174
-//    $fleet_speed   = flt_fleet_speed($user, $fleetarray);
175
-    $fleet_speed   = $travel_data['fleet_speed'];
176
-    $distance      = $travel_data['distance'];
177
-    $duration      = $travel_data['duration'];
178
-    $consumption   = $travel_data['consumption'];
179
-  // No Break
180
-
181
-  case 1:
182
-    if ($galaxy && $system && $planet) {
183
-      $check_type = $planet_type == PT_MOON ? PT_MOON : PT_PLANET;
184
-
185
-      $TargetPlanet = DBStaticPlanet::db_planet_by_gspt($galaxy, $system, $planet, $check_type);
186
-    }
187
-
188
-  case 0:
189
-    $template_result += array(
190
-      'thisgalaxy'      => $planetrow['galaxy'],
191
-      'thissystem'      => $planetrow['system'],
192
-      'thisplanet'      => $planetrow['planet'],
193
-      'thisplanet_type' => $planetrow['planet_type'],
194
-    );
195
-  // no break
158
+
159
+      if (!$target_mission && is_array($missiontype)) {
160
+        $target_mission = MT_ATTACK;
161
+      }
162
+
163
+  //    $sn_group_missions = sn_get_groups('missions');
164
+  //    foreach($sn_group_missions as $mission_id => $cork) {
165
+  //      $missiontype[$mission_id] = $lang['type_mission'][$mission_id];
166
+  //    }
167
+  //
168
+  //
169
+      ksort($missiontype);
170
+
171
+      $speed_percent = sys_get_param_int('speed', 10);
172
+      $travel_data   = flt_travel_data($user, $planetrow, array('galaxy' => $galaxy, 'system' => $system, 'planet' => $planet), $fleetarray, $speed_percent);
173
+
174
+  //    $fleet_speed   = flt_fleet_speed($user, $fleetarray);
175
+      $fleet_speed   = $travel_data['fleet_speed'];
176
+      $distance      = $travel_data['distance'];
177
+      $duration      = $travel_data['duration'];
178
+      $consumption   = $travel_data['consumption'];
179
+    // No Break
180
+
181
+    case 1:
182
+      if ($galaxy && $system && $planet) {
183
+        $check_type = $planet_type == PT_MOON ? PT_MOON : PT_PLANET;
184
+
185
+        $TargetPlanet = DBStaticPlanet::db_planet_by_gspt($galaxy, $system, $planet, $check_type);
186
+      }
187
+
188
+    case 0:
189
+      $template_result += array(
190
+        'thisgalaxy'      => $planetrow['galaxy'],
191
+        'thissystem'      => $planetrow['system'],
192
+        'thisplanet'      => $planetrow['planet'],
193
+        'thisplanet_type' => $planetrow['planet_type'],
194
+      );
195
+    // no break
196 196
 
197 197
 }
198 198
 
@@ -214,35 +214,35 @@  discard block
 block discarded – undo
214 214
 }
215 215
 
216 216
 switch($fleet_page) {
217
-  case 1:
218
-    require('includes/includes/flt_page1.inc');
219
-  break;
220
-
221
-  case 2:
222
-    require_once('includes/includes/flt_page2.inc');
223
-    sn_fleet_page2();
224
-  break;
225
-
226
-  case 3:
227
-    require_once('includes/includes/flt_page3.inc');
228
-    sn_fleet_page3();
229
-  break;
230
-
231
-  case 4:
232
-    require('includes/includes/flt_page4.inc');
233
-  break;
234
-
235
-  case 5:
236
-    $template = SnTemplate::gettemplate('fleet5', true);
237
-    $pageFleet5Gathering = new \Pages\Deprecated\PageFleet5Gathering();
238
-    $pageFleet5Gathering->modelFleet5Gathering($user, $planetrow, $template);
239
-    // Building list of own planets & moons
240
-    $pageFleet5Gathering->viewPage5Gathering($user, $planetrow, $template);
241
-  break;
242
-
243
-  default:
244
-    define('SN_RENDER_NAVBAR_PLANET', true);
245
-
246
-    require('includes/includes/flt_page0.inc');
247
-  break;
217
+    case 1:
218
+      require('includes/includes/flt_page1.inc');
219
+    break;
220
+
221
+    case 2:
222
+      require_once('includes/includes/flt_page2.inc');
223
+      sn_fleet_page2();
224
+    break;
225
+
226
+    case 3:
227
+      require_once('includes/includes/flt_page3.inc');
228
+      sn_fleet_page3();
229
+    break;
230
+
231
+    case 4:
232
+      require('includes/includes/flt_page4.inc');
233
+    break;
234
+
235
+    case 5:
236
+      $template = SnTemplate::gettemplate('fleet5', true);
237
+      $pageFleet5Gathering = new \Pages\Deprecated\PageFleet5Gathering();
238
+      $pageFleet5Gathering->modelFleet5Gathering($user, $planetrow, $template);
239
+      // Building list of own planets & moons
240
+      $pageFleet5Gathering->viewPage5Gathering($user, $planetrow, $template);
241
+    break;
242
+
243
+    default:
244
+      define('SN_RENDER_NAVBAR_PLANET', true);
245
+
246
+      require('includes/includes/flt_page0.inc');
247
+    break;
248 248
 }
Please login to merge, or discard this patch.
admin/adm_log_main.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -21,12 +21,10 @@  discard block
 block discarded – undo
21 21
 if($delete = sys_get_param_id('delete'))
22 22
 {
23 23
   doquery("DELETE FROM `{{logs}}` WHERE `log_id` = {$delete} LIMIT 1;");
24
-}
25
-elseif(sys_get_param_str('delete_update_info'))
24
+} elseif(sys_get_param_str('delete_update_info'))
26 25
 {
27 26
   doquery("DELETE FROM `{{logs}}` WHERE `log_code` in (103, 180, 191);");
28
-}
29
-elseif(sys_get_param_str('deleteall') == 'yes')
27
+} elseif(sys_get_param_str('deleteall') == 'yes')
30 28
 {
31 29
 //  doquery("TRUNCATE TABLE `{{logs}}`");
32 30
 }
@@ -50,8 +48,7 @@  discard block
 block discarded – undo
50 48
     }
51 49
   }
52 50
   $template->assign_vars($errorInfo);
53
-}
54
-else
51
+} else
55 52
 {
56 53
   $template = SnTemplate::gettemplate('admin/adm_log_main', true);
57 54
 
Please login to merge, or discard this patch.
admin/statbuilder.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,8 +37,7 @@
 block discarded – undo
37 37
   </script>';
38 38
 
39 39
   SnTemplate::messageBoxAdmin("{$script}<img src=\"design/images/progressbar.gif\"><br>{$lang['sys_wait']}", $lang['adm_stat_title'], '', 0);
40
-}
41
-else
40
+} else
42 41
 {
43 42
   SnTemplate::messageBoxAdmin($lang['adm_stat_already_started'], $lang['adm_stat_title'], 'admin/overview.php');
44 43
 }
Please login to merge, or discard this patch.
admin/adm_user_stat.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,8 +13,7 @@
 block discarded – undo
13 13
 require('../common.' . substr(strrchr(__FILE__, '.'), 1));
14 14
 
15 15
 
16
-function admin_date_sort($a, $b)
17
-{
16
+function admin_date_sort($a, $b) {
18 17
   return $a['DATE'] == $b['DATE'] ? 0 : ($a['DATE'] > $b['DATE'] ? 1 : -1);
19 18
 }
20 19
 
Please login to merge, or discard this patch.
language/en/alliance.mo.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,9 @@
 block discarded – undo
26 26
 * DO NOT CHANGE
27 27
 */
28 28
 
29
-if (!defined('INSIDE')) die();
29
+if (!defined('INSIDE')) {
30
+  die();
31
+}
30 32
 
31 33
 
32 34
 $a_lang_array = [
Please login to merge, or discard this patch.
language/en/options.mo.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,9 @@
 block discarded – undo
25 25
 * DO NOT CHANGE
26 26
 */
27 27
 
28
-if (!defined('INSIDE')) die();
28
+if (!defined('INSIDE')) {
29
+  die();
30
+}
29 31
 
30 32
 $a_lang_array = [
31 33
   'opt_account' => 'Account',
Please login to merge, or discard this patch.
language/en/messages.mo.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,9 @@
 block discarded – undo
25 25
 * DO NOT CHANGE
26 26
 */
27 27
 
28
-if (!defined('INSIDE')) die();
28
+if (!defined('INSIDE')) {
29
+  die();
30
+}
29 31
 
30 32
 $a_lang_array = [
31 33
   'msg_page_header' => 'Personal messages',
Please login to merge, or discard this patch.
language/ru/options.mo.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,9 @@
 block discarded – undo
24 24
 * DO NOT CHANGE
25 25
 */
26 26
 
27
-if (!defined('INSIDE')) die();
27
+if (!defined('INSIDE')) {
28
+  die();
29
+}
28 30
 
29 31
 $a_lang_array = [
30 32
   'opt_account' => 'Профиль',
Please login to merge, or discard this patch.