@@ -128,7 +128,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
@@ -14,8 +14,7 @@ |
||
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(); |
@@ -75,11 +75,11 @@ |
||
75 | 75 | if (isset($_REQUEST['ok'])) { // Ocprop |
76 | 76 | $bError = false; |
77 | 77 | |
78 | - $picture->setSpoiler(isset($_REQUEST['spoiler']) && $_REQUEST['spoiler'] == '1'); // Ocprop |
|
79 | - $picture->setDisplay((isset($_REQUEST['notdisplay']) && $_REQUEST['notdisplay'] == '1') == false); // Ocprop |
|
78 | + $picture->setSpoiler(isset($_REQUEST['spoiler']) && $_REQUEST['spoiler'] == '1'); // Ocprop |
|
79 | + $picture->setDisplay((isset($_REQUEST['notdisplay']) && $_REQUEST['notdisplay'] == '1') == false); // Ocprop |
|
80 | 80 | $picture->setMapPreview(isset($_REQUEST['mappreview']) && $_REQUEST['mappreview'] == '1'); |
81 | 81 | |
82 | - $title = isset($_REQUEST['title']) ? $_REQUEST['title'] : ''; // Ocprop |
|
82 | + $title = isset($_REQUEST['title']) ? $_REQUEST['title'] : ''; // Ocprop |
|
83 | 83 | if ($title == '' || ($picture->getObjectType() == OBJECT_CACHELOG && trim($title) == '')) { |
84 | 84 | $tpl->assign('errortitle', true); |
85 | 85 | $bError = true; |
@@ -72,7 +72,7 @@ |
||
72 | 72 | if ($submit == true) { |
73 | 73 | $options = sql_value("SELECT `options` FROM `queries` WHERE `id`='&1'", false, $queryid); |
74 | 74 | if (!$options) { |
75 | - $tpl->error(ERROR_UNKNOWN); // query does not exist |
|
75 | + $tpl->error(ERROR_UNKNOWN); // query does not exist |
|
76 | 76 | } elseif ($sortby || $sortorder || $creationdate) { |
77 | 77 | $oa = unserialize($options); |
78 | 78 | if ($sortby) { |
@@ -41,7 +41,7 @@ |
||
41 | 41 | |
42 | 42 | foreach ($sendto as $receiver) { |
43 | 43 | $receiver = trim($receiver); |
44 | - echo ++ $n . "/$total: $receiver"; |
|
44 | + echo ++$n . "/$total: $receiver"; |
|
45 | 45 | mail( |
46 | 46 | $receiver, |
47 | 47 | $subject, |
@@ -41,7 +41,7 @@ |
||
41 | 41 | |
42 | 42 | function test_encoding($path) |
43 | 43 | { |
44 | - static $ur_exclude = [ // no unicode reminder needed |
|
44 | + static $ur_exclude = [// no unicode reminder needed |
|
45 | 45 | 'lang/de/ocstyle/search1/search.result.caches', |
46 | 46 | 'lib2/b2evo-captcha', |
47 | 47 | 'lib2/HTMLPurifier', |
@@ -108,19 +108,19 @@ discard block |
||
108 | 108 | && !preg_match("/^ *(\\*|\/\/|#) *\n$/", $line)) { |
109 | 109 | |
110 | 110 | $old_line = $line; |
111 | - $line = rtrim($line); # trims " \t\n\r\0\x0B" |
|
111 | + $line = rtrim($line); # trims " \t\n\r\0\x0B" |
|
112 | 112 | $line = $this->expandTabs($line); |
113 | 113 | $line .= "\n"; |
114 | 114 | |
115 | 115 | if ($line != $old_line) { |
116 | 116 | $file_modified = true; |
117 | - ++ $this->lines_modified; |
|
117 | + ++$this->lines_modified; |
|
118 | 118 | } |
119 | 119 | } |
120 | 120 | if (preg_match('/\<\?\s/', $line)) { # relies on \n at EOL |
121 | 121 | self::warn('short open tag in line ' . $n . ' of ' . $display_filepath); |
122 | 122 | } |
123 | - ++ $n; |
|
123 | + ++$n; |
|
124 | 124 | } |
125 | 125 | |
126 | 126 | # remove PHP close tags and empty lines from end of file |
@@ -131,17 +131,17 @@ discard block |
||
131 | 131 | if ($trimmed_line == '?>' || $trimmed_line == '') { |
132 | 132 | unset($lines[$l]); |
133 | 133 | $file_modified = true; |
134 | - ++ $this->lines_modified; |
|
134 | + ++$this->lines_modified; |
|
135 | 135 | } else { |
136 | 136 | break; |
137 | 137 | } |
138 | - -- $l; |
|
138 | + --$l; |
|
139 | 139 | } |
140 | 140 | |
141 | 141 | if ($file_modified) { |
142 | 142 | echo 'cleaned ' . substr($filepath, 2) . "\n"; |
143 | 143 | file_put_contents($filepath, implode('', $lines)); |
144 | - ++ $this->files_modified; |
|
144 | + ++$this->files_modified; |
|
145 | 145 | } |
146 | 146 | } |
147 | 147 |
@@ -31,9 +31,9 @@ |
||
31 | 31 | $lang |
32 | 32 | ); |
33 | 33 | } |
34 | - ++ $set; |
|
34 | + ++$set; |
|
35 | 35 | } |
36 | - if (++ $processed % 1000 == 0) { |
|
36 | + if (++$processed % 1000 == 0) { |
|
37 | 37 | echo "$set of $processed " . ($write ? '' : 'would be ') . "set\n"; |
38 | 38 | } |
39 | 39 | } |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | $er->resendActivationCodes(); |
53 | 53 | break; |
54 | 54 | default: |
55 | - die('invalid option: '. $option . "\n"); |
|
55 | + die('invalid option: ' . $option . "\n"); |
|
56 | 56 | } |
57 | 57 | } |
58 | 58 | |
@@ -297,7 +297,7 @@ discard block |
||
297 | 297 | while ($r = sql_fetch_assoc($rs)) { |
298 | 298 | $user = new user($r['user_id']); |
299 | 299 | $user->sendRegistrationCode(); |
300 | - ++ $n; |
|
300 | + ++$n; |
|
301 | 301 | } |
302 | 302 | sql_free_result($rs); |
303 | 303 | self::message(0, $n . ' users have been re-sent the activation code'); |