@@ -35,6 +35,6 @@ |
||
35 | 35 | |
36 | 36 | protected function getValue($value) |
37 | 37 | { |
38 | - return (int) $value; |
|
38 | + return (int)$value; |
|
39 | 39 | } |
40 | 40 | } |
@@ -24,7 +24,7 @@ |
||
24 | 24 | $tr = []; |
25 | 25 | $p = 0; |
26 | 26 | |
27 | - for ($i = 1; $i < func_num_args(); $i ++) { |
|
27 | + for ($i = 1; $i < func_num_args(); $i++) { |
|
28 | 28 | $arg = func_get_arg($i); |
29 | 29 | |
30 | 30 | if (is_array($arg)) { |
@@ -32,7 +32,7 @@ |
||
32 | 32 | if (!isset($counter[$name])) { |
33 | 33 | $counter[$name] = 0; |
34 | 34 | } |
35 | - $counter[$name] ++; |
|
35 | + $counter[$name]++; |
|
36 | 36 | |
37 | 37 | if ($smarty->_cache_including) { |
38 | 38 | $param = isset($smarty->_cache_info['cached_vars'][$name][$counter[$name]]) ? $smarty->_cache_info['cached_vars'][$name][$counter[$name]] : []; |
@@ -80,7 +80,7 @@ |
||
80 | 80 | ]; |
81 | 81 | |
82 | 82 | $nTimestamp = time(); |
83 | - for ($nIndex = 0; $nIndex < count($seasons); $nIndex ++) { |
|
83 | + for ($nIndex = 0; $nIndex < count($seasons); $nIndex++) { |
|
84 | 84 | if (strtotime($seasons[$nIndex][0]) > $nTimestamp) { |
85 | 85 | return $params['winter']; |
86 | 86 | } //''; |
@@ -33,7 +33,7 @@ discard block |
||
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'], |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | 'OC_NODE_ID' => $opt['logic']['node']['id'], |
55 | 55 | 'OC_COOKIE_NAME' => $opt['session']['cookiename'] . 'data', |
56 | 56 | 'OCDE_HTML_PURIFIER_SETTINGS' |
57 | - => $opt['html_purifier'], |
|
57 | + => $opt['html_purifier'], |
|
58 | 58 | 'GITHUB_ACCESS_TOKEN' => $opt['okapi']['github_access_token'], |
59 | 59 | ); |
60 | 60 | } |
@@ -16,7 +16,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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', |
@@ -48,14 +48,14 @@ |
||
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) |
@@ -186,7 +186,7 @@ |
||
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); |
@@ -12,8 +12,7 @@ |
||
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 |
@@ -69,7 +69,7 @@ discard block |
||
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 |
||
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 |
||
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)) { |