Completed
Branch master (7d3f82)
by Thomas
09:15
created
htdocs/newcache.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
         require_once $stylepath . '/' . $tplname . '.inc.php';
37 37
 
38 38
         //set template replacements
39
-        tpl_set_var('reset', $reset);  // obsolete
39
+        tpl_set_var('reset', $reset); // obsolete
40 40
         tpl_set_var('submit', $submit);
41 41
         tpl_set_var('general_message', '');
42 42
         tpl_set_var('hidden_since_message', '');
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
         tpl_set_var('diff_message', '');
54 54
         tpl_set_var('safari_message', '');
55 55
 
56
-        $sel_type = isset($_POST['type']) ? $_POST['type'] : 0;  // Ocprop
56
+        $sel_type = isset($_POST['type']) ? $_POST['type'] : 0; // Ocprop
57 57
         if (!isset($_POST['size'])) {
58 58
             if ($sel_type == 4 || $sel_type == 5) {
59 59
                 $sel_size = 7;
@@ -61,15 +61,15 @@  discard block
 block discarded – undo
61 61
                 $sel_size = - 1;
62 62
             }
63 63
         } else {
64
-            $sel_size = isset($_POST['size']) ? $_POST['size'] : - 1;  // Ocprop
64
+            $sel_size = isset($_POST['size']) ? $_POST['size'] : - 1; // Ocprop
65 65
         }
66 66
         $sel_lang = isset($_POST['desc_lang']) ? $_POST['desc_lang'] : $default_lang;
67
-        $sel_country = isset($_POST['country']) ? $_POST['country'] : getUserCountry();  // Ocprop
67
+        $sel_country = isset($_POST['country']) ? $_POST['country'] : getUserCountry(); // Ocprop
68 68
         $show_all_countries = isset($_POST['show_all_countries']) ? $_POST['show_all_countries'] : 0;
69 69
         $show_all_langs = isset($_POST['show_all_langs']) ? $_POST['show_all_langs'] : 0;
70 70
 
71 71
         //coords
72
-        $lonEW = isset($_POST['lonEW']) ? $_POST['lonEW'] : $default_EW;  // Ocprop
72
+        $lonEW = isset($_POST['lonEW']) ? $_POST['lonEW'] : $default_EW; // Ocprop
73 73
         if ($lonEW == 'E') {
74 74
             tpl_set_var('lonEsel', ' selected="selected"');
75 75
             tpl_set_var('lonWsel', '');
@@ -77,13 +77,13 @@  discard block
 block discarded – undo
77 77
             tpl_set_var('lonEsel', '');
78 78
             tpl_set_var('lonWsel', ' selected="selected"');
79 79
         }
80
-        $lon_h = isset($_POST['lon_h']) ? $_POST['lon_h'] : '0';  // Ocprop
80
+        $lon_h = isset($_POST['lon_h']) ? $_POST['lon_h'] : '0'; // Ocprop
81 81
         tpl_set_var('lon_h', htmlspecialchars($lon_h, ENT_COMPAT, 'UTF-8'));
82 82
 
83
-        $lon_min = isset($_POST['lon_min']) ? $_POST['lon_min'] : '00.000';  // Ocprop
83
+        $lon_min = isset($_POST['lon_min']) ? $_POST['lon_min'] : '00.000'; // Ocprop
84 84
         tpl_set_var('lon_min', htmlspecialchars($lon_min, ENT_COMPAT, 'UTF-8'));
85 85
 
86
-        $latNS = isset($_POST['latNS']) ? $_POST['latNS'] : $default_NS;  // Ocprop
86
+        $latNS = isset($_POST['latNS']) ? $_POST['latNS'] : $default_NS; // Ocprop
87 87
         if ($latNS == 'N') {
88 88
             tpl_set_var('latNsel', ' selected="selected"');
89 89
             tpl_set_var('latSsel', '');
@@ -91,14 +91,14 @@  discard block
 block discarded – undo
91 91
             tpl_set_var('latNsel', '');
92 92
             tpl_set_var('latSsel', ' selected="selected"');
93 93
         }
94
-        $lat_h = isset($_POST['lat_h']) ? $_POST['lat_h'] : '0';  // Ocprop
94
+        $lat_h = isset($_POST['lat_h']) ? $_POST['lat_h'] : '0'; // Ocprop
95 95
         tpl_set_var('lat_h', htmlspecialchars($lat_h, ENT_COMPAT, 'UTF-8'));
96 96
 
97
-        $lat_min = isset($_POST['lat_min']) ? $_POST['lat_min'] : '00.000';  // Ocprop
97
+        $lat_min = isset($_POST['lat_min']) ? $_POST['lat_min'] : '00.000'; // Ocprop
98 98
         tpl_set_var('lat_min', htmlspecialchars($lat_min, ENT_COMPAT, 'UTF-8'));
99 99
 
100 100
         //name
101
-        $name = isset($_POST['name']) ? trim($_POST['name']) : '';  // Ocprop
101
+        $name = isset($_POST['name']) ? trim($_POST['name']) : ''; // Ocprop
102 102
         tpl_set_var('name', htmlspecialchars($name, ENT_COMPAT, 'UTF-8'));
103 103
 
104 104
         //shortdesc
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 
131 131
         // fuer alte Versionen von OCProp
132 132
         if (isset($_POST['submit']) && !isset($_POST['version2'])) {
133
-            $descMode = (isset($_POST['desc_html']) && ($_POST['desc_html'] == 1)) ? 2 : 1;  // Ocprop
133
+            $descMode = (isset($_POST['desc_html']) && ($_POST['desc_html'] == 1)) ? 2 : 1; // Ocprop
134 134
             $_POST['submitform'] = $_POST['submit'];
135 135
 
136 136
             $short_desc = iconv("ISO-8859-1", "UTF-8", $short_desc);
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
         }
197 197
 
198 198
         //tos
199
-        $tos = isset($_POST['TOS']) ? 1 : 0;  // Ocprop
199
+        $tos = isset($_POST['TOS']) ? 1 : 0; // Ocprop
200 200
         if ($tos == 1) {
201 201
             tpl_set_var('toschecked', ' checked="checked"');
202 202
         } else {
@@ -204,9 +204,9 @@  discard block
 block discarded – undo
204 204
         }
205 205
 
206 206
         //hidden_since
207
-        $hidden_day = isset($_POST['hidden_day']) ? $_POST['hidden_day'] : date('d');  // Ocprop
208
-        $hidden_month = isset($_POST['hidden_month']) ? $_POST['hidden_month'] : date('m');  // Ocprop
209
-        $hidden_year = isset($_POST['hidden_year']) ? $_POST['hidden_year'] : date('Y');  // Ocprop
207
+        $hidden_day = isset($_POST['hidden_day']) ? $_POST['hidden_day'] : date('d'); // Ocprop
208
+        $hidden_month = isset($_POST['hidden_month']) ? $_POST['hidden_month'] : date('m'); // Ocprop
209
+        $hidden_year = isset($_POST['hidden_year']) ? $_POST['hidden_year'] : date('Y'); // Ocprop
210 210
         tpl_set_var('hidden_day', htmlspecialchars($hidden_day, ENT_COMPAT, 'UTF-8'));
211 211
         tpl_set_var('hidden_month', htmlspecialchars($hidden_month, ENT_COMPAT, 'UTF-8'));
212 212
         tpl_set_var('hidden_year', htmlspecialchars($hidden_year, ENT_COMPAT, 'UTF-8'));
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
         tpl_set_var('publish_later_checked', '');
224 224
         tpl_set_var('publish_notnow_checked', '');
225 225
 
226
-        $publish = isset($_POST['publish']) ? $_POST['publish'] : 'now2';  // Ocprop
226
+        $publish = isset($_POST['publish']) ? $_POST['publish'] : 'now2'; // Ocprop
227 227
         if ($publish == 'now2') {
228 228
             tpl_set_var('publish_now_checked', 'checked');
229 229
         } elseif ($publish == 'later') {
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
         // fill activate hours
238 238
         $activate_hour = isset($_POST['activate_hour']) ? $_POST['activate_hour'] + 0 : date('H') + 0;
239 239
         $activation_hours = '';
240
-        for ($i = 0; $i <= 23; $i ++) {
240
+        for ($i = 0; $i <= 23; $i++) {
241 241
             if ($activate_hour == $i) {
242 242
                 $activation_hours .= '<option value="' . $i . '" selected="selected">' . $i . '</option>';
243 243
             } else {
@@ -253,13 +253,13 @@  discard block
 block discarded – undo
253 253
 
254 254
         // gc- and nc-waypoints
255 255
         // fix #4356: gc waypoints are frequently copy&pasted with leading spaces
256
-        $wp_gc = isset($_POST['wp_gc']) ? strtoupper(trim($_POST['wp_gc'])) : '';  // Ocprop
256
+        $wp_gc = isset($_POST['wp_gc']) ? strtoupper(trim($_POST['wp_gc'])) : ''; // Ocprop
257 257
         tpl_set_var('wp_gc', htmlspecialchars($wp_gc, ENT_COMPAT, 'UTF-8'));
258 258
 
259 259
         //difficulty
260
-        $difficulty = isset($_POST['difficulty']) ? $_POST['difficulty'] : 1;  // Ocprop
260
+        $difficulty = isset($_POST['difficulty']) ? $_POST['difficulty'] : 1; // Ocprop
261 261
         $difficulty_options = '<option value="1">' . $sel_message . '</option>';
262
-        for ($i = 2; $i <= 10; $i ++) {
262
+        for ($i = 2; $i <= 10; $i++) {
263 263
             if ($difficulty == $i) {
264 264
                 $difficulty_options .= '<option value="' . $i . '" selected="selected">' . $i / 2 . '</option>';
265 265
             } else {
@@ -270,9 +270,9 @@  discard block
 block discarded – undo
270 270
         tpl_set_var('difficulty_options', $difficulty_options);
271 271
 
272 272
         //terrain
273
-        $terrain = isset($_POST['terrain']) ? $_POST['terrain'] : 1;  // Ocprop
273
+        $terrain = isset($_POST['terrain']) ? $_POST['terrain'] : 1; // Ocprop
274 274
         $terrain_options = '<option value="1">' . $sel_message . '</option>';
275
-        for ($i = 2; $i <= 10; $i ++) {
275
+        for ($i = 2; $i <= 10; $i++) {
276 276
             if ($terrain == $i) {
277 277
                 $terrain_options .= '<option value="' . $i . '" selected="selected">' . $i / 2 . '</option>';
278 278
             } else {
@@ -508,7 +508,7 @@  discard block
 block discarded – undo
508 508
                 $line = mb_ereg_replace('{name}', escape_javascript($record['name']), $line);
509 509
                 $line = mb_ereg_replace('{color}', $rAttrGroup['color'], $line);
510 510
                 $group_line .= $line;
511
-                $nLineAttrCount ++;
511
+                $nLineAttrCount++;
512 512
 
513 513
                 $line = $cache_attrib_js;
514 514
                 $line = mb_ereg_replace('{id}', $record['id'], $line);
@@ -822,7 +822,7 @@  discard block
 block discarded – undo
822 822
                                 $activate_month,
823 823
                                 $activate_day,
824 824
                                 $activate_year
825
-                            )). "'";
825
+                            )) . "'";
826 826
                 } elseif ($publish == 'notnow') {
827 827
                     $sel_status = 5;
828 828
                     $activation_date = 'NULL';
@@ -902,7 +902,7 @@  discard block
 block discarded – undo
902 902
                 );
903 903
 
904 904
                 // insert cache-attributes
905
-                for ($i = 0; $i < count($cache_attribs); $i ++) {
905
+                for ($i = 0; $i < count($cache_attribs); $i++) {
906 906
                     if (($cache_attribs[$i] + 0) > 0) {
907 907
                         sql(
908 908
                             "INSERT INTO `caches_attributes` (`cache_id`, `attrib_id`) VALUES ('&1', '&2')",
Please login to merge, or discard this patch.
htdocs/okapi_settings.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
     # [3] http://code.google.com/p/opencaching-api/issues/detail?id=132
17 17
 
18 18
     $opt['rootpath'] = $GLOBALS['rootpath'];
19
-    require $opt['rootpath'] . 'lib2/const.inc.php';   # (into the *local* scope!)
19
+    require $opt['rootpath'] . 'lib2/const.inc.php'; # (into the *local* scope!)
20 20
     require $opt['rootpath'] . 'config2/settings-dist.inc.php';
21 21
     require $opt['rootpath'] . 'config2/settings.inc.php';
22 22
     
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 
25 25
         # Settings which ARE NOT present in settings.inc.php:
26 26
 
27
-        'OC_BRANCH' => 'oc.de',  # Tell OKAPI to work in "OCDE mode".
27
+        'OC_BRANCH' => 'oc.de', # Tell OKAPI to work in "OCDE mode".
28 28
 
29 29
         # Settings which ARE present in settings.inc.php:
30 30
 
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
         'DATA_LICENSE_URL' => $opt['page']['absolute_url'] . $opt['logic']['license']['terms'],
34 34
         'DEBUG'            => ($opt['debug'] & DEBUG_DEVELOPER != 0),
35 35
         'DEBUG_PREVENT_SEMAPHORES'
36
-                           => !$opt['php']['semaphores'],  # not available on old developer system
36
+                           => !$opt['php']['semaphores'], # not available on old developer system
37 37
         'DB_SERVER'        => $opt['db']['servername'],
38 38
         'DB_NAME'          => $opt['db']['placeholder']['db'],
39 39
         'DB_USERNAME'      => $opt['db']['username'],
@@ -47,9 +47,9 @@  discard block
 block discarded – undo
47 47
                                   : $opt['page']['absolute_url'] . 'register.php',
48 48
         'VAR_DIR'          => $opt['okapi']['var_dir'],
49 49
         'IMAGES_DIR'       => rtrim($opt['logic']['pictures']['dir'], '/'),
50
-        'IMAGES_URL'       => rtrim($opt['logic']['pictures']['url'], '/').'/',
50
+        'IMAGES_URL'       => rtrim($opt['logic']['pictures']['url'], '/') . '/',
51 51
         'IMAGE_MAX_UPLOAD_SIZE' => 2 * $opt['logic']['pictures']['maxsize'],
52
-        'IMAGE_MAX_PIXEL_COUNT' => 786432,  # 1024 x 768; TODO: move PICTURE_MAX_LONG_SIDE to settings
52
+        'IMAGE_MAX_PIXEL_COUNT' => 786432, # 1024 x 768; TODO: move PICTURE_MAX_LONG_SIDE to settings
53 53
         'SITE_LOGO'        => $opt['page']['absolute_url'] . 'resource2/' . $opt['template']['default']['style'] . '/images/oclogo/oc_logo_alpha3.png',
54 54
         'OC_NODE_ID'       => $opt['logic']['node']['id'],
55 55
         'OC_COOKIE_NAME'   => $opt['session']['cookiename'] . 'data',
Please login to merge, or discard this patch.
htdocs/mywatches.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,14 +48,14 @@
 block discarded – undo
48 48
     }
49 49
 
50 50
     $hours = array();
51
-    for ($i = 0; $i < 24; $i ++) {
51
+    for ($i = 0; $i < 24; $i++) {
52 52
         $hours[] = [
53 53
             'value' => $i,
54 54
             'time' => mktime($i, 0, 0)
55 55
         ];
56 56
     }
57 57
     $weekdays = array();
58
-    for ($i = 1; $i <= 7; $i ++) {
58
+    for ($i = 1; $i <= 7; $i++) {
59 59
         $weekdays[] = array(
60 60
             'value' => $i,
61 61
             'time' => mktime(0, 0, 0, 0, $i + 5, 2000)
Please login to merge, or discard this patch.
htdocs/removelog.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -186,7 +186,7 @@
 block discarded – undo
186 186
                         }
187 187
                         $path .= mb_strtoupper(mb_substr($filename, 0, 1)) . '/' .
188 188
                             mb_strtoupper(mb_substr($filename, 1, 1)) . '/';
189
-                        @unlink($path . $filename);  // Thumb
189
+                        @unlink($path . $filename); // Thumb
190 190
 
191 191
                         /* lib2 code would be ...
192 192
                         $rs = sql("SELECT `id` FROM `pictures` WHERE `object_type`=1 AND `object_id`='&1'", $log_id);
Please login to merge, or discard this patch.
htdocs/newcaches.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,8 +12,7 @@
 block discarded – undo
12 12
 $tpl->change_country_inpage = true;
13 13
 
14 14
 $startat = isset($_REQUEST['startat']) ? floor($_REQUEST['startat'] + 0) : 0;
15
-$country = isset($_REQUEST['usercountry']) ? $_REQUEST['usercountry'] :
16
-    (isset($_REQUEST['country']) ? $_REQUEST['country'] : '');
15
+$country = isset($_REQUEST['usercountry']) ? $_REQUEST['usercountry'] : (isset($_REQUEST['country']) ? $_REQUEST['country'] : '');
17 16
 $cachetype = isset($_REQUEST['cachetype']) ? $_REQUEST['cachetype'] + 0 : 0;
18 17
 $bEvents = ($cachetype == 6);
19 18
 
Please login to merge, or discard this patch.
htdocs/newlogs.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
     $tpl->cache_lifetime = 900;
70 70
     $tpl->cache_id = $exclude_country;
71 71
     $logcount = 250;
72
-    $paging = false;  // paging would have poor performance for all logs
72
+    $paging = false; // paging would have poor performance for all logs
73 73
     $orderByDate = $logselection == 3 ? "{fromtable}.`order_date` DESC, " : "";
74 74
 } else {
75 75
     // latest logs for all countries or for one country
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
     $tpl->cache_lifetime = 300;
89 89
     $tpl->cache_id = $country;
90 90
     $logcount = 250;
91
-    $paging = false;  // paging would have poor performance for all logs
91
+    $paging = false; // paging would have poor performance for all logs
92 92
     $orderByDate = $logselection == 3 ? "{fromtable}.`order_date` DESC, " : "";
93 93
     $optimize_for_latest_logs = ($country == '' || $country == $opt['page']['main_country']);
94 94
 }
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
             }
248 248
             sql_free_result($rsPic);
249 249
         }
250
-        $pics --;
250
+        $pics--;
251 251
 
252 252
         $rLog['first'] = false;
253 253
         if (isset($caches_logged)) {
Please login to merge, or discard this patch.
htdocs/xml/ocxml11.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 require_once __DIR__ . '/../lib2/const.inc.php';
22 22
 require_once __DIR__ . '/../lib2/logic/data-license.inc.php';
23 23
 require_once __DIR__ . '/../lib2/logic/npas.inc.php';
24
-require_once __DIR__ .' /../lib2/logic/geomath.class.php';
24
+require_once __DIR__ . ' /../lib2/logic/geomath.class.php';
25 25
 
26 26
 if ($error == true) {
27 27
     echo 'Unable to connect to database';
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
 
388 388
     $logtypes = [];
389 389
     $rs = sql('SELECT `id`, `de` FROM log_types');
390
-    for ($i = 0; $i < mysql_num_rows($rs); $i ++) {
390
+    for ($i = 0; $i < mysql_num_rows($rs); $i++) {
391 391
         $r = sql_fetch_array($rs);
392 392
         $logtypes[$r['id']] = $r['de'];
393 393
     }
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
 
396 396
     $cachetypes = [];
397 397
     $rs = sql('SELECT `id`, `short`, `de` FROM cache_type');
398
-    for ($i = 0; $i < mysql_num_rows($rs); $i ++) {
398
+    for ($i = 0; $i < mysql_num_rows($rs); $i++) {
399 399
         $r = sql_fetch_array($rs);
400 400
         $cachetypes[$r['id']]['de'] = $r['de'];
401 401
         $cachetypes[$r['id']]['short'] = $r['short'];
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
 
405 405
     $cachestatus = [];
406 406
     $rs = sql('SELECT `id`, `de` FROM cache_status');
407
-    for ($i = 0; $i < mysql_num_rows($rs); $i ++) {
407
+    for ($i = 0; $i < mysql_num_rows($rs); $i++) {
408 408
         $r = sql_fetch_array($rs);
409 409
         $cachestatus[$r['id']]['de'] = $r['de'];
410 410
     }
@@ -412,7 +412,7 @@  discard block
 block discarded – undo
412 412
 
413 413
     $counties = [];
414 414
     $rs = sql('SELECT `short`, `de` FROM countries');
415
-    for ($i = 0; $i < mysql_num_rows($rs); $i ++) {
415
+    for ($i = 0; $i < mysql_num_rows($rs); $i++) {
416 416
         $r = sql_fetch_array($rs);
417 417
         $counties[$r['short']]['de'] = $r['de'];
418 418
     }
@@ -420,7 +420,7 @@  discard block
 block discarded – undo
420 420
 
421 421
     $cachesizes = [];
422 422
     $rs = sql('SELECT `id`, `de` FROM cache_size');
423
-    for ($i = 0; $i < mysql_num_rows($rs); $i ++) {
423
+    for ($i = 0; $i < mysql_num_rows($rs); $i++) {
424 424
         $r = sql_fetch_array($rs);
425 425
         $cachesizes[$r['id']]['de'] = $r['de'];
426 426
     }
@@ -428,7 +428,7 @@  discard block
 block discarded – undo
428 428
 
429 429
     $languages = [];
430 430
     $rs = sql('SELECT `short`, `de` FROM languages');
431
-    for ($i = 0; $i < mysql_num_rows($rs); $i ++) {
431
+    for ($i = 0; $i < mysql_num_rows($rs); $i++) {
432 432
         $r = sql_fetch_array($rs);
433 433
         $languages[$r['short']]['de'] = $r['de'];
434 434
     }
@@ -439,7 +439,7 @@  discard block
 block discarded – undo
439 439
     $objecttypes['3'] = 'cachedesc';
440 440
     $objecttypes['1'] = 'cachelog';
441 441
     $objecttypes['6'] = 'picture';
442
-    $objecttypes['8'] = 'cachelist';    // not implemented yet
442
+    $objecttypes['8'] = 'cachelist'; // not implemented yet
443 443
 
444 444
     /* end now a few dynamically loaded constants */
445 445
 
@@ -452,7 +452,7 @@  discard block
 block discarded – undo
452 452
     while (file_exists(
453 453
         $zip_basedir . 'ocxml11/' . $sessionid . '/' . $sessionid . '-' . $filenr . '-' . $fileid . '.xml'
454 454
     )) {
455
-        $fileid ++;
455
+        $fileid++;
456 456
     }
457 457
 
458 458
     $xmlfilename = $zip_basedir . 'ocxml11/' . $sessionid . '/' . $sessionid . '-' . $filenr . '-' . $fileid . '.xml';
@@ -1300,7 +1300,7 @@  discard block
 block discarded – undo
1300 1300
 //    echo $startat . ' ' . $endat . '<br><br>';
1301 1301
 //    echo '<table>';
1302 1302
 //    echo '<tr><td>sql-start</td><td>sql-count</td><td>count</td><td>begin</td><td>end</td></tr>';
1303
-    for ($i = 0; $i < 6; $i ++) {
1303
+    for ($i = 0; $i < 6; $i++) {
1304 1304
         if (($startat >= $recordnr[$i]) && ($startat + 500 < $recordnr[$i + 1])) {
1305 1305
             if ($recordnr[$i + 1] - $startat > 500) {
1306 1306
                 $limits[$i] = ['start' => $startat - $recordnr[$i], 'count' => 500];
@@ -1422,7 +1422,7 @@  discard block
 block discarded – undo
1422 1422
     $from[4] = '\'';
1423 1423
     $to[4] = '&apos;';
1424 1424
 
1425
-    for ($i = 0; $i <= 4; $i ++) {
1425
+    for ($i = 0; $i <= 4; $i++) {
1426 1426
         $str = mb_ereg_replace($from[$i], $to[$i], $str);
1427 1427
     }
1428 1428
 
@@ -1501,13 +1501,13 @@  discard block
 block discarded – undo
1501 1501
 
1502 1502
     $hDir = opendir($path);
1503 1503
     if ($hDir === false) {
1504
-        ++ $notunlinked;
1504
+        ++$notunlinked;
1505 1505
     } else {
1506 1506
         while (false !== ($file = readdir($hDir))) {
1507 1507
             if (($file != '.') && ($file != '..')) {
1508 1508
                 if (is_dir($path . $file)) {
1509 1509
                     if (unlinkrecursiv($path . $file . '/') == false) {
1510
-                        $notunlinked ++;
1510
+                        $notunlinked++;
1511 1511
                     }
1512 1512
                 } else {
1513 1513
                     if ((mb_substr($file, - 4) == '.zip') ||
@@ -1517,7 +1517,7 @@  discard block
 block discarded – undo
1517 1517
                     ) {
1518 1518
                         @unlink($path . $file);
1519 1519
                     } else {
1520
-                        $notunlinked ++;
1520
+                        $notunlinked++;
1521 1521
                     }
1522 1522
                 }
1523 1523
             }
Please login to merge, or discard this patch.
htdocs/xml/csv/cache.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,6 +43,6 @@
 block discarded – undo
43 43
         echo ';';
44 44
         echo '"' . mb_ereg_replace('"', '\"', $cache->getWPGC()) . '"';
45 45
         echo ';';
46
-        echo '""';  // obsolete Navicache WP
46
+        echo '""'; // obsolete Navicache WP
47 47
     }
48 48
 }
Please login to merge, or discard this patch.
htdocs/newdesc.php 1 patch
Spacing   +6 added lines, -7 removed lines patch added patch discarded remove patch
@@ -44,11 +44,11 @@  discard block
 block discarded – undo
44 44
 
45 45
                 //get the posted data
46 46
                 $show_all_langs = isset($_POST['show_all_langs']) ? $_POST['show_all_langs'] : 0;
47
-                $short_desc = isset($_POST['short_desc']) ? $_POST['short_desc'] : '';  // Ocprop
47
+                $short_desc = isset($_POST['short_desc']) ? $_POST['short_desc'] : ''; // Ocprop
48 48
 
49
-                $hints = isset($_POST['hints']) ? $_POST['hints'] : '';  // Ocprop
50
-                $sel_lang = isset($_POST['desc_lang']) ? $_POST['desc_lang'] : $default_lang;  // Ocprop
51
-                $desc = isset($_POST['desc']) ? $_POST['desc'] : '';  // Ocprop
49
+                $hints = isset($_POST['hints']) ? $_POST['hints'] : ''; // Ocprop
50
+                $sel_lang = isset($_POST['desc_lang']) ? $_POST['desc_lang'] : $default_lang; // Ocprop
51
+                $desc = isset($_POST['desc']) ? $_POST['desc'] : ''; // Ocprop
52 52
 
53 53
                 // read descMode; if not set, initialize from user profile
54 54
                 if (isset($_POST['descMode'])) {  // Ocprop
@@ -195,8 +195,7 @@  discard block
 block discarded – undo
195 195
                 tpl_set_var('name', htmlspecialchars($cache_record['name'], ENT_COMPAT, 'UTF-8'));
196 196
                 tpl_set_var('cacheid', htmlspecialchars($cache_id, ENT_COMPAT, 'UTF-8'));
197 197
 
198
-                tpl_set_var('lang_message', $desc_lang_exists ? $lang_message :
199
-                    (isset($_POST['submitform']) && $sel_lang == '0' ? $error_no_lang_selected : ''));
198
+                tpl_set_var('lang_message', $desc_lang_exists ? $lang_message : (isset($_POST['submitform']) && $sel_lang == '0' ? $error_no_lang_selected : ''));
200 199
 
201 200
                 tpl_set_var('show_all_langs', $show_all_langs);
202 201
                 tpl_set_var('show_all_langs_submit', ($show_all_langs == 0) ? $show_all_langs_submit : '');
@@ -218,7 +217,7 @@  discard block
 block discarded – undo
218 217
                 $headers .= '<script language="javascript" type="text/javascript" src="' . editorJsPath() . '"></script>' . "\n";
219 218
                 tpl_set_var('htmlheaders', $headers);
220 219
 
221
-                tpl_set_var('reset', $reset);  // obsolete
220
+                tpl_set_var('reset', $reset); // obsolete
222 221
                 tpl_set_var('submit', $submit);
223 222
             } else {
224 223
                 //TODO: not the owner
Please login to merge, or discard this patch.