Passed
Push — master ( 068a73...c4b73d )
by Thomas
07:57
created
htdocs/viewcache.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
     if ($count > 0) {
29 29
         $formatter = new FormatterCoordinate();
30 30
 
31
-        for ($i = 0; $i < $count; $i ++) {
31
+        for ($i = 0; $i < $count; $i++) {
32 32
             $waypoints[$i]['coord']['lat'] = $waypoints[$i]['coordinate']->latitude();
33 33
             $waypoints[$i]['coord']['lon'] = $waypoints[$i]['coordinate']->longitude();
34 34
             $waypoints[$i]['coordinateHtml'] = $formatter->formatHtml($waypoints[$i]['coordinate'], '<br />');
Please login to merge, or discard this patch.
htdocs/lib/settings-dev.inc.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -117,11 +117,11 @@
 block discarded – undo
117 117
 /* maximum number of failed logins per hour before that IP address is blocked
118 118
  * (used to prevent brute-force-attacks)
119 119
  */
120
-$opt['page']['max_logins_per_hour'] = 1000;    // for development ...
120
+$opt['page']['max_logins_per_hour'] = 1000; // for development ...
121 121
 $opt['page']['headoverlay'] = 'oc_head_alpha3';
122 122
 
123 123
 // data license
124
-$opt['logic']['license']['disclaimer'] = true;   // also in lib2/settings-dist.inc.php
124
+$opt['logic']['license']['disclaimer'] = true; // also in lib2/settings-dist.inc.php
125 125
 $opt['logic']['license']['terms'] = $absolute_server_URI . 'articles.php?page=impressum#datalicense';
126 126
 
127 127
 $opt['logic']['admin']['listingadmin_notification'] = 'root';
Please login to merge, or discard this patch.
htdocs/lib/common.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -680,7 +680,7 @@
 block discarded – undo
680 680
 
681 681
     $str = $translate->t($str, '', basename(__FILE__), __LINE__);
682 682
     $args = func_get_args();
683
-    for ($nIndex = count($args) - 1; $nIndex > 0; $nIndex --) {
683
+    for ($nIndex = count($args) - 1; $nIndex > 0; $nIndex--) {
684 684
         $str = str_replace('%' . $nIndex, $args[$nIndex], $str);
685 685
     }
686 686
 
Please login to merge, or discard this patch.
htdocs/lib/consts-common.inc.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,10 +7,10 @@
 block discarded – undo
7 7
  *  common constant definitions of lib1 and lib2
8 8
  ***************************************************************************/
9 9
 
10
-define('GUI_HTML', 0);   // also defined in lib/consts.inc.php
10
+define('GUI_HTML', 0); // also defined in lib/consts.inc.php
11 11
 define('GUI_TEXT', 1);
12 12
 
13
-define('HTTPS_DISABLED', 0);   // also defined in lib/consts.inc.php
13
+define('HTTPS_DISABLED', 0); // also defined in lib/consts.inc.php
14 14
 define('HTTPS_ENABLED', 1);
15 15
 define('HTTPS_ENFORCED', 2);
16 16
 
Please login to merge, or discard this patch.
htdocs/lib/settings-sample-dev.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
 
19 19
 // database names
20 20
 $dbname = 'opencaching';
21
-$tmpdbname = 'octmp';   // empty db with CREATE and DROP privileges
21
+$tmpdbname = 'octmp'; // empty db with CREATE and DROP privileges
22 22
 
23 23
 // common developer system settings
24 24
 require 'settings-dev.inc.php';
Please login to merge, or discard this patch.
htdocs/lib/sqldebugger.inc.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
     global $sqldbg_cmdNo;
156 156
     global $sqldbg_sumTimes;
157 157
 
158
-    $sqldbg_cmdNo ++;
158
+    $sqldbg_cmdNo++;
159 159
 
160 160
     echo '<p class="sqlno"><span class="white">/*</span> SQL command ' . $sqldbg_cmdNo . ' ';
161 161
     if ($bSlave) {
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
 
231 231
         while ($r = sql_fetch_assoc($rs)) {
232 232
             $usebr = true;
233
-            $nLine ++;
233
+            $nLine++;
234 234
             if ($bFirstLine == true) {
235 235
                 echo '<tr>' . "\n";
236 236
                 foreach ($r as $field => $value) {
Please login to merge, or discard this patch.
htdocs/lib/login.class.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,13 +18,13 @@
 block discarded – undo
18 18
  *
19 19
  ***************************************************************************/
20 20
 
21
-define('LOGIN_UNKNOWN_ERROR', - 1);     // unkown error occured
22
-define('LOGIN_OK', 0);            // login succeeded
23
-define('LOGIN_BADUSERPW', 1);     // bad username or password
21
+define('LOGIN_UNKNOWN_ERROR', - 1); // unkown error occured
22
+define('LOGIN_OK', 0); // login succeeded
23
+define('LOGIN_BADUSERPW', 1); // bad username or password
24 24
 define('LOGIN_TOOMUCHLOGINS', 2); // too many logins in short time
25 25
 define('LOGIN_USERNOTACTIVE', 3); // the useraccount locked
26 26
 define('LOGIN_EMPTY_USERPASSWORD', 4); // given username/password was empty
27
-define('LOGIN_LOGOUT_OK', 5);          // logout was successfull
27
+define('LOGIN_LOGOUT_OK', 5); // logout was successfull
28 28
 
29 29
 // login times in seconds
30 30
 define('LOGIN_TIME', 60 * 60);
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
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
     }
129 129
 }
130 130
 
131
-$queryid += 0;  // safety measure: force $queryid to be numeric
131
+$queryid += 0; // safety measure: force $queryid to be numeric
132 132
 
133 133
 
134 134
 //=========================================================
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
     if (sql_num_rows($query_rs) == 0) {
150 150
         // can happen if logged out after query was created (fix for RT #3915)
151 151
         $queryid = 0;
152
-        goto newquery;  // goto needs PHP 5.3
152
+        goto newquery; // goto needs PHP 5.3
153 153
         /*
154 154
         $tpl->error($error_query_not_found);
155 155
         */
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
         }
186 186
 
187 187
         // get findername from finderid
188
-        $options['finderid'] = isset($options['finderid']) ? $options['finderid'] + 0 : 0;  // Ocprop
188
+        $options['finderid'] = isset($options['finderid']) ? $options['finderid'] + 0 : 0; // Ocprop
189 189
         if (isset($options['finder']) && $options['finderid'] > 0) {
190 190
             $rs_name = sql("SELECT `username` FROM `user` WHERE `user_id`='&1'", $options['finderid']);
191 191
             if (sql_num_rows($rs_name) == 1) {
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
         }
198 198
 
199 199
         // get ownername from ownerid
200
-        $options['ownerid'] = isset($options['ownerid']) ? $options['ownerid'] + 0 : 0;  // Ocprop
200
+        $options['ownerid'] = isset($options['ownerid']) ? $options['ownerid'] + 0 : 0; // Ocprop
201 201
         if (isset($options['owner']) && $options['ownerid'] > 0) {
202 202
             $rs_name = sql("SELECT `username` FROM `user` WHERE `user_id`='&1'", $options['ownerid']);
203 203
             if (sql_num_rows($rs_name) == 1) {
@@ -226,10 +226,10 @@  discard block
 block discarded – undo
226 226
     }
227 227
 
228 228
     // get the search options parameters and store them in the queries table (to view "the next page")
229
-    $options['f_userowner'] = isset($_REQUEST['f_userowner']) ? $_REQUEST['f_userowner'] : 0;  // Ocprop
230
-    $options['f_userfound'] = isset($_REQUEST['f_userfound']) ? $_REQUEST['f_userfound'] : 0;  // Ocprop
229
+    $options['f_userowner'] = isset($_REQUEST['f_userowner']) ? $_REQUEST['f_userowner'] : 0; // Ocprop
230
+    $options['f_userfound'] = isset($_REQUEST['f_userfound']) ? $_REQUEST['f_userfound'] : 0; // Ocprop
231 231
     $options['f_disabled'] = isset($_REQUEST['f_disabled']) ? $_REQUEST['f_disabled'] : 0;
232
-    $options['f_inactive'] = isset($_REQUEST['f_inactive']) ? $_REQUEST['f_inactive'] : 1;  // Ocprop
232
+    $options['f_inactive'] = isset($_REQUEST['f_inactive']) ? $_REQUEST['f_inactive'] : 1; // Ocprop
233 233
     // f_inactive formerly was used for both, archived and disabled caches.
234 234
     // After adding the separate f_disabled option, it is used only for archived
235 235
     // caches, but keeps its name for compatibility with existing stored or
@@ -237,15 +237,15 @@  discard block
 block discarded – undo
237 237
     $options['f_ignored'] = isset($_REQUEST['f_ignored']) ? $_REQUEST['f_ignored'] : 1;
238 238
     $options['f_otherPlatforms'] = isset($_REQUEST['f_otherPlatforms']) ? $_REQUEST['f_otherPlatforms'] : 0;
239 239
     $options['f_geokrets'] = isset($_REQUEST['f_geokrets']) ? $_REQUEST['f_geokrets'] : 0;
240
-    $options['expert'] = isset($_REQUEST['expert']) ? $_REQUEST['expert'] : 0;  // Ocprop: 0
240
+    $options['expert'] = isset($_REQUEST['expert']) ? $_REQUEST['expert'] : 0; // Ocprop: 0
241 241
     $options['showresult'] = isset($_REQUEST['showresult']) ? $_REQUEST['showresult'] : 0;
242
-    $options['output'] = isset($_REQUEST['output']) ? $_REQUEST['output'] : 'HTML';  // Ocprop: HTML
242
+    $options['output'] = isset($_REQUEST['output']) ? $_REQUEST['output'] : 'HTML'; // Ocprop: HTML
243 243
     $options['bbox'] = isset($_REQUEST['bbox']) ? $_REQUEST['bbox'] : false;
244 244
 
245 245
     if (isset($_REQUEST['cache_attribs'])) {
246 246
         if ($_REQUEST['cache_attribs'] != '') {
247 247
             $aAttribs = mb_split(';', $_REQUEST['cache_attribs']);
248
-            for ($i = 0; $i < count($aAttribs); $i ++) {
248
+            for ($i = 0; $i < count($aAttribs); $i++) {
249 249
                 $options['cache_attribs'][$aAttribs[$i] + 0] = $aAttribs[$i] + 0;
250 250
             }
251 251
             unset($aAttribs);
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
     if (isset($_REQUEST['cache_attribs_not'])) {
260 260
         if ($_REQUEST['cache_attribs_not'] != '') {
261 261
             $aAttribs = mb_split(';', $_REQUEST['cache_attribs_not']);
262
-            for ($i = 0; $i < count($aAttribs); $i ++) {
262
+            for ($i = 0; $i < count($aAttribs); $i++) {
263 263
                 $options['cache_attribs_not'][$aAttribs[$i] + 0] = $aAttribs[$i] + 0;
264 264
             }
265 265
             unset($aAttribs);
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
 
298 298
         $options['finderid'] = isset($_REQUEST['finderid']) ? $_REQUEST['finderid'] : 0;
299 299
         $options['finder'] = isset($_REQUEST['finder']) ? stripslashes($_REQUEST['finder']) : '';
300
-        $options['logtype'] = isset($_REQUEST['logtype']) ? $_REQUEST['logtype'] : '1,7';  // Ocprop
300
+        $options['logtype'] = isset($_REQUEST['logtype']) ? $_REQUEST['logtype'] : '1,7'; // Ocprop
301 301
     } elseif (isset($_REQUEST['searchbyortplz'])) {
302 302
         $onlydigits = is_numeric($_REQUEST['ortplz']);
303 303
         if ($onlydigits == true) {
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
         if (!$list->allowView($password)) {
364 364
             $tpl->redirect("cachelists.php");
365 365
         }
366
-        $options['cachelist'] = cachelist::getListById($options['listid']);  // null for invalid ID
366
+        $options['cachelist'] = cachelist::getListById($options['listid']); // null for invalid ID
367 367
         $options['cachelist_pw'] = $password;
368 368
     } elseif (isset($_REQUEST['searchall'])) {
369 369
         if (!$login->logged_in() &&
@@ -640,7 +640,7 @@  discard block
 block discarded – undo
640 640
                                 }
641 641
                                 $sqlhashes .= '`gns_search`.`simplehash`=' . sprintf("%u", crc32($searchstring));
642 642
 
643
-                                $wordscount ++;
643
+                                $wordscount++;
644 644
                             }
645 645
                         }
646 646
 
@@ -990,7 +990,7 @@  discard block
 block discarded – undo
990 990
                 $sql_where[] = '`s' . $n . '`.`hash`=\'' . sql_escape($h) . '\'';
991 991
                 $sql_where[] = '`s' . $n . '`.`object_type` IN (' . implode(',', $ft_types) . ')';
992 992
 
993
-                $n ++;
993
+                $n++;
994 994
             }
995 995
 
996 996
             $sqlFilter =
@@ -1148,7 +1148,7 @@  discard block
 block discarded – undo
1148 1148
         if ($options['cachetype'] != '') {
1149 1149
             $types = explode(';', $options['cachetype']);
1150 1150
             if (count($types) < sql_value_slave("SELECT COUNT(*) FROM `cache_type`", 0)) {
1151
-                for ($i = 0; $i < count($types); $i ++) {
1151
+                for ($i = 0; $i < count($types); $i++) {
1152 1152
                     $types[$i] = "'" . sql_escape($types[$i]) . "'";
1153 1153
                 }
1154 1154
                 $sql_where[] = '`caches`.`type` IN (' . implode(',', $types) . ')';
@@ -1158,7 +1158,7 @@  discard block
 block discarded – undo
1158 1158
         if ($options['cachesize'] != '') {
1159 1159
             $sizes = explode(';', $options['cachesize']);
1160 1160
             if (count($sizes) < sql_value_slave("SELECT COUNT(*) FROM `cache_size`", 0)) {
1161
-                for ($i = 0; $i < count($sizes); $i ++) {
1161
+                for ($i = 0; $i < count($sizes); $i++) {
1162 1162
                     $sizes[$i] = "'" . sql_escape($sizes[$i]) . "'";
1163 1163
                 }
1164 1164
                 $sql_where[] = '`caches`.`size` IN (' . implode(',', $sizes) . ')';
@@ -1243,7 +1243,7 @@  discard block
 block discarded – undo
1243 1243
     //  X6. load output module and output-dependent options
1244 1244
     //=================================================================
1245 1245
 
1246
-    $output_module = mb_strtolower($options['output']);  // Ocprop: HTML, gpx
1246
+    $output_module = mb_strtolower($options['output']); // Ocprop: HTML, gpx
1247 1247
 
1248 1248
     $map2_bounds = ($output_module == 'map2bounds');
1249 1249
     if ($map2_bounds) {
@@ -1785,9 +1785,9 @@  discard block
 block discarded – undo
1785 1785
     }
1786 1786
     $tpl->assign('ortplz', $ortplz);
1787 1787
     if ($options['searchtype'] == 'byplz') {
1788
-        $dByOrtPlzChecked = ($options['searchtype'] == 'byplz');  // Ocprop
1788
+        $dByOrtPlzChecked = ($options['searchtype'] == 'byplz'); // Ocprop
1789 1789
     } elseif ($options['searchtype'] == 'byort') {
1790
-        $dByOrtPlzChecked = ($options['searchtype'] == 'byort');  // Ocprop
1790
+        $dByOrtPlzChecked = ($options['searchtype'] == 'byort'); // Ocprop
1791 1791
     } else {
1792 1792
         $dByOrtPlzChecked = false;
1793 1793
     }
@@ -2022,7 +2022,7 @@  discard block
 block discarded – undo
2022 2022
             $line = mb_ereg_replace('{color}', $rAttrGroup['color'], $line);
2023 2023
 
2024 2024
             $group_line .= $line;
2025
-            $nLineAttrCount2 ++;
2025
+            $nLineAttrCount2++;
2026 2026
         }
2027 2027
         sql_free_result($rs);
2028 2028
 
@@ -2133,7 +2133,7 @@  discard block
 block discarded – undo
2133 2133
             $line = mb_ereg_replace('{color}', $rAttrGroup['color'], $line);
2134 2134
 
2135 2135
             $group_line .= $line;
2136
-            $nLineAttrCount1 ++;
2136
+            $nLineAttrCount1++;
2137 2137
         }
2138 2138
         sql_free_result($rs);
2139 2139
 
@@ -2278,7 +2278,7 @@  discard block
 block discarded – undo
2278 2278
 
2279 2279
 function outputUniidSelectionForm($uniSql, $options)
2280 2280
 {
2281
-    global $tpl;  // settings
2281
+    global $tpl; // settings
2282 2282
     global $locline, $secondlocationname;
2283 2283
 
2284 2284
     $urlparamString = prepareLocSelectionForm($options);
@@ -2388,7 +2388,7 @@  discard block
 block discarded – undo
2388 2388
         $thislocation = mb_ereg_replace('{locid}', urlencode($r['uni_id']), $thislocation);
2389 2389
         $thislocation = mb_ereg_replace('{nr}', $nr, $thislocation);
2390 2390
 
2391
-        $nr ++;
2391
+        $nr++;
2392 2392
         $locations .= $thislocation . "\n";
2393 2393
     }
2394 2394
     sql_free_result($rs);
@@ -2481,7 +2481,7 @@  discard block
 block discarded – undo
2481 2481
             $thislocation = mb_ereg_replace('{bgcolor}', $bgcolor2, $thislocation);
2482 2482
         }
2483 2483
 
2484
-        $nr ++;
2484
+        $nr++;
2485 2485
         $locations .= $thislocation . "\n";
2486 2486
     }
2487 2487
 
Please login to merge, or discard this patch.
htdocs/newcachesrest.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,8 +14,7 @@
 block discarded – undo
14 14
 $tpl->caching = true;
15 15
 $tpl->cache_lifetime = 3600;
16 16
 
17
-$country = isset($_REQUEST['usercountry']) ? $_REQUEST['usercountry'] :
18
-    (isset($_REQUEST['country']) ? $_REQUEST['country'] : $opt['page']['main_country']);
17
+$country = isset($_REQUEST['usercountry']) ? $_REQUEST['usercountry'] : (isset($_REQUEST['country']) ? $_REQUEST['country'] : $opt['page']['main_country']);
19 18
 
20 19
 if (!$tpl->is_cached()) {
21 20
     $newCaches = array();
Please login to merge, or discard this patch.