@@ -8,8 +8,8 @@ discard block |
||
8 | 8 | * Do not modify this file - use settings.inc.php! |
9 | 9 | ***************************************************************************/ |
10 | 10 | |
11 | -require_once __DIR__. '/locale.inc.php'; |
|
12 | -require_once __DIR__. '/settings-dist-common.inc.php'; |
|
11 | +require_once __DIR__ . '/locale.inc.php'; |
|
12 | +require_once __DIR__ . '/settings-dist-common.inc.php'; |
|
13 | 13 | |
14 | 14 | /* PHP settings |
15 | 15 | * |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | // database placeholder |
109 | 109 | |
110 | 110 | // productive database with opencaching-tables |
111 | -$opt['db']['placeholder']['db'] = ''; // selected by default |
|
111 | +$opt['db']['placeholder']['db'] = ''; // selected by default |
|
112 | 112 | |
113 | 113 | // empty database for temporary table creation |
114 | 114 | $opt['db']['placeholder']['tmpdb'] = ''; |
@@ -122,14 +122,14 @@ discard block |
||
122 | 122 | $opt['system']['maillog']['syslog_db_user'] = ''; |
123 | 123 | $opt['system']['maillog']['syslog_db_password'] = ''; |
124 | 124 | $opt['system']['maillog']['syslog_db_table'] = ''; |
125 | -$opt['system']['maillog']['syslog_oc_host'] = ''; // 'host_name' column in syslog DB |
|
126 | -$opt['system']['maillog']['syslog_mta'] = 'postfix/smtp%'; // 'program' column in syslog DB |
|
127 | -$opt['system']['maillog']['column']['id'] = 'id'; // 'ID' |
|
128 | -$opt['system']['maillog']['column']['created'] = 'created'; // 'ReceivedAt' |
|
125 | +$opt['system']['maillog']['syslog_oc_host'] = ''; // 'host_name' column in syslog DB |
|
126 | +$opt['system']['maillog']['syslog_mta'] = 'postfix/smtp%'; // 'program' column in syslog DB |
|
127 | +$opt['system']['maillog']['column']['id'] = 'id'; // 'ID' |
|
128 | +$opt['system']['maillog']['column']['created'] = 'created'; // 'ReceivedAt' |
|
129 | 129 | $opt['system']['maillog']['column']['host_name'] = 'host_name'; // 'FromHost' |
130 | -$opt['system']['maillog']['column']['message'] = 'message'; // 'Message' |
|
131 | -$opt['system']['maillog']['column']['program'] = 'program'; // 'SysLogTag' |
|
132 | -$opt['system']['maillog']['inactivity_warning'] = 30; // warn after N days without new entries |
|
130 | +$opt['system']['maillog']['column']['message'] = 'message'; // 'Message' |
|
131 | +$opt['system']['maillog']['column']['program'] = 'program'; // 'SysLogTag' |
|
132 | +$opt['system']['maillog']['inactivity_warning'] = 30; // warn after N days without new entries |
|
133 | 133 | |
134 | 134 | /* cookie or session |
135 | 135 | * |
@@ -151,15 +151,15 @@ discard block |
||
151 | 151 | * |
152 | 152 | * other parameters may be customized |
153 | 153 | */ |
154 | -$opt['session']['mode'] = SAVE_COOKIE; // don't change - other option "SAVE_SESSION" is not implemented properly |
|
154 | +$opt['session']['mode'] = SAVE_COOKIE; // don't change - other option "SAVE_SESSION" is not implemented properly |
|
155 | 155 | $opt['session']['cookiename'] = 'oc_devel'; // only with SAVE_COOKIE |
156 | 156 | $opt['session']['path'] = '/'; |
157 | -$opt['session']['domain'] = ''; // may be overwritten by $opt['domain'][...]['cookiedomain'] |
|
157 | +$opt['session']['domain'] = ''; // may be overwritten by $opt['domain'][...]['cookiedomain'] |
|
158 | 158 | |
159 | 159 | /* maximum session lifetime |
160 | 160 | */ |
161 | 161 | $opt['session']['expire']['cookie'] = 31536000; // when cookies used (default 1 year) |
162 | -$opt['session']['expire']['url'] = 1800; // when no cookies used (default 30 min since last call), attention to session.js |
|
162 | +$opt['session']['expire']['url'] = 1800; // when no cookies used (default 30 min since last call), attention to session.js |
|
163 | 163 | |
164 | 164 | /* If the Referer was sent by the client and the substring was not found, |
165 | 165 | * the embedded session id will be marked as invalid. |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | /* other template options |
186 | 186 | * |
187 | 187 | */ |
188 | -$opt['page']['origin_url'] = 'http://www.opencaching.de/'; // production installation for this OC site |
|
188 | +$opt['page']['origin_url'] = 'http://www.opencaching.de/'; // production installation for this OC site |
|
189 | 189 | $opt['page']['develsystem'] = false; |
190 | 190 | $opt['page']['teampic_url'] = 'http://www.opencaching.de/images/team/'; |
191 | 191 | $opt['page']['teammember_url'] = 'http://www.opencaching.de/'; |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | 'newcaches' => [ |
220 | 220 | 'show' => true, |
221 | 221 | 'url' => 'http://www.opencaching.de', |
222 | - 'urlname' => '', // optional: show other name than the url-domain |
|
222 | + 'urlname' => '', // optional: show other name than the url-domain |
|
223 | 223 | ], |
224 | 224 | ]; |
225 | 225 | |
@@ -378,7 +378,7 @@ discard block |
||
378 | 378 | |
379 | 379 | /* license-related functions |
380 | 380 | */ |
381 | -$opt['logic']['license']['newusers'] = 2; // see license constants in lib2/logic/const.inc.php |
|
381 | +$opt['logic']['license']['newusers'] = 2; // see license constants in lib2/logic/const.inc.php |
|
382 | 382 | $opt['logic']['license']['admin'] = true; |
383 | 383 | $opt['logic']['license']['disclaimer'] = false; |
384 | 384 | $opt['logic']['license']['terms'] = 'articles.php?page=impressum#datalicense'; |
@@ -386,18 +386,18 @@ discard block |
||
386 | 386 | |
387 | 387 | /* optional APIs |
388 | 388 | */ |
389 | -$opt['logic']['api']['email_problems']['key'] = ''; // must be set to enable |
|
390 | -$opt['logic']['api']['user_inactivity']['key'] = ''; // must be set to enable |
|
389 | +$opt['logic']['api']['email_problems']['key'] = ''; // must be set to enable |
|
390 | +$opt['logic']['api']['user_inactivity']['key'] = ''; // must be set to enable |
|
391 | 391 | |
392 | 392 | /* cache report info settings |
393 | 393 | */ |
394 | 394 | $opt['logic']['cache_reports']['delaydays'] = 2; |
395 | -$opt['logic']['cache_reports']['min_processperday'] = 5; // set to 0 to disable |
|
396 | -$opt['logic']['cache_reports']['max_processperday'] = 20; // set to 0 to disable |
|
395 | +$opt['logic']['cache_reports']['min_processperday'] = 5; // set to 0 to disable |
|
396 | +$opt['logic']['cache_reports']['max_processperday'] = 20; // set to 0 to disable |
|
397 | 397 | |
398 | 398 | /* cronjob |
399 | 399 | */ |
400 | -$opt['cron']['username'] = 'apache'; // system username for cronjobs |
|
400 | +$opt['cron']['username'] = 'apache'; // system username for cronjobs |
|
401 | 401 | |
402 | 402 | /* phpbb news integration (index.php, outdated) |
403 | 403 | * |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | $str = ''; |
200 | 200 | |
201 | 201 | ftsearch_load_ignores(); |
202 | - for ($i = count($astr) - 1; $i >= 0; $i --) { |
|
202 | + for ($i = count($astr) - 1; $i >= 0; $i--) { |
|
203 | 203 | // ignore? |
204 | 204 | if (array_search(mb_strtolower($astr[$i]), $ftsearch_ignores) !== false) { |
205 | 205 | unset($astr[$i]); |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | |
255 | 255 | // doppelte chars ersetzen |
256 | 256 | $ordZ = ord('z'); |
257 | - for ($c = ord('a'); $c <= $ordZ; $c ++) { |
|
257 | + for ($c = ord('a'); $c <= $ordZ; $c++) { |
|
258 | 258 | $old_str = ''; |
259 | 259 | while ($old_str !== $str) { |
260 | 260 | $old_str = $str; |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | 'parent' => MNU_MAP |
81 | 81 | ]; |
82 | 82 | $menuitem[MNU_MAP]['subitems'][] = $menu_map; |
83 | - ++ $menu_map; |
|
83 | + ++$menu_map; |
|
84 | 84 | } |
85 | 85 | } |
86 | 86 | } |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | $rsSubmenu = sqlf("SELECT `id` FROM `sys_menu` WHERE `parent`=0 ORDER BY `parent` ASC, `position` ASC"); |
108 | 108 | while ($rSubmenu = sql_fetch_assoc($rsSubmenu)) { |
109 | 109 | $aMenu[MNU_ROOT]['subitems'][$nPos] = $rSubmenu['id']; |
110 | - $nPos ++; |
|
110 | + $nPos++; |
|
111 | 111 | } |
112 | 112 | sql_free_result($rsSubmenu); |
113 | 113 | fwrite($f, "\n"); |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | ); |
145 | 145 | while ($rSubmenu = sql_fetch_assoc($rsSubmenu)) { |
146 | 146 | $aMenu[$r['id']]['subitems'][$nPos] = $rSubmenu['id']; |
147 | - $nPos ++; |
|
147 | + $nPos++; |
|
148 | 148 | } |
149 | 149 | sql_free_result($rsSubmenu); |
150 | 150 | } |
@@ -50,7 +50,7 @@ |
||
50 | 50 | // TODO fix the following if statement, seems corrupted |
51 | 51 | if (strtolower( |
52 | 52 | substr( |
53 | - 'http' + strstr($_SERVER['REFERER'], '://'), |
|
53 | + 'http' +strstr($_SERVER['REFERER'], '://'), |
|
54 | 54 | 0, |
55 | 55 | strlen($opt['page']['absolute_http_url']) |
56 | 56 | ) |
@@ -80,7 +80,7 @@ |
||
80 | 80 | \set_php_locale(); |
81 | 81 | |
82 | 82 | if ($this->translate->t('INTERNAL_LANG', 'all', 'OcSmarty.class.php', '') !== $sLanguage) { |
83 | - echo 'setlocale() failed to set language to ' . $sLanguage ."\n"; |
|
83 | + echo 'setlocale() failed to set language to ' . $sLanguage . "\n"; |
|
84 | 84 | die("Is the translation of INTERNAL_LANG correct?\n"); |
85 | 85 | } |
86 | 86 |
@@ -284,7 +284,7 @@ discard block |
||
284 | 284 | * @param $filename |
285 | 285 | * @param $maxLength |
286 | 286 | * |
287 | - * @return bool|string |
|
287 | + * @return false|string |
|
288 | 288 | */ |
289 | 289 | function read_file($filename, $maxLength = 4096) |
290 | 290 | { |
@@ -453,7 +453,7 @@ discard block |
||
453 | 453 | * |
454 | 454 | * @param $n |
455 | 455 | * |
456 | - * @return mixed|string |
|
456 | + * @return string |
|
457 | 457 | */ |
458 | 458 | function number1000($n) |
459 | 459 | { |
@@ -241,7 +241,7 @@ |
||
241 | 241 | while ($nCurPos < mb_strlen($str)) { |
242 | 242 | $nNextSep = mb_strlen($str); |
243 | 243 | $sepLength = mb_strlen($sep); |
244 | - for ($nSepPos = 0; $nSepPos < $sepLength; $nSepPos ++) { |
|
244 | + for ($nSepPos = 0; $nSepPos < $sepLength; $nSepPos++) { |
|
245 | 245 | $nThisPos = mb_strpos($str, mb_substr($sep, $nSepPos, 1), $nCurPos); |
246 | 246 | if ($nThisPos !== false && $nNextSep > $nThisPos) { |
247 | 247 | $nNextSep = $nThisPos; |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -require_once __DIR__ .'/settings-sample-vagrant.inc.php'; |
|
3 | +require_once __DIR__ . '/settings-sample-vagrant.inc.php'; |
|
4 | 4 | |
5 | 5 | // database access |
6 | 6 | $opt['db']['servername'] = '127.0.0.1'; |
@@ -464,9 +464,9 @@ |
||
464 | 464 | return false; |
465 | 465 | } else { |
466 | 466 | // restore picture file |
467 | - $this->setUrl($original_url); // set the url, so that we can |
|
467 | + $this->setUrl($original_url); // set the url, so that we can |
|
468 | 468 | $filename = $this->getFilename(); // .. retrieve the file path+name |
469 | - $this->setFilenames($filename); // now set url(s) from the new uuid |
|
469 | + $this->setFilenames($filename); // now set url(s) from the new uuid |
|
470 | 470 | try { |
471 | 471 | rename($this->deletedFilename($filename), $this->getFilename()); |
472 | 472 | } catch (Exception $e) { |
@@ -692,7 +692,7 @@ discard block |
||
692 | 692 | } |
693 | 693 | |
694 | 694 | /** |
695 | - * @return bool|string |
|
695 | + * @return string|false |
|
696 | 696 | */ |
697 | 697 | public function getPageLink() |
698 | 698 | { |
@@ -724,7 +724,7 @@ discard block |
||
724 | 724 | /** |
725 | 725 | * @param $tmpFile |
726 | 726 | * @param $longSideSize |
727 | - * @return bool |
|
727 | + * @return null|boolean |
|
728 | 728 | */ |
729 | 729 | public function rotate_and_shrink($tmpFile, $longSideSize) |
730 | 730 | { |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | if ($error == false) { |
74 | 74 | $cache_id = 0; |
75 | 75 | if (isset($_REQUEST['cacheid'])) { |
76 | - $cache_id = (int) $_REQUEST['cacheid']; |
|
76 | + $cache_id = (int)$_REQUEST['cacheid']; |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | if ($usr === false) { |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | } |
135 | 135 | |
136 | 136 | //here we read all used information from the form if submitted, otherwise from DB |
137 | - $cache_name = trim(isset($_POST['name']) ? $_POST['name'] : $cache_record['name']); // Ocprop |
|
137 | + $cache_name = trim(isset($_POST['name']) ? $_POST['name'] : $cache_record['name']); // Ocprop |
|
138 | 138 | $cache_type = isset($_POST['type']) ? $_POST['type'] : $cache_record['type']; |
139 | 139 | if (!isset($_POST['size'])) { |
140 | 140 | if ($cache_type == 4 || $cache_type == 5) { |
@@ -148,15 +148,15 @@ discard block |
||
148 | 148 | $cache_hidden_day = isset($_POST['hidden_day']) ? $_POST['hidden_day'] : date( |
149 | 149 | 'd', |
150 | 150 | strtotime($cache_record['date_hidden']) |
151 | - ); // Ocprop |
|
151 | + ); // Ocprop |
|
152 | 152 | $cache_hidden_month = isset($_POST['hidden_month']) ? $_POST['hidden_month'] : date( |
153 | 153 | 'm', |
154 | 154 | strtotime($cache_record['date_hidden']) |
155 | - ); // Ocprop |
|
155 | + ); // Ocprop |
|
156 | 156 | $cache_hidden_year = isset($_POST['hidden_year']) ? $_POST['hidden_year'] : date( |
157 | 157 | 'Y', |
158 | 158 | strtotime($cache_record['date_hidden']) |
159 | - ); // Ocprop |
|
159 | + ); // Ocprop |
|
160 | 160 | |
161 | 161 | if (is_null($cache_record['date_activate'])) { |
162 | 162 | $cache_activate_day = isset($_POST['activate_day']) ? $_POST['activate_day'] : date('d'); |
@@ -182,11 +182,11 @@ discard block |
||
182 | 182 | ); |
183 | 183 | } |
184 | 184 | |
185 | - $cache_difficulty = isset($_POST['difficulty']) ? $_POST['difficulty'] : $cache_record['difficulty']; // Ocprop |
|
186 | - $cache_terrain = isset($_POST['terrain']) ? $_POST['terrain'] : $cache_record['terrain']; // Ocprop |
|
187 | - $cache_country = isset($_POST['country']) ? $_POST['country'] : $cache_record['country']; // Ocprop |
|
185 | + $cache_difficulty = isset($_POST['difficulty']) ? $_POST['difficulty'] : $cache_record['difficulty']; // Ocprop |
|
186 | + $cache_terrain = isset($_POST['terrain']) ? $_POST['terrain'] : $cache_record['terrain']; // Ocprop |
|
187 | + $cache_country = isset($_POST['country']) ? $_POST['country'] : $cache_record['country']; // Ocprop |
|
188 | 188 | $show_all_countries = isset($_POST['show_all_countries']) ? $_POST['show_all_countries'] : 0; |
189 | - $status = isset($_POST['status']) ? $_POST['status'] : $cache_record['status']; // Ocprop |
|
189 | + $status = isset($_POST['status']) ? $_POST['status'] : $cache_record['status']; // Ocprop |
|
190 | 190 | $status_old = $cache_record['status']; |
191 | 191 | $search_time = isset($_POST['search_time']) ? $_POST['search_time'] : $cache_record['search_time']; |
192 | 192 | $way_length = isset($_POST['way_length']) ? $_POST['way_length'] : $cache_record['way_length']; |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | |
247 | 247 | $log_pw = isset($_POST['log_pw']) ? mb_substr($_POST['log_pw'], 0, 20) : $cache_record['logpw']; |
248 | 248 | // fix #4356: gc waypoints are frequently copy&pasted with leading spaces |
249 | - $wp_gc = isset($_POST['wp_gc']) ? strtoupper(trim($_POST['wp_gc'])) : $cache_record['wp_gc']; // Ocprop |
|
249 | + $wp_gc = isset($_POST['wp_gc']) ? strtoupper(trim($_POST['wp_gc'])) : $cache_record['wp_gc']; // Ocprop |
|
250 | 250 | $showlists = isset($_POST['showlists']) ? 1 : $cache_record['show_cachelists'] + 0; |
251 | 251 | $protect_old_coords = isset($_POST['protect_old_coords']) ? 1 : $cache_record['protect_old_coords'] + 0; |
252 | 252 | |
@@ -258,12 +258,12 @@ discard block |
||
258 | 258 | |
259 | 259 | if (isset($_POST['latNS'])) { |
260 | 260 | //get coords from post-form |
261 | - $coords_latNS = $_POST['latNS']; // Ocprop |
|
262 | - $coords_lonEW = $_POST['lonEW']; // Ocprop |
|
263 | - $coords_lat_h = $_POST['lat_h']; // Ocprop |
|
264 | - $coords_lon_h = $_POST['lon_h']; // Ocprop |
|
265 | - $coords_lat_min = $_POST['lat_min']; // Ocprop |
|
266 | - $coords_lon_min = $_POST['lon_min']; // Ocprop |
|
261 | + $coords_latNS = $_POST['latNS']; // Ocprop |
|
262 | + $coords_lonEW = $_POST['lonEW']; // Ocprop |
|
263 | + $coords_lat_h = $_POST['lat_h']; // Ocprop |
|
264 | + $coords_lon_h = $_POST['lon_h']; // Ocprop |
|
265 | + $coords_lat_min = $_POST['lat_min']; // Ocprop |
|
266 | + $coords_lon_min = $_POST['lon_min']; // Ocprop |
|
267 | 267 | } else { |
268 | 268 | //get coords from DB |
269 | 269 | $coords_lon = $cache_record['longitude']; |
@@ -561,7 +561,7 @@ discard block |
||
561 | 561 | $logtype = 13; |
562 | 562 | break; |
563 | 563 | default: |
564 | - $logtype = 0; // ??? |
|
564 | + $logtype = 0; // ??? |
|
565 | 565 | } |
566 | 566 | if ($logtype > 0) { |
567 | 567 | sql( |
@@ -1048,7 +1048,7 @@ discard block |
||
1048 | 1048 | tpl_set_var('showlists_checked', $showlists ? 'checked="checked"' : ''); |
1049 | 1049 | tpl_set_var('protectcoords_checked', $protect_old_coords ? 'checked="checked"' : ''); |
1050 | 1050 | |
1051 | - tpl_set_var('reset', $reset); // obsolete |
|
1051 | + tpl_set_var('reset', $reset); // obsolete |
|
1052 | 1052 | tpl_set_var('submit', $submit); |
1053 | 1053 | } else { |
1054 | 1054 | //TODO: not the owner |