Passed
Pull Request — development (#375)
by Thomas
07:56
created
htdocs/util2/google-earth/caches.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
     $sZoomIn = str_replace("\r", "", $sZoomIn);
315 315
     $sLines = mb_split("\n", $sZoomIn);
316 316
     $countSLines = count($sLines);
317
-    for ($i = 0; $i < $countSLines; $i ++) {
317
+    for ($i = 0; $i < $countSLines; $i++) {
318 318
         $sLines[$i] = str_pad($sLines[$i], ($nColumnsCount - 1), ' ');
319 319
     }
320 320
 
@@ -322,8 +322,8 @@  discard block
 block discarded – undo
322 322
     $nDegreePerColumn = ($lon_to - $lon_from) / $nColumnsCount;
323 323
 
324 324
     $countSLines = count($sLines);
325
-    for ($nLine = 0; $nLine < $countSLines; $nLine ++) {
326
-        for ($nColumn = 0; $nColumn < $nColumnsCount; $nColumn ++) {
325
+    for ($nLine = 0; $nLine < $countSLines; $nLine++) {
326
+        for ($nColumn = 0; $nColumn < $nColumnsCount; $nColumn++) {
327 327
             if (substr($sLines[$nLine], $nColumn, 1) == '#') {
328 328
                 $nLat = $lat_to - $nDegreePerLine * $nLine;
329 329
                 $nLon = $lon_from + $nDegreePerColumn * $nColumn;
Please login to merge, or discard this patch.
htdocs/translate.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -689,7 +689,7 @@  discard block
 block discarded – undo
689 689
 
690 690
         $writer->writeElement('code', $r['text']);
691 691
         $countLang = count($lang);
692
-        for ($n = 0; $n < $countLang; $n ++) {
692
+        for ($n = 0; $n < $countLang; $n++) {
693 693
             $writer->writeElement(
694 694
                 $lang[$n],
695 695
                 sql_value(
@@ -817,7 +817,7 @@  discard block
 block discarded – undo
817 817
 
818 818
     $nCount = isset($_REQUEST['count']) ? $_REQUEST['count'] + 0 : 0;
819 819
 
820
-    for ($nIndex = 1; $nIndex <= $nCount; $nIndex ++) {
820
+    for ($nIndex = 1; $nIndex <= $nCount; $nIndex++) {
821 821
         if (isset($_REQUEST['useitem' . $nIndex]) && ($_REQUEST['useitem' . $nIndex] == '1')) {
822 822
             $sCode = base64_decode($_REQUEST['code' . $nIndex]);
823 823
             $transId = sql_value("SELECT `id` FROM `sys_trans` WHERE `text`='&1'", 0, $sCode);
Please login to merge, or discard this patch.
htdocs/search.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
     }
146 146
 }
147 147
 
148
-$queryid += 0;  // safety measure: force $queryid to be numeric
148
+$queryid += 0; // safety measure: force $queryid to be numeric
149 149
 
150 150
 
151 151
 //=========================================================
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
     if (sql_num_rows($query_rs) == 0) {
167 167
         // can happen if logged out after query was created (fix for RT #3915)
168 168
         $queryid = 0;
169
-        goto newquery;  // goto needs PHP 5.3
169
+        goto newquery; // goto needs PHP 5.3
170 170
         /*
171 171
         $tpl->error($error_query_not_found);
172 172
         */
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
         }
203 203
 
204 204
         // get findername from finderid
205
-        $options['finderid'] = isset($options['finderid']) ? $options['finderid'] + 0 : 0;  // Ocprop
205
+        $options['finderid'] = isset($options['finderid']) ? $options['finderid'] + 0 : 0; // Ocprop
206 206
         if (isset($options['finder']) && $options['finderid'] > 0) {
207 207
             $rs_name = sql("SELECT `username` FROM `user` WHERE `user_id`='&1'", $options['finderid']);
208 208
             if (sql_num_rows($rs_name) == 1) {
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
         }
215 215
 
216 216
         // get ownername from ownerid
217
-        $options['ownerid'] = isset($options['ownerid']) ? $options['ownerid'] + 0 : 0;  // Ocprop
217
+        $options['ownerid'] = isset($options['ownerid']) ? $options['ownerid'] + 0 : 0; // Ocprop
218 218
         if (isset($options['owner']) && $options['ownerid'] > 0) {
219 219
             $rs_name = sql("SELECT `username` FROM `user` WHERE `user_id`='&1'", $options['ownerid']);
220 220
             if (sql_num_rows($rs_name) == 1) {
@@ -251,10 +251,10 @@  discard block
 block discarded – undo
251 251
     }
252 252
 
253 253
     // get the search options parameters and store them in the queries table (to view "the next page")
254
-    $options['f_userowner'] = isset($_REQUEST['f_userowner']) ? $_REQUEST['f_userowner'] : 0;  // Ocprop
255
-    $options['f_userfound'] = isset($_REQUEST['f_userfound']) ? $_REQUEST['f_userfound'] : 0;  // Ocprop
254
+    $options['f_userowner'] = isset($_REQUEST['f_userowner']) ? $_REQUEST['f_userowner'] : 0; // Ocprop
255
+    $options['f_userfound'] = isset($_REQUEST['f_userfound']) ? $_REQUEST['f_userfound'] : 0; // Ocprop
256 256
     $options['f_disabled'] = isset($_REQUEST['f_disabled']) ? $_REQUEST['f_disabled'] : 0;
257
-    $options['f_inactive'] = isset($_REQUEST['f_inactive']) ? $_REQUEST['f_inactive'] : 1;  // Ocprop
257
+    $options['f_inactive'] = isset($_REQUEST['f_inactive']) ? $_REQUEST['f_inactive'] : 1; // Ocprop
258 258
     // f_inactive formerly was used for both, archived and disabled caches.
259 259
     // After adding the separate f_disabled option, it is used only for archived
260 260
     // caches, but keeps its name for compatibility with existing stored or
@@ -262,15 +262,15 @@  discard block
 block discarded – undo
262 262
     $options['f_ignored'] = isset($_REQUEST['f_ignored']) ? $_REQUEST['f_ignored'] : 1;
263 263
     $options['f_otherPlatforms'] = isset($_REQUEST['f_otherPlatforms']) ? $_REQUEST['f_otherPlatforms'] : 0;
264 264
     $options['f_geokrets'] = isset($_REQUEST['f_geokrets']) ? $_REQUEST['f_geokrets'] : 0;
265
-    $options['expert'] = isset($_REQUEST['expert']) ? $_REQUEST['expert'] : 0;  // Ocprop: 0
265
+    $options['expert'] = isset($_REQUEST['expert']) ? $_REQUEST['expert'] : 0; // Ocprop: 0
266 266
     $options['showresult'] = isset($_REQUEST['showresult']) ? $_REQUEST['showresult'] : 0;
267
-    $options['output'] = isset($_REQUEST['output']) ? $_REQUEST['output'] : 'HTML';  // Ocprop: HTML
267
+    $options['output'] = isset($_REQUEST['output']) ? $_REQUEST['output'] : 'HTML'; // Ocprop: HTML
268 268
     $options['bbox'] = isset($_REQUEST['bbox']) ? $_REQUEST['bbox'] : false;
269 269
 
270 270
     if (isset($_REQUEST['cache_attribs'])) {
271 271
         if ($_REQUEST['cache_attribs'] != '') {
272 272
             $aAttribs = mb_split(';', $_REQUEST['cache_attribs']);
273
-            for ($i = 0; $i < count($aAttribs); $i ++) {
273
+            for ($i = 0; $i < count($aAttribs); $i++) {
274 274
                 $options['cache_attribs'][$aAttribs[$i] + 0] = $aAttribs[$i] + 0;
275 275
             }
276 276
             unset($aAttribs);
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
     if (isset($_REQUEST['cache_attribs_not'])) {
285 285
         if ($_REQUEST['cache_attribs_not'] != '') {
286 286
             $aAttribs = mb_split(';', $_REQUEST['cache_attribs_not']);
287
-            for ($i = 0; $i < count($aAttribs); $i ++) {
287
+            for ($i = 0; $i < count($aAttribs); $i++) {
288 288
                 $options['cache_attribs_not'][$aAttribs[$i] + 0] = $aAttribs[$i] + 0;
289 289
             }
290 290
             unset($aAttribs);
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
322 322
 
323 323
         $options['finderid'] = isset($_REQUEST['finderid']) ? $_REQUEST['finderid'] : 0;
324 324
         $options['finder'] = isset($_REQUEST['finder']) ? stripslashes($_REQUEST['finder']) : '';
325
-        $options['logtype'] = isset($_REQUEST['logtype']) ? $_REQUEST['logtype'] : '1,7';  // Ocprop
325
+        $options['logtype'] = isset($_REQUEST['logtype']) ? $_REQUEST['logtype'] : '1,7'; // Ocprop
326 326
     } elseif ((isset($_REQUEST['searchbyortplz']) && is_numeric($_REQUEST['ortplz']))
327 327
               || isset($_REQUEST['searchbyplz'])) {
328 328
         $options['searchtype'] = 'byplz';
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
         if (!$list->allowView($password)) {
396 396
             $tpl->redirect("cachelists.php");
397 397
         }
398
-        $options['cachelist'] = cachelist::getListById($options['listid']);  // null for invalid ID
398
+        $options['cachelist'] = cachelist::getListById($options['listid']); // null for invalid ID
399 399
         $options['cachelist_pw'] = $password;
400 400
     } elseif (isset($_REQUEST['searchall'])) {
401 401
         if (!$login->logged_in() &&
@@ -673,7 +673,7 @@  discard block
 block discarded – undo
673 673
                                 }
674 674
                                 $sqlhashes .= '`gns_search`.`simplehash`=' . sprintf("%u", crc32($searchstring));
675 675
 
676
-                                $wordscount ++;
676
+                                $wordscount++;
677 677
                             }
678 678
                         }
679 679
 
@@ -1015,7 +1015,7 @@  discard block
 block discarded – undo
1015 1015
                 $sql_where[] = '`s' . $n . '`.`hash`=\'' . sql_escape($h) . '\'';
1016 1016
                 $sql_where[] = '`s' . $n . '`.`object_type` IN (' . implode(',', $ft_types) . ')';
1017 1017
 
1018
-                $n ++;
1018
+                $n++;
1019 1019
             }
1020 1020
 
1021 1021
             $sqlFilter =
@@ -1173,7 +1173,7 @@  discard block
 block discarded – undo
1173 1173
         if ($options['cachetype'] != '') {
1174 1174
             $types = explode(';', $options['cachetype']);
1175 1175
             if (count($types) < sql_value_slave("SELECT COUNT(*) FROM `cache_type`", 0)) {
1176
-                for ($i = 0; $i < count($types); $i ++) {
1176
+                for ($i = 0; $i < count($types); $i++) {
1177 1177
                     $types[$i] = "'" . sql_escape($types[$i]) . "'";
1178 1178
                 }
1179 1179
                 $sql_where[] = '`caches`.`type` IN (' . implode(',', $types) . ')';
@@ -1183,7 +1183,7 @@  discard block
 block discarded – undo
1183 1183
         if ($options['cachesize'] != '') {
1184 1184
             $sizes = explode(';', $options['cachesize']);
1185 1185
             if (count($sizes) < sql_value_slave("SELECT COUNT(*) FROM `cache_size`", 0)) {
1186
-                for ($i = 0; $i < count($sizes); $i ++) {
1186
+                for ($i = 0; $i < count($sizes); $i++) {
1187 1187
                     $sizes[$i] = "'" . sql_escape($sizes[$i]) . "'";
1188 1188
                 }
1189 1189
                 $sql_where[] = '`caches`.`size` IN (' . implode(',', $sizes) . ')';
@@ -1268,7 +1268,7 @@  discard block
 block discarded – undo
1268 1268
     //  X6. load output module and output-dependent options
1269 1269
     //=================================================================
1270 1270
 
1271
-    $output_module = mb_strtolower($options['output']);  // Ocprop: HTML, gpx
1271
+    $output_module = mb_strtolower($options['output']); // Ocprop: HTML, gpx
1272 1272
 
1273 1273
     $map2_bounds = ($output_module == 'map2bounds');
1274 1274
     if ($map2_bounds) {
@@ -1612,7 +1612,7 @@  discard block
 block discarded – undo
1612 1612
     global $tpl, $login, $opt;
1613 1613
     global $error_ort, $error_plz, $error_locidnocoords, $error_nowaypointfound, $error_nocoords, $error_nofulltext, $error_fulltexttoolong;
1614 1614
     global $cache_attrib_jsarray_line, $cache_attrib_group, $cache_attrib_img_line1, $cache_attrib_img_line2;
1615
-    global $load_query, $show_lastsearchbutton ;
1615
+    global $load_query, $show_lastsearchbutton;
1616 1616
 
1617 1617
     $tpl->assign('formmethod', 'get');
1618 1618
 
@@ -1818,7 +1818,7 @@  discard block
 block discarded – undo
1818 1818
     $dfromwaypoint_checked = ($options['searchtype'] == 'bywaypoint');
1819 1819
     $dfromcoords_checked = ($options['searchtype'] == 'bycoords');
1820 1820
     if (!$dfromortplz_checked && !$dfromwaypoint_checked && !$dfromcoords_checked) {
1821
-        $dfromcoords_checked = true;  // default
1821
+        $dfromcoords_checked = true; // default
1822 1822
     }
1823 1823
     $tpl->assign('dfromortplz_checked', $dfromortplz_checked);
1824 1824
     $tpl->assign('dfromwaypoint_checked', $dfromwaypoint_checked);
@@ -2047,7 +2047,7 @@  discard block
 block discarded – undo
2047 2047
             $line = mb_ereg_replace('{color}', $rAttrGroup['color'], $line);
2048 2048
 
2049 2049
             $group_line .= $line;
2050
-            $nLineAttrCount2 ++;
2050
+            $nLineAttrCount2++;
2051 2051
         }
2052 2052
         sql_free_result($rs);
2053 2053
 
@@ -2158,7 +2158,7 @@  discard block
 block discarded – undo
2158 2158
             $line = mb_ereg_replace('{color}', $rAttrGroup['color'], $line);
2159 2159
 
2160 2160
             $group_line .= $line;
2161
-            $nLineAttrCount1 ++;
2161
+            $nLineAttrCount1++;
2162 2162
         }
2163 2163
         sql_free_result($rs);
2164 2164
 
@@ -2305,7 +2305,7 @@  discard block
 block discarded – undo
2305 2305
 
2306 2306
 function outputUniidSelectionForm($uniSql, $options)
2307 2307
 {
2308
-    global $tpl;  // settings
2308
+    global $tpl; // settings
2309 2309
     global $locline, $secondlocationname;
2310 2310
 
2311 2311
     $urlparamString = prepareLocSelectionForm($options);
@@ -2415,7 +2415,7 @@  discard block
 block discarded – undo
2415 2415
         $thislocation = mb_ereg_replace('{locid}', urlencode($r['uni_id']), $thislocation);
2416 2416
         $thislocation = mb_ereg_replace('{nr}', $nr, $thislocation);
2417 2417
 
2418
-        $nr ++;
2418
+        $nr++;
2419 2419
         $locations .= $thislocation . "\n";
2420 2420
     }
2421 2421
     sql_free_result($rs);
@@ -2508,7 +2508,7 @@  discard block
 block discarded – undo
2508 2508
             $thislocation = mb_ereg_replace('{bgcolor}', $bgcolor2, $thislocation);
2509 2509
         }
2510 2510
 
2511
-        $nr ++;
2511
+        $nr++;
2512 2512
         $locations .= $thislocation . "\n";
2513 2513
     }
2514 2514
 
Please login to merge, or discard this patch.