Completed
Branch master (ab4e85)
by SuperNova.WS
04:58
created
admin/banned.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -54,15 +54,13 @@
 block discarded – undo
54 54
     }
55 55
 
56 56
     $DoneMessage .= $lang['adm_bn_plnt'];
57
-  }
58
-  else
57
+  } else
59 58
   {
60 59
     $DoneMessage = sprintf($lang['adm_bn_errr'], $name_output);
61 60
   }
62 61
 
63 62
   AdminMessage($DoneMessage, $lang['adm_ban_title']);
64
-}
65
-elseif($mode == 'unbanit' && $action)
63
+} elseif($mode == 'unbanit' && $action)
66 64
 {
67 65
   sys_admin_player_ban_unset($user, $player_banned_row, ($reason = sys_get_param_str('why')) ? $reason : $lang['sys_unbanned']);
68 66
 
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
@@ -22,12 +22,10 @@  discard block
 block discarded – undo
22 22
 if($delete = sys_get_param_id('delete'))
23 23
 {
24 24
   doquery("DELETE FROM `{{logs}}` WHERE `log_id` = {$delete} LIMIT 1;");
25
-}
26
-elseif(sys_get_param_str('delete_update_info'))
25
+} elseif(sys_get_param_str('delete_update_info'))
27 26
 {
28 27
   doquery("DELETE FROM `{{logs}}` WHERE `log_code` in (103, 180, 191);");
29
-}
30
-elseif(sys_get_param_str('deleteall') == 'yes')
28
+} elseif(sys_get_param_str('deleteall') == 'yes')
31 29
 {
32 30
 //  doquery("TRUNCATE TABLE `{{logs}}`");
33 31
 }
@@ -51,8 +49,7 @@  discard block
 block discarded – undo
51 49
     }
52 50
   }
53 51
   $template->assign_vars($errorInfo);
54
-}
55
-else
52
+} else
56 53
 {
57 54
   $template = gettemplate('admin/adm_log_main', true);
58 55
 
Please login to merge, or discard this patch.
admin/adm_message_list.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,8 +72,7 @@
 block discarded – undo
72 72
 if(sys_get_param('page_prev') && $int_page_current > 1)
73 73
 {
74 74
   $int_page_current--;
75
-}
76
-elseif(sys_get_param('page_next') && $int_page_current < $page_max)
75
+} elseif(sys_get_param('page_next') && $int_page_current < $page_max)
77 76
 {
78 77
   $int_page_current++;
79 78
 }
Please login to merge, or discard this patch.
admin/admin_chat.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,8 +29,7 @@
 block discarded – undo
29 29
 if ($delete)
30 30
 {
31 31
   doquery("DELETE FROM {{chat}} WHERE `messageid`={$delete};");
32
-}
33
-elseif ($deleteall == 'yes')
32
+} elseif ($deleteall == 'yes')
34 33
 {
35 34
   doquery("DELETE FROM {{chat}};");
36 35
 }
Please login to merge, or discard this patch.
admin/messall.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,11 +41,12 @@
 block discarded – undo
41 41
     $Subject = '<font color="'. $kolor .'">'. $config->temat ."</font>";
42 42
     $Message = '<font color="'. $kolor .'"><b>'. $config->tresc ."</b></font>";
43 43
     $sq      = db_user_list('', false, 'id');
44
-    foreach($sq as $u)
45
-    // while ($u = db_fetch($sq))
44
+    foreach($sq as $u) {
45
+        // while ($u = db_fetch($sq))
46 46
     {
47 47
       msg_send_simple_message ($u['id'], $user['id'], $Time, MSG_TYPE_ADMIN, $From, $Subject, $Message);
48 48
     }
49
+    }
49 50
     message("<font color=\"lime\">Херня на польском</font>", "Complete", "../overview." . PHP_EX, 3);
50 51
   }
51 52
 } else {
Please login to merge, or discard this patch.
artifacts.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -48,13 +48,11 @@
 block discarded – undo
48 48
           header("Location: artifacts.php#{$unit_id}");
49 49
           ob_end_flush();
50 50
           die();
51
-        }
52
-        else
51
+        } else
53 52
         {
54 53
           $Message = $lang['off_maxed_out'];
55 54
         }
56
-      }
57
-      else
55
+      } else
58 56
       {
59 57
         $Message = $lang['sys_no_points'];
60 58
       }
Please login to merge, or discard this patch.
docs/txt2html.php 1 patch
Braces   +22 added lines, -26 removed lines patch added patch discarded remove patch
@@ -2,7 +2,9 @@  discard block
 block discarded – undo
2 2
 
3 3
 function dump($value,$varname = "",$level=0,$dumper = "")
4 4
 {
5
-  if ($varname) $varname .= " = ";
5
+  if ($varname) {
6
+    $varname .= " = ";
7
+  }
6 8
 
7 9
   if ($level==-1)
8 10
   {
@@ -13,7 +15,9 @@  discard block
 block discarded – undo
13 15
     $trans["\0"]='&oplus;';
14 16
     return strtr(htmlspecialchars($value),$trans);
15 17
   }
16
-  if ($level==0) $dumper = '<pre>' . $varname;
18
+  if ($level==0) {
19
+    $dumper = '<pre>' . $varname;
20
+  }
17 21
 
18 22
   $type = gettype($value);
19 23
   $dumper .= $type;
@@ -22,9 +26,9 @@  discard block
 block discarded – undo
22 26
   {
23 27
     $dumper .= '('.strlen($value).')';
24 28
     $value = dump($value,"",-1);
25
-  }
26
-  elseif ($type=='boolean') $value= ($value?'true':'false');
27
-  elseif ($type=='object')
29
+  } elseif ($type=='boolean') {
30
+    $value= ($value?'true':'false');
31
+  } elseif ($type=='object')
28 32
   {
29 33
     $props= get_class_vars(get_class($value));
30 34
     $dumper .= '('.count($props).') <u>'.get_class($value).'</u>';
@@ -34,8 +38,7 @@  discard block
 block discarded – undo
34 38
       $dumper .= dump($value->$key,"",$level+1);
35 39
     }
36 40
     $value= '';
37
-  }
38
-  elseif ($type=='array')
41
+  } elseif ($type=='array')
39 42
   {
40 43
     $dumper .= '('.count($value).')';
41 44
     foreach($value as $key=>$val)
@@ -46,7 +49,9 @@  discard block
 block discarded – undo
46 49
     $value= '';
47 50
   }
48 51
   $dumper .= " <b>$value</b>";
49
-  if ($level==0) $dumper .= '</pre>';
52
+  if ($level==0) {
53
+    $dumper .= '</pre>';
54
+  }
50 55
   return $dumper;
51 56
 }
52 57
 
@@ -70,8 +75,7 @@  discard block
 block discarded – undo
70 75
 if(substr(getcwd(), -4) != 'docs')
71 76
 {
72 77
   $path_prefix = 'docs/';
73
-}
74
-else
78
+} else
75 79
 {
76 80
   $path_prefix = '';
77 81
 }
@@ -119,8 +123,7 @@  discard block
 block discarded – undo
119 123
       $buffer['name'] = $chapter[0];
120 124
     }
121 125
     $prev_chapter_is_header = true;
122
-  }
123
-  else
126
+  } else
124 127
   {
125 128
     $prev_chapter_is_header = false;
126 129
     foreach($chapter as &$note)
@@ -150,8 +153,7 @@  discard block
 block discarded – undo
150 153
           if(!isset($note_out['name']))
151 154
           {
152 155
             $note_out['name'] = $buf_str;
153
-          }
154
-          else
156
+          } else
155 157
           {
156 158
             $note_out['lines'][] = $buf_str;
157 159
           }
@@ -228,36 +230,31 @@  discard block
 block discarded – undo
228 230
             if($matches[2])
229 231
             {
230 232
               buf_print("<ol>\r\n");
231
-            }
232
-            else
233
+            } else
233 234
             {
234 235
               buf_print("<ul>\r\n");
235 236
             }
236 237
             buf_print('<li>');
237 238
             $last_spaces = $matches[1];
238 239
             $depth[] = $matches[2];
239
-          }
240
-          elseif(strlen($matches[1]) < strlen($last_spaces) && count($depth))
240
+          } elseif(strlen($matches[1]) < strlen($last_spaces) && count($depth))
241 241
           {
242 242
             if(array_pop($depth))
243 243
             {
244 244
               buf_print("</ol>\r\n");
245
-            }
246
-            else
245
+            } else
247 246
             {
248 247
               buf_print("</ul>\r\n");
249 248
             }
250 249
             $last_spaces = $matches[1];
251 250
             buf_print('<li>');
252
-          }
253
-          elseif(strlen($last_spaces) == strlen($matches[1]))
251
+          } elseif(strlen($last_spaces) == strlen($matches[1]))
254 252
           {
255 253
             if($matches[2] == '' && $depth[count($depth) - 1] != '')
256 254
             {
257 255
               buf_print("</ol>\r\n");
258 256
               buf_print("<ul>\r\n");
259
-            }
260
-            elseif($matches[2] != '' && $depth[count($depth) - 1] == '')
257
+            } elseif($matches[2] != '' && $depth[count($depth) - 1] == '')
261 258
             {
262 259
               buf_print("</ul>\r\n");
263 260
               buf_print("<ol>\r\n");
@@ -274,8 +271,7 @@  discard block
 block discarded – undo
274 271
         if(array_pop($depth))
275 272
         {
276 273
           buf_print("</ol>\r\n");
277
-        }
278
-        else
274
+        } else
279 275
         {
280 276
           buf_print("</ul>\r\n");
281 277
         }
Please login to merge, or discard this patch.
language/ru/announce.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
 
30 32
 $a_lang_array = (array(
Please login to merge, or discard this patch.
galaxy.php 1 patch
Braces   +7 added lines, -10 removed lines patch added patch discarded remove patch
@@ -79,11 +79,12 @@  discard block
 block discarded – undo
79 79
 
80 80
 $planet_precache_query = db_planet_list_in_system($uni_galaxy, $uni_system);
81 81
 // while($planet_row = db_fetch($planet_precache_query))
82
-if(!empty($planet_precache_query))
83
-foreach($planet_precache_query as $planet_row)
82
+if(!empty($planet_precache_query)) {
83
+  foreach($planet_precache_query as $planet_row)
84 84
 {
85 85
   $planet_list[$planet_row['planet']][$planet_row['planet_type']] = $planet_row;
86 86
 }
87
+}
87 88
 
88 89
 
89 90
 $fleet_precache_query = doquery(
@@ -132,14 +133,12 @@  discard block
 block discarded – undo
132 133
   if ($uni_galaxyRowPlanet['destruyed'])
133 134
   {
134 135
     CheckAbandonPlanetState ($uni_galaxyRowPlanet);
135
-  }
136
-  elseif($uni_galaxyRowPlanet['id'])
136
+  } elseif($uni_galaxyRowPlanet['id'])
137 137
   {
138 138
     if($cached['users'][$uni_galaxyRowPlanet['id_owner']])
139 139
     {
140 140
       $uni_galaxyRowUser = $cached['users'][$uni_galaxyRowPlanet['id_owner']];
141
-    }
142
-    else
141
+    } else
143 142
     {
144 143
       $uni_galaxyRowUser = db_user_by_id($uni_galaxyRowPlanet['id_owner']);
145 144
       $cached['users'][$uni_galaxyRowUser['id']] = $uni_galaxyRowUser;
@@ -161,8 +160,7 @@  discard block
 block discarded – undo
161 160
         if($cached['allies'][$uni_galaxyRowUser['ally_id']])
162 161
         {
163 162
           $allyquery = $cached['allies'][$uni_galaxyRowUser['ally_id']];
164
-        }
165
-        else
163
+        } else
166 164
         {
167 165
           $allyquery = doquery("SELECT * FROM `{{alliance}}` WHERE `id` = '{$uni_galaxyRowUser['ally_id']}';", '', true);
168 166
           $cached['allies'][$uni_galaxyRowUser['ally_id']] = $allyquery;
@@ -181,8 +179,7 @@  discard block
 block discarded – undo
181 179
       if ($uni_galaxyRowMoon['destruyed'])
182 180
       {
183 181
         CheckAbandonPlanetState($uni_galaxyRowMoon);
184
-      }
185
-      else
182
+      } else
186 183
       {
187 184
         $moon_fleet_id = 0;
188 185
         $fleets_to_planet = flt_get_fleets_to_planet(false, $fleet_list[$Planet][PT_MOON]);
Please login to merge, or discard this patch.