Passed
Pull Request — master (#322)
by Mirko
08:41
created
htdocs/translate.php 1 patch
Switch Indentation   +100 added lines, -100 removed lines patch added patch discarded remove patch
@@ -86,69 +86,69 @@  discard block
 block discarded – undo
86 86
 }
87 87
 
88 88
 switch ($action) {
89
-    case 'selectlang':
90
-        break;
89
+        case 'selectlang':
90
+            break;
91 91
 
92
-    case 'verify':
93
-        verify();
94
-        break;
92
+        case 'verify':
93
+            verify();
94
+            break;
95 95
 
96
-    case 'resetids':
97
-        resetIds();
98
-        break;
96
+        case 'resetids':
97
+            resetIds();
98
+            break;
99 99
 
100
-    case 'clearcache':
101
-        clearCache();
102
-        break;
100
+        case 'clearcache':
101
+            clearCache();
102
+            break;
103 103
 
104
-    case 'export':
105
-        export();
106
-        break;
104
+        case 'export':
105
+            export();
106
+            break;
107 107
 
108
-    case 'xmlexport':
109
-        xmlexport();
110
-        break;
108
+        case 'xmlexport':
109
+            xmlexport();
110
+            break;
111 111
 
112
-    case 'xmlimport':
113
-        break;
112
+        case 'xmlimport':
113
+            break;
114 114
 
115
-    case 'xmlimport2':
116
-        xmlimport2();
117
-        break;
115
+        case 'xmlimport2':
116
+            xmlimport2();
117
+            break;
118 118
 
119
-    case 'xmlimport3':
120
-        xmlimport3();
121
-        break;
119
+        case 'xmlimport3':
120
+            xmlimport3();
121
+            break;
122 122
 
123
-    case 'textexportnew':
124
-        textexport($translang, false);
125
-        break;
123
+        case 'textexportnew':
124
+            textexport($translang, false);
125
+            break;
126 126
 
127
-    case 'textexportall':
128
-        textexport($translang, true);
129
-        break;
127
+        case 'textexportall':
128
+            textexport($translang, true);
129
+            break;
130 130
 
131
-    case 'textimport':
132
-        break;
131
+        case 'textimport':
132
+            break;
133 133
 
134
-    case 'textimport2':
135
-        textimport($translang);
136
-        break;
134
+        case 'textimport2':
135
+            textimport($translang);
136
+            break;
137 137
 
138
-    case 'edit':
139
-        if (!$access->mayTranslate($translang)) {
140
-            $tpl->error(ERROR_NO_ACCESS);
141
-        }
142
-        edit();
143
-        break;
138
+        case 'edit':
139
+            if (!$access->mayTranslate($translang)) {
140
+                $tpl->error(ERROR_NO_ACCESS);
141
+            }
142
+            edit();
143
+            break;
144 144
 
145
-    case 'copy_en':
146
-        copy_english_texts();
147
-        break;
145
+        case 'copy_en':
146
+            copy_english_texts();
147
+            break;
148 148
 
149
-    case 'listfaults':
150
-        $trans = sql(
151
-            "SELECT
149
+        case 'listfaults':
150
+            $trans = sql(
151
+                "SELECT
152 152
                 `sys_trans`.`id`,
153 153
                 `sys_trans`.`text`
154 154
              FROM `sys_trans`
@@ -156,14 +156,14 @@  discard block
 block discarded – undo
156 156
                 ON `sys_trans`.`id`=`sys_trans_ref`.`trans_id`
157 157
              WHERE ISNULL(`sys_trans_ref`.`trans_id`)
158 158
              ORDER BY `sys_trans`.`id` DESC"
159
-        );
160
-        $tpl->assign_rs('trans', $trans);
161
-        sql_free_result($trans);
162
-        break;
159
+            );
160
+            $tpl->assign_rs('trans', $trans);
161
+            sql_free_result($trans);
162
+            break;
163 163
 
164
-    case 'listall':
165
-        $trans = sql(
166
-            "SELECT
164
+        case 'listall':
165
+            $trans = sql(
166
+                "SELECT
167 167
                 `sys_trans`.`id`,
168 168
                 `sys_trans`.`text`,
169 169
                 `sys_trans_text`.`text` AS `trans`
@@ -172,48 +172,48 @@  discard block
 block discarded – undo
172 172
                 ON `sys_trans`.`id`=`sys_trans_text`.`trans_id`
173 173
                 AND `sys_trans_text`.`lang`='&1'
174 174
              ORDER BY `sys_trans`.`id` DESC",
175
-            $translang
176
-        );
177
-        $tpl->assign_rs('trans', $trans);
178
-        sql_free_result($trans);
179
-        break;
175
+                $translang
176
+            );
177
+            $tpl->assign_rs('trans', $trans);
178
+            sql_free_result($trans);
179
+            break;
180 180
 
181
-    case 'remove':
182
-        if (!$access->mayTranslate($translang)) {
183
-            $tpl->error(ERROR_NO_ACCESS);
184
-        }
185
-        remove();
186
-        break;
187
-
188
-    case 'scan':
189
-        scan();
190
-        break;
191
-
192
-    case 'scanstart':
193
-        scanStart();
194
-        break;
195
-
196
-    case 'scanfile':
197
-        $filename = isset($_REQUEST['filename']) ? $_REQUEST['filename'] : '';
198
-        scanFile($filename);
199
-        exit;
200
-
201
-    case 'quicknone':
202
-        $cookie->un_set('translate_mode');
203
-        break;
204
-
205
-    case 'quicknew':
206
-        $cookie->set('translate_mode', 'new');
207
-        break;
208
-
209
-    case 'quickall':
210
-        $cookie->set('translate_mode', 'all');
211
-        break;
212
-
213
-    default:
214
-        $action = 'listnew';
215
-        $trans = sql(
216
-            "SELECT DISTINCT
181
+        case 'remove':
182
+            if (!$access->mayTranslate($translang)) {
183
+                $tpl->error(ERROR_NO_ACCESS);
184
+            }
185
+            remove();
186
+            break;
187
+
188
+        case 'scan':
189
+            scan();
190
+            break;
191
+
192
+        case 'scanstart':
193
+            scanStart();
194
+            break;
195
+
196
+        case 'scanfile':
197
+            $filename = isset($_REQUEST['filename']) ? $_REQUEST['filename'] : '';
198
+            scanFile($filename);
199
+            exit;
200
+
201
+        case 'quicknone':
202
+            $cookie->un_set('translate_mode');
203
+            break;
204
+
205
+        case 'quicknew':
206
+            $cookie->set('translate_mode', 'new');
207
+            break;
208
+
209
+        case 'quickall':
210
+            $cookie->set('translate_mode', 'all');
211
+            break;
212
+
213
+        default:
214
+            $action = 'listnew';
215
+            $trans = sql(
216
+                "SELECT DISTINCT
217 217
                 `sys_trans`.`id`,
218 218
                 `sys_trans`.`text`
219 219
              FROM `sys_trans`
@@ -224,10 +224,10 @@  discard block
 block discarded – undo
224 224
                 ON `sys_trans`.`id`=`sys_trans_ref`.`trans_id`
225 225
              WHERE ISNULL(`sys_trans_text`.`trans_id`) OR `sys_trans_text`.`text`=''
226 226
              ORDER BY `sys_trans`.`id` DESC",
227
-            $translang
228
-        );
229
-        $tpl->assign_rs('trans', $trans);
230
-        sql_free_result($trans);
227
+                $translang
228
+            );
229
+            $tpl->assign_rs('trans', $trans);
230
+            sql_free_result($trans);
231 231
 }
232 232
 
233 233
 $languages = [];
Please login to merge, or discard this patch.
htdocs/lib2/Net/IDNA2.php 2 patches
Switch Indentation   +79 added lines, -79 removed lines patch added patch discarded remove patch
@@ -2273,38 +2273,38 @@  discard block
 block discarded – undo
2273 2273
 
2274 2274
         foreach ($option as $k => $v) {
2275 2275
             switch ($k) {
2276
-            case 'encoding':
2277
-                switch ($v) {
2278
-                case 'utf8':
2279
-                case 'ucs4_string':
2280
-                case 'ucs4_array':
2281
-                    $this->_api_encoding = $v;
2282
-                    break;
2276
+                case 'encoding':
2277
+                    switch ($v) {
2278
+                        case 'utf8':
2279
+                        case 'ucs4_string':
2280
+                        case 'ucs4_array':
2281
+                            $this->_api_encoding = $v;
2282
+                            break;
2283 2283
 
2284
-                default:
2285
-                    throw new InvalidArgumentException('Set Parameter: Unknown parameter '.$v.' for option '.$k);
2286
-                }
2284
+                        default:
2285
+                            throw new InvalidArgumentException('Set Parameter: Unknown parameter '.$v.' for option '.$k);
2286
+                    }
2287 2287
 
2288 2288
                 break;
2289 2289
 
2290
-            case 'overlong':
2291
-                $this->_allow_overlong = ($v) ? true : false;
2292
-                break;
2290
+                case 'overlong':
2291
+                    $this->_allow_overlong = ($v) ? true : false;
2292
+                    break;
2293 2293
 
2294
-            case 'strict':
2295
-                $this->_strict_mode = ($v) ? true : false;
2296
-                break;
2294
+                case 'strict':
2295
+                    $this->_strict_mode = ($v) ? true : false;
2296
+                    break;
2297 2297
 
2298
-            case 'version':
2299
-                if (in_array($v, array('2003', '2008'))) {
2300
-                    $this->_version = $v;
2301
-                } else {
2302
-                    throw new InvalidArgumentException('Set Parameter: Invalid parameter '.$v.' for option '.$k);
2303
-                }
2304
-                break;
2298
+                case 'version':
2299
+                    if (in_array($v, array('2003', '2008'))) {
2300
+                        $this->_version = $v;
2301
+                    } else {
2302
+                        throw new InvalidArgumentException('Set Parameter: Invalid parameter '.$v.' for option '.$k);
2303
+                    }
2304
+                    break;
2305 2305
 
2306
-            default:
2307
-                return false;
2306
+                default:
2307
+                    return false;
2308 2308
             }
2309 2309
         }
2310 2310
 
@@ -2328,15 +2328,15 @@  discard block
 block discarded – undo
2328 2328
         // Forcing conversion of input to UCS4 array
2329 2329
         // If one time encoding is given, use this, else the objects property
2330 2330
         switch (($one_time_encoding) ? $one_time_encoding : $this->_api_encoding) {
2331
-        case 'utf8':
2332
-            $decoded = $this->_utf8_to_ucs4($decoded);
2333
-            break;
2334
-        case 'ucs4_string':
2335
-            $decoded = $this->_ucs4_string_to_ucs4($decoded);
2336
-        case 'ucs4_array': // No break; before this line. Catch case, but do nothing
2337
-            break;
2338
-        default:
2339
-            throw new InvalidArgumentException('Unsupported input format');
2331
+            case 'utf8':
2332
+                $decoded = $this->_utf8_to_ucs4($decoded);
2333
+                break;
2334
+            case 'ucs4_string':
2335
+                $decoded = $this->_ucs4_string_to_ucs4($decoded);
2336
+            case 'ucs4_array': // No break; before this line. Catch case, but do nothing
2337
+                break;
2338
+            default:
2339
+                throw new InvalidArgumentException('Unsupported input format');
2340 2340
         }
2341 2341
 
2342 2342
         // No input, no output, what else did you expect?
@@ -2350,35 +2350,35 @@  discard block
 block discarded – undo
2350 2350
         foreach ($decoded as $k => $v) {
2351 2351
             // Make sure to use just the plain dot
2352 2352
             switch($v) {
2353
-            case 0x3002:
2354
-            case 0xFF0E:
2355
-            case 0xFF61:
2356
-                $decoded[$k] = 0x2E;
2357
-                // It's right, no break here
2358
-                // The codepoints above have to be converted to dots anyway
2359
-
2360
-            // Stumbling across an anchoring character
2361
-            case 0x2E:
2362
-            case 0x2F:
2363
-            case 0x3A:
2364
-            case 0x3F:
2365
-            case 0x40:
2366
-                // Neither email addresses nor URLs allowed in strict mode
2367
-                if ($this->_strict_mode) {
2368
-                    throw new InvalidArgumentException('Neither email addresses nor URLs are allowed in strict mode.');
2369
-                }
2370
-                // Skip first char
2371
-                if ($k) {
2372
-                    $encoded = '';
2373
-                    $encoded = $this->_encode(array_slice($decoded, $last_begin, (($k)-$last_begin)));
2374
-                    if ($encoded) {
2375
-                        $output .= $encoded;
2376
-                    } else {
2377
-                        $output .= $this->_ucs4_to_utf8(array_slice($decoded, $last_begin, (($k)-$last_begin)));
2353
+                case 0x3002:
2354
+                case 0xFF0E:
2355
+                case 0xFF61:
2356
+                    $decoded[$k] = 0x2E;
2357
+                    // It's right, no break here
2358
+                    // The codepoints above have to be converted to dots anyway
2359
+
2360
+                // Stumbling across an anchoring character
2361
+                case 0x2E:
2362
+                case 0x2F:
2363
+                case 0x3A:
2364
+                case 0x3F:
2365
+                case 0x40:
2366
+                    // Neither email addresses nor URLs allowed in strict mode
2367
+                    if ($this->_strict_mode) {
2368
+                        throw new InvalidArgumentException('Neither email addresses nor URLs are allowed in strict mode.');
2378 2369
                     }
2379
-                    $output .= chr($decoded[$k]);
2380
-                }
2381
-                $last_begin = $k + 1;
2370
+                    // Skip first char
2371
+                    if ($k) {
2372
+                        $encoded = '';
2373
+                        $encoded = $this->_encode(array_slice($decoded, $last_begin, (($k)-$last_begin)));
2374
+                        if ($encoded) {
2375
+                            $output .= $encoded;
2376
+                        } else {
2377
+                            $output .= $this->_ucs4_to_utf8(array_slice($decoded, $last_begin, (($k)-$last_begin)));
2378
+                        }
2379
+                        $output .= chr($decoded[$k]);
2380
+                    }
2381
+                    $last_begin = $k + 1;
2382 2382
             }
2383 2383
         }
2384 2384
         // Catch the rest of the string
@@ -2416,12 +2416,12 @@  discard block
 block discarded – undo
2416 2416
         // Optionally set
2417 2417
         if ($one_time_encoding) {
2418 2418
             switch ($one_time_encoding) {
2419
-            case 'utf8':
2420
-            case 'ucs4_string':
2421
-            case 'ucs4_array':
2422
-                break;
2423
-            default:
2424
-                throw new InvalidArgumentException('Unknown encoding '.$one_time_encoding);
2419
+                case 'utf8':
2420
+                case 'ucs4_string':
2421
+                case 'ucs4_array':
2422
+                    break;
2423
+                default:
2424
+                    throw new InvalidArgumentException('Unknown encoding '.$one_time_encoding);
2425 2425
             }
2426 2426
         }
2427 2427
         // Make sure to drop any newline characters around
@@ -2473,17 +2473,17 @@  discard block
 block discarded – undo
2473 2473
         // The output is UTF-8 by default, other output formats need conversion here
2474 2474
         // If one time encoding is given, use this, else the objects property
2475 2475
         switch (($one_time_encoding) ? $one_time_encoding : $this->_api_encoding) {
2476
-        case 'utf8':
2477
-            return $return;
2478
-            break;
2479
-        case 'ucs4_string':
2480
-            return $this->_ucs4_to_ucs4_string($this->_utf8_to_ucs4($return));
2481
-            break;
2482
-        case 'ucs4_array':
2483
-            return $this->_utf8_to_ucs4($return);
2484
-            break;
2485
-        default:
2486
-            throw new InvalidArgumentException('Unsupported output format');
2476
+            case 'utf8':
2477
+                return $return;
2478
+                break;
2479
+            case 'ucs4_string':
2480
+                return $this->_ucs4_to_ucs4_string($this->_utf8_to_ucs4($return));
2481
+                break;
2482
+            case 'ucs4_array':
2483
+                return $this->_utf8_to_ucs4($return);
2484
+                break;
2485
+            default:
2486
+                throw new InvalidArgumentException('Unsupported output format');
2487 2487
         }
2488 2488
     }
2489 2489
 
Please login to merge, or discard this patch.
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -2340,7 +2340,9 @@  discard block
 block discarded – undo
2340 2340
         }
2341 2341
 
2342 2342
         // No input, no output, what else did you expect?
2343
-        if (empty($decoded)) return '';
2343
+        if (empty($decoded)) {
2344
+            return '';
2345
+        }
2344 2346
 
2345 2347
         // Anchors for iteration
2346 2348
         $last_begin = 0;
@@ -2438,7 +2440,9 @@  discard block
 block discarded – undo
2438 2440
             $arr = explode('.', $input);
2439 2441
             foreach ($arr as $k => $v) {
2440 2442
                 $conv = $this->_decode($v);
2441
-                if ($conv) $arr[$k] = $conv;
2443
+                if ($conv) {
2444
+                    $arr[$k] = $conv;
2445
+                }
2442 2446
             }
2443 2447
             $return = $email_pref . '@' . join('.', $arr);
2444 2448
         } elseif (preg_match('![:\./]!', $input)) { // Or a complete domain name (with or without paths / parameters)
@@ -2452,7 +2456,9 @@  discard block
 block discarded – undo
2452 2456
                 $arr = explode('.', $parsed['host']);
2453 2457
                 foreach ($arr as $k => $v) {
2454 2458
                     $conv = $this->_decode($v);
2455
-                    if ($conv) $arr[$k] = $conv;
2459
+                    if ($conv) {
2460
+                        $arr[$k] = $conv;
2461
+                    }
2456 2462
                 }
2457 2463
                 $parsed['host'] = join('.', $arr);
2458 2464
                 if (isset($parsed['scheme'])) {
@@ -2463,7 +2469,9 @@  discard block
 block discarded – undo
2463 2469
                 $arr = explode('.', $input);
2464 2470
                 foreach ($arr as $k => $v) {
2465 2471
                     $conv = $this->_decode($v);
2466
-                    if ($conv) $arr[$k] = $conv;
2472
+                    if ($conv) {
2473
+                        $arr[$k] = $conv;
2474
+                    }
2467 2475
                 }
2468 2476
                 $return = join('.', $arr);
2469 2477
             }
Please login to merge, or discard this patch.
htdocs/lib2/imagebmp.inc.php 1 patch
Braces   +90 added lines, -48 removed lines patch added patch discarded remove patch
@@ -36,7 +36,9 @@  discard block
 block discarded – undo
36 36
 $IsTransparent=$Transparent!=-1;
37 37
 
38 38
 
39
-if($IsTransparent) $ColorCount--;
39
+if($IsTransparent) {
40
+    $ColorCount--;
41
+}
40 42
 
41 43
 if($ColorCount==0) {$ColorCount=0; $BitCount=24;};
42 44
 if(($ColorCount>0)and($ColorCount<=2)) {$ColorCount=2; $BitCount=1;};
@@ -49,7 +51,9 @@  discard block
 block discarded – undo
49 51
 
50 52
                 $Zbytek=(4-($Width/(8/$BitCount))%4)%4;
51 53
 
52
-                if($BitCount<24) $palsize=pow(2,$BitCount)*4;
54
+                if($BitCount<24) {
55
+                    $palsize=pow(2,$BitCount)*4;
56
+                }
53 57
 
54 58
                 $size=(floor($Width/(8/$BitCount))+$Zbytek)*$Height+54;
55 59
                 $size+=$palsize;
@@ -76,11 +80,15 @@  discard block
 block discarded – undo
76 80
 
77 81
                 $CC=$ColorCount;
78 82
                 $sl1=strlen($ret);
79
-                if($CC==0) $CC=256;
83
+                if($CC==0) {
84
+                    $CC=256;
85
+                }
80 86
                 if($BitCount<24)
81 87
                    {
82 88
                     $ColorTotal=imagecolorstotal($img);
83
-                     if($IsTransparent) $ColorTotal--;
89
+                     if($IsTransparent) {
90
+                         $ColorTotal--;
91
+                     }
84 92
 
85 93
                      for($p=0;$p<$ColorTotal;$p++)
86 94
                      {
@@ -122,12 +130,14 @@  discard block
 block discarded – undo
122 130
   if((strlen($bWrite)<8)and(strlen($bWrite)!=0))
123 131
     {
124 132
      $sl=strlen($bWrite);
125
-     for($t=0;$t<8-$sl;$t++)
126
-      $sl.="0";
133
+     for($t=0;$t<8-$sl;$t++) {
134
+           $sl.="0";
135
+     }
127 136
      $retd.=inttobyte(bindec($bWrite));
128 137
     };
129
- for($z=0;$z<$Zbytek;$z++)
130
-   $retd.=inttobyte(0);
138
+ for($z=0;$z<$Zbytek;$z++) {
139
+    $retd.=inttobyte(0);
140
+ }
131 141
  };
132 142
 };
133 143
 
@@ -135,9 +145,10 @@  discard block
 block discarded – undo
135 145
 {
136 146
  for($t=0;$t<strlen($retd);$t+=4)
137 147
   {
138
-   if($t!=0)
139
-   if(($t)%$Width==0)
148
+   if($t!=0) {
149
+      if(($t)%$Width==0)
140 150
     $ret.=chr(0).chr(0);
151
+   }
141 152
 
142 153
    if(($t+5)%$Width==0)
143 154
    {
@@ -148,15 +159,13 @@  discard block
 block discarded – undo
148 159
     {
149 160
      $ret.=chr(0).chr(6).substr($retd,$t,6);
150 161
      $t+=2;
151
-    }
152
-    else
162
+    } else
153 163
     {
154 164
      $ret.=chr(0).chr(4).substr($retd,$t,4);
155 165
     };
156 166
   };
157 167
   $ret.=chr(0).chr(1);
158
-}
159
-else
168
+} else
160 169
 {
161 170
 $ret.=$retd;
162 171
 };
@@ -164,8 +173,9 @@  discard block
 block discarded – undo
164 173
 
165 174
                 if($BitCount==24)
166 175
                 {
167
-                for($z=0;$z<$Zbytek;$z++)
168
-                 $Dopl.=chr(0);
176
+                for($z=0;$z<$Zbytek;$z++) {
177
+                                 $Dopl.=chr(0);
178
+                }
169 179
 
170 180
                 for($y=$Height-1;$y>=0;$y--)
171 181
                  {
@@ -185,8 +195,7 @@  discard block
 block discarded – undo
185 195
     $r=$r and fwrite($f,$ret);
186 196
     $r=$r and fclose($f);
187 197
     return $r;
188
-   }
189
-  else
198
+   } else
190 199
   {
191 200
    echo $ret;
192 201
   };
@@ -259,17 +268,20 @@  discard block
 block discarded – undo
259 268
        imagesetpixel($img,$x,$y,$Palette[$C]);
260 269
       };
261 270
     if($CurrentBit!=0) {freadbyte($f);};
262
-    for($g=0;$g<$Zbytek;$g++)
263
-     freadbyte($f);
271
+    for($g=0;$g<$Zbytek;$g++) {
272
+         freadbyte($f);
273
+    }
264 274
      };
265 275
 
266 276
  };
267 277
 };
268 278
 
269 279
 
270
-if($RLECompression==1) //$BI_RLE8
280
+if($RLECompression==1) {
281
+    //$BI_RLE8
271 282
 {
272 283
 $y=$Height;
284
+}
273 285
 
274 286
 $pocetb=0;
275 287
 
@@ -282,9 +294,15 @@  discard block
 block discarded – undo
282 294
 
283 295
 $echoit=false;
284 296
 
285
-if($echoit)echo "Prefix: $prefix Suffix: $suffix<BR>";
286
-if(($prefix==0)and($suffix==1)) break;
287
-if(feof($f)) break;
297
+if($echoit) {
298
+    echo "Prefix: $prefix Suffix: $suffix<BR>";
299
+}
300
+if(($prefix==0)and($suffix==1)) {
301
+    break;
302
+}
303
+if(feof($f)) {
304
+    break;
305
+}
288 306
 
289 307
 while(!(($prefix==0)and($suffix==0)))
290 308
 {
@@ -298,14 +316,17 @@  discard block
 block discarded – undo
298 316
  if($prefix>0)
299 317
   {
300 318
    $pocet=$prefix;
301
-   for($r=0;$r<$pocet;$r++)
302
-    $Data.=chr($suffix);
319
+   for($r=0;$r<$pocet;$r++) {
320
+       $Data.=chr($suffix);
321
+   }
303 322
   };
304 323
  $prefix=freadbyte($f);
305 324
  $suffix=freadbyte($f);
306 325
  $pocetb+=2;
307
- if($echoit) echo "Prefix: $prefix Suffix: $suffix<BR>";
308
-};
326
+ if($echoit) {
327
+     echo "Prefix: $prefix Suffix: $suffix<BR>";
328
+ }
329
+ };
309 330
 
310 331
 for($x=0;$x<strlen($Data);$x++)
311 332
  {
@@ -318,9 +339,11 @@  discard block
 block discarded – undo
318 339
 };
319 340
 
320 341
 
321
-if($RLECompression==2) //$BI_RLE4
342
+if($RLECompression==2) {
343
+    //$BI_RLE4
322 344
 {
323 345
 $y=$Height;
346
+}
324 347
 $pocetb=0;
325 348
 
326 349
 /*while(!feof($f))
@@ -335,9 +358,15 @@  discard block
 block discarded – undo
335 358
 
336 359
 $echoit=false;
337 360
 
338
-if($echoit)echo "Prefix: $prefix Suffix: $suffix<BR>";
339
-if(($prefix==0)and($suffix==1)) break;
340
-if(feof($f)) break;
361
+if($echoit) {
362
+    echo "Prefix: $prefix Suffix: $suffix<BR>";
363
+}
364
+if(($prefix==0)and($suffix==1)) {
365
+    break;
366
+}
367
+if(feof($f)) {
368
+    break;
369
+}
341 370
 
342 371
 while(!(($prefix==0)and($suffix==0)))
343 372
 {
@@ -346,9 +375,12 @@  discard block
 block discarded – undo
346 375
    $pocet=$suffix;
347 376
 
348 377
    $CurrentBit=0;
349
-   for($h=0;$h<$pocet;$h++)
350
-    $Data.=chr(freadbits($f,4));
351
-   if($CurrentBit!=0) freadbits($f,4);
378
+   for($h=0;$h<$pocet;$h++) {
379
+       $Data.=chr(freadbits($f,4));
380
+   }
381
+   if($CurrentBit!=0) {
382
+       freadbits($f,4);
383
+   }
352 384
    $pocetb+=ceil(($pocet/2));
353 385
    if($pocetb%2==1) {freadbyte($f); $pocetb++;};
354 386
   };
@@ -361,8 +393,7 @@  discard block
 block discarded – undo
361 393
     if($i%2==0)
362 394
      {
363 395
       $Data.=chr($suffix%16);
364
-     }
365
-     else
396
+     } else
366 397
      {
367 398
       $Data.=chr(floor($suffix/16));
368 399
      };
@@ -372,8 +403,10 @@  discard block
 block discarded – undo
372 403
  $prefix=freadbyte($f);
373 404
  $suffix=freadbyte($f);
374 405
  $pocetb+=2;
375
- if($echoit) echo "Prefix: $prefix Suffix: $suffix<BR>";
376
-};
406
+ if($echoit) {
407
+     echo "Prefix: $prefix Suffix: $suffix<BR>";
408
+ }
409
+ };
377 410
 
378 411
 for($x=0;$x<strlen($Data);$x++)
379 412
  {
@@ -399,11 +432,14 @@  discard block
 block discarded – undo
399 432
        $G=freadbyte($f);
400 433
        $R=freadbyte($f);
401 434
        $color=imagecolorexact($img,$R,$G,$B);
402
-       if($color==-1) $color=imagecolorallocate($img,$R,$G,$B);
435
+       if($color==-1) {
436
+           $color=imagecolorallocate($img,$R,$G,$B);
437
+       }
403 438
        imagesetpixel($img,$x,$y,$color);
404 439
       }
405
-    for($z=0;$z<$Zbytek;$z++)
406
-     freadbyte($f);
440
+    for($z=0;$z<$Zbytek;$z++) {
441
+         freadbyte($f);
442
+    }
407 443
    };
408 444
 };
409 445
 return $img;
@@ -483,8 +519,7 @@  discard block
 block discarded – undo
483 519
  if($CurrentBit==8)
484 520
   {
485 521
    $CurrentBit=0;
486
-  }
487
- else
522
+  } else
488 523
   {
489 524
    fseek($f,ftell($f)-1);
490 525
   };
@@ -495,9 +530,15 @@  discard block
 block discarded – undo
495 530
 
496 531
 function RGBToHex($Red,$Green,$Blue)
497 532
   {
498
-   $hRed=dechex($Red);if(strlen($hRed)==1) $hRed="0$hRed";
499
-   $hGreen=dechex($Green);if(strlen($hGreen)==1) $hGreen="0$hGreen";
500
-   $hBlue=dechex($Blue);if(strlen($hBlue)==1) $hBlue="0$hBlue";
533
+   $hRed=dechex($Red);if(strlen($hRed)==1) {
534
+       $hRed="0$hRed";
535
+   }
536
+   $hGreen=dechex($Green);if(strlen($hGreen)==1) {
537
+       $hGreen="0$hGreen";
538
+   }
539
+   $hBlue=dechex($Blue);if(strlen($hBlue)==1) {
540
+       $hBlue="0$hBlue";
541
+   }
501 542
    return($hRed.$hGreen.$hBlue);
502 543
   };
503 544
 
@@ -520,8 +561,9 @@  discard block
 block discarded – undo
520 561
 {
521 562
 $bin=decbin($d);
522 563
 $sbin=strlen($bin);
523
-for($j=0;$j<$n-$sbin;$j++)
564
+for($j=0;$j<$n-$sbin;$j++) {
524 565
  $bin="0$bin";
566
+}
525 567
 return $bin;
526 568
 };
527 569
 
Please login to merge, or discard this patch.
htdocs/ignore.php 1 patch
Switch Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -29,12 +29,12 @@
 block discarded – undo
29 29
 }
30 30
 
31 31
 switch ($action) {
32
-    case 'addignore':
33
-        sql("INSERT IGNORE INTO `cache_ignore` (`cache_id`, `user_id`) VALUES ('&1', '&2')", $cache_id, $login->userid);
34
-        break;
35
-    case 'removeignore':
36
-        sql("DELETE FROM `cache_ignore` WHERE `cache_id`='&1' AND `user_id`='&2'", $cache_id, $login->userid);
37
-        break;
32
+        case 'addignore':
33
+            sql("INSERT IGNORE INTO `cache_ignore` (`cache_id`, `user_id`) VALUES ('&1', '&2')", $cache_id, $login->userid);
34
+            break;
35
+        case 'removeignore':
36
+            sql("DELETE FROM `cache_ignore` WHERE `cache_id`='&1' AND `user_id`='&2'", $cache_id, $login->userid);
37
+            break;
38 38
 }
39 39
 
40 40
 // clear cached map result, so that the change directly appears on the map
Please login to merge, or discard this patch.
htdocs/lang/de/ocstyle/main.tpl.php 1 patch
Braces   +10 added lines, -8 removed lines patch added patch discarded remove patch
@@ -145,10 +145,11 @@  discard block
 block discarded – undo
145 145
                         <td><strong>{t}Language:{/t}&nbsp;</strong></td>
146 146
                         <td>
147 147
 <?php
148
-                            foreach ($opt['template']['locales'] AS $k => $lang)
149
-                                if ($lang['status'] == OC_LOCALE_ACTIVE)
148
+                            foreach ($opt['template']['locales'] AS $k => $lang) {
149
+                                                            if ($lang['status'] == OC_LOCALE_ACTIVE)
150 150
                                     echo '<a style="text-decoration: none;" href="index.php?locale=' . $k . '"><img src="' . $lang['flag'] . '" alt="' . $lang['name'] . '" title="' . $lang['name'] . '" width="24px" height="18px" /></a> ';
151
-?>
151
+                            }
152
+                            ?>
152 153
                         </td>
153 154
                         <td>&nbsp;&nbsp;&nbsp;&nbsp;<strong>{t}Country:{/t}&nbsp;</strong></td>
154 155
                         <td>
@@ -205,11 +206,12 @@  discard block
 block discarded – undo
205 206
                     <ul>
206 207
 <?php
207 208
                         // $pageidx is -1 e.g. when calling newcache.php as logged-off-user (-> login.tpl.php)
208
-                        if ($pageidx >= 0)
209
-                            mnu_EchoMainMenu($menu[$pageidx]['siteid']);
210
-                        else
211
-                            mnu_EchoMainMenu(-1);
212
-?>
209
+                        if ($pageidx >= 0) {
210
+                                                    mnu_EchoMainMenu($menu[$pageidx]['siteid']);
211
+                        } else {
212
+                                                    mnu_EchoMainMenu(-1);
213
+                        }
214
+                        ?>
213 215
                     </ul>
214 216
                 </div>
215 217
 
Please login to merge, or discard this patch.