@@ -19,23 +19,23 @@ discard block |
||
19 | 19 | } |
20 | 20 | |
21 | 21 | // chicken-egg problem ... |
22 | -require_once $opt['rootpath'] . 'lib2/const.inc.php'; |
|
22 | +require_once $opt['rootpath'].'lib2/const.inc.php'; |
|
23 | 23 | |
24 | 24 | // do all output in HTML format |
25 | 25 | $opt['gui'] = GUI_HTML; |
26 | 26 | |
27 | 27 | // include the main library |
28 | -require_once $opt['rootpath'] . 'lib2/common.inc.php'; |
|
28 | +require_once $opt['rootpath'].'lib2/common.inc.php'; |
|
29 | 29 | |
30 | 30 | // enforce http or https? |
31 | 31 | if ($opt['page']['https']['mode'] == HTTPS_DISABLED) { |
32 | 32 | if ($opt['page']['https']['active']) { |
33 | - $tpl->redirect('http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']); |
|
33 | + $tpl->redirect('http://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']); |
|
34 | 34 | } |
35 | 35 | $opt['page']['force_https_login'] = false; |
36 | 36 | } elseif ($opt['page']['https']['mode'] == HTTPS_ENFORCED) { |
37 | 37 | if (!$opt['page']['https']['active']) { |
38 | - $tpl->redirect('https://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']); |
|
38 | + $tpl->redirect('https://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']); |
|
39 | 39 | } |
40 | 40 | $opt['page']['force_https_login'] = true; |
41 | 41 | } |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | if (substr($helppage, 0, 1) == "!") { |
84 | 84 | substr($helppage, 1); |
85 | 85 | } elseif ($helppage != "" && isset($opt['locale'][$help_locale]['helpwiki'])) { |
86 | - return $opt['locale'][$help_locale]['helpwiki'] . str_replace(' ', '_', $helppage); |
|
86 | + return $opt['locale'][$help_locale]['helpwiki'].str_replace(' ', '_', $helppage); |
|
87 | 87 | } else { |
88 | 88 | return ""; |
89 | 89 | } |
@@ -98,8 +98,8 @@ discard block |
||
98 | 98 | return ""; |
99 | 99 | } else { |
100 | 100 | $imgtitle = $translate->t($title, '', basename(__FILE__), __LINE__); |
101 | - $imgtitle = "alt='" . $imgtitle . "' title='" . $imgtitle . "'"; |
|
101 | + $imgtitle = "alt='".$imgtitle."' title='".$imgtitle."'"; |
|
102 | 102 | |
103 | - return "<a class='nooutline' href='" . $helpurl . "' " . $imgtitle . " target='_blank'>"; |
|
103 | + return "<a class='nooutline' href='".$helpurl."' ".$imgtitle." target='_blank'>"; |
|
104 | 104 | } |
105 | 105 | } |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | * Shortcut for cachelist search |
8 | 8 | ***************************************************************************/ |
9 | 9 | |
10 | -require __DIR__ . '/lib2/web.inc.php'; |
|
10 | +require __DIR__.'/lib2/web.inc.php'; |
|
11 | 11 | |
12 | 12 | $id = isset($_REQUEST['id']) ? $_REQUEST['id'] + 0 : 0; |
13 | 13 | $password = isset($_REQUEST['key']) ? $_REQUEST['key'] : ''; |
@@ -33,9 +33,9 @@ discard block |
||
33 | 33 | } |
34 | 34 | } |
35 | 35 | |
36 | - $tpl->redirect("search.php?searchto=searchbylist&listid=" . $id . |
|
37 | - ($password != "" ? "&listkey=" . urlencode($password) : "") . |
|
38 | - "&showresult=1&f_disabled=0&f_inactive=0&f_ignored=1&sort=byname" . $invalid_waypoints); |
|
36 | + $tpl->redirect("search.php?searchto=searchbylist&listid=".$id. |
|
37 | + ($password != "" ? "&listkey=".urlencode($password) : ""). |
|
38 | + "&showresult=1&f_disabled=0&f_inactive=0&f_ignored=1&sort=byname".$invalid_waypoints); |
|
39 | 39 | } else { |
40 | 40 | $tpl->redirect("cachelists.php"); |
41 | 41 | } |
@@ -9,10 +9,10 @@ discard block |
||
9 | 9 | * Unicode Reminder メモ |
10 | 10 | ***************************************************************************/ |
11 | 11 | |
12 | -require_once __DIR__ . '/lib/consts.inc.php'; |
|
12 | +require_once __DIR__.'/lib/consts.inc.php'; |
|
13 | 13 | $opt['gui'] = GUI_HTML; |
14 | -require_once __DIR__ . '/lib/common.inc.php'; |
|
15 | -require_once __DIR__ . '/lib2/edithelper.inc.php'; |
|
14 | +require_once __DIR__.'/lib/common.inc.php'; |
|
15 | +require_once __DIR__.'/lib2/edithelper.inc.php'; |
|
16 | 16 | |
17 | 17 | $no_tpl_build = false; |
18 | 18 | |
@@ -33,10 +33,10 @@ discard block |
||
33 | 33 | |
34 | 34 | //set here the template to process |
35 | 35 | $tplname = 'newcache'; |
36 | - require_once $stylepath . '/' . $tplname . '.inc.php'; |
|
36 | + require_once $stylepath.'/'.$tplname.'.inc.php'; |
|
37 | 37 | |
38 | 38 | //set template replacements |
39 | - tpl_set_var('reset', $reset); // obsolete |
|
39 | + tpl_set_var('reset', $reset); // obsolete |
|
40 | 40 | tpl_set_var('submit', $submit); |
41 | 41 | tpl_set_var('general_message', ''); |
42 | 42 | tpl_set_var('hidden_since_message', ''); |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | tpl_set_var('diff_message', ''); |
54 | 54 | tpl_set_var('safari_message', ''); |
55 | 55 | |
56 | - $sel_type = isset($_POST['type']) ? $_POST['type'] : 0; // Ocprop |
|
56 | + $sel_type = isset($_POST['type']) ? $_POST['type'] : 0; // Ocprop |
|
57 | 57 | if (!isset($_POST['size'])) { |
58 | 58 | if ($sel_type == 4 || $sel_type == 5) { |
59 | 59 | $sel_size = 7; |
@@ -61,15 +61,15 @@ discard block |
||
61 | 61 | $sel_size = - 1; |
62 | 62 | } |
63 | 63 | } else { |
64 | - $sel_size = isset($_POST['size']) ? $_POST['size'] : - 1; // Ocprop |
|
64 | + $sel_size = isset($_POST['size']) ? $_POST['size'] : - 1; // Ocprop |
|
65 | 65 | } |
66 | 66 | $sel_lang = isset($_POST['desc_lang']) ? $_POST['desc_lang'] : $default_lang; |
67 | - $sel_country = isset($_POST['country']) ? $_POST['country'] : getUserCountry(); // Ocprop |
|
67 | + $sel_country = isset($_POST['country']) ? $_POST['country'] : getUserCountry(); // Ocprop |
|
68 | 68 | $show_all_countries = isset($_POST['show_all_countries']) ? $_POST['show_all_countries'] : 0; |
69 | 69 | $show_all_langs = isset($_POST['show_all_langs']) ? $_POST['show_all_langs'] : 0; |
70 | 70 | |
71 | 71 | //coords |
72 | - $lonEW = isset($_POST['lonEW']) ? $_POST['lonEW'] : $default_EW; // Ocprop |
|
72 | + $lonEW = isset($_POST['lonEW']) ? $_POST['lonEW'] : $default_EW; // Ocprop |
|
73 | 73 | if ($lonEW == 'E') { |
74 | 74 | tpl_set_var('lonEsel', ' selected="selected"'); |
75 | 75 | tpl_set_var('lonWsel', ''); |
@@ -77,13 +77,13 @@ discard block |
||
77 | 77 | tpl_set_var('lonEsel', ''); |
78 | 78 | tpl_set_var('lonWsel', ' selected="selected"'); |
79 | 79 | } |
80 | - $lon_h = isset($_POST['lon_h']) ? $_POST['lon_h'] : '0'; // Ocprop |
|
80 | + $lon_h = isset($_POST['lon_h']) ? $_POST['lon_h'] : '0'; // Ocprop |
|
81 | 81 | tpl_set_var('lon_h', htmlspecialchars($lon_h, ENT_COMPAT, 'UTF-8')); |
82 | 82 | |
83 | - $lon_min = isset($_POST['lon_min']) ? $_POST['lon_min'] : '00.000'; // Ocprop |
|
83 | + $lon_min = isset($_POST['lon_min']) ? $_POST['lon_min'] : '00.000'; // Ocprop |
|
84 | 84 | tpl_set_var('lon_min', htmlspecialchars($lon_min, ENT_COMPAT, 'UTF-8')); |
85 | 85 | |
86 | - $latNS = isset($_POST['latNS']) ? $_POST['latNS'] : $default_NS; // Ocprop |
|
86 | + $latNS = isset($_POST['latNS']) ? $_POST['latNS'] : $default_NS; // Ocprop |
|
87 | 87 | if ($latNS == 'N') { |
88 | 88 | tpl_set_var('latNsel', ' selected="selected"'); |
89 | 89 | tpl_set_var('latSsel', ''); |
@@ -91,14 +91,14 @@ discard block |
||
91 | 91 | tpl_set_var('latNsel', ''); |
92 | 92 | tpl_set_var('latSsel', ' selected="selected"'); |
93 | 93 | } |
94 | - $lat_h = isset($_POST['lat_h']) ? $_POST['lat_h'] : '0'; // Ocprop |
|
94 | + $lat_h = isset($_POST['lat_h']) ? $_POST['lat_h'] : '0'; // Ocprop |
|
95 | 95 | tpl_set_var('lat_h', htmlspecialchars($lat_h, ENT_COMPAT, 'UTF-8')); |
96 | 96 | |
97 | - $lat_min = isset($_POST['lat_min']) ? $_POST['lat_min'] : '00.000'; // Ocprop |
|
97 | + $lat_min = isset($_POST['lat_min']) ? $_POST['lat_min'] : '00.000'; // Ocprop |
|
98 | 98 | tpl_set_var('lat_min', htmlspecialchars($lat_min, ENT_COMPAT, 'UTF-8')); |
99 | 99 | |
100 | 100 | //name |
101 | - $name = isset($_POST['name']) ? trim($_POST['name']) : ''; // Ocprop |
|
101 | + $name = isset($_POST['name']) ? trim($_POST['name']) : ''; // Ocprop |
|
102 | 102 | tpl_set_var('name', htmlspecialchars($name, ENT_COMPAT, 'UTF-8')); |
103 | 103 | |
104 | 104 | //shortdesc |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | $oldDescMode = $descMode; |
121 | 121 | } |
122 | 122 | } else { |
123 | - if (sqlValue("SELECT `no_htmledit_flag` FROM `user` WHERE `user_id`='" . sql_escape($usr['userid']) . "'", 1) == 1) { |
|
123 | + if (sqlValue("SELECT `no_htmledit_flag` FROM `user` WHERE `user_id`='".sql_escape($usr['userid'])."'", 1) == 1) { |
|
124 | 124 | $descMode = 1; |
125 | 125 | } else { |
126 | 126 | $descMode = 3; |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | |
131 | 131 | // fuer alte Versionen von OCProp |
132 | 132 | if (isset($_POST['submit']) && !isset($_POST['version2'])) { |
133 | - $descMode = (isset($_POST['desc_html']) && ($_POST['desc_html'] == 1)) ? 2 : 1; // Ocprop |
|
133 | + $descMode = (isset($_POST['desc_html']) && ($_POST['desc_html'] == 1)) ? 2 : 1; // Ocprop |
|
134 | 134 | $_POST['submitform'] = $_POST['submit']; |
135 | 135 | |
136 | 136 | $short_desc = iconv("ISO-8859-1", "UTF-8", $short_desc); |
@@ -152,13 +152,13 @@ discard block |
||
152 | 152 | |
153 | 153 | tpl_set_var('desc', htmlspecialchars($desc, ENT_COMPAT, 'UTF-8')); |
154 | 154 | |
155 | - $headers = tpl_get_var('htmlheaders') . "\n"; |
|
155 | + $headers = tpl_get_var('htmlheaders')."\n"; |
|
156 | 156 | if ($descMode == 3) { |
157 | 157 | // TinyMCE |
158 | - $headers .= '<script language="javascript" type="text/javascript" src="resource2/tinymce/tiny_mce_gzip.js"></script>' . "\n"; |
|
159 | - $headers .= '<script language="javascript" type="text/javascript" src="resource2/tinymce/config/desc.js.php?cacheid=0&lang=' . strtolower($locale) . '"></script>' . "\n"; |
|
158 | + $headers .= '<script language="javascript" type="text/javascript" src="resource2/tinymce/tiny_mce_gzip.js"></script>'."\n"; |
|
159 | + $headers .= '<script language="javascript" type="text/javascript" src="resource2/tinymce/config/desc.js.php?cacheid=0&lang='.strtolower($locale).'"></script>'."\n"; |
|
160 | 160 | } |
161 | - $headers .= '<script language="javascript" type="text/javascript" src="' . editorJsPath() . '"></script>' . "\n"; |
|
161 | + $headers .= '<script language="javascript" type="text/javascript" src="'.editorJsPath().'"></script>'."\n"; |
|
162 | 162 | tpl_set_var('htmlheaders', $headers); |
163 | 163 | |
164 | 164 | //effort |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | $st_hours = floor($search_time); |
183 | 183 | $st_minutes = sprintf('%02.0F', ($search_time - $st_hours) * 60); |
184 | 184 | |
185 | - tpl_set_var('search_time', $st_hours . ':' . $st_minutes); |
|
185 | + tpl_set_var('search_time', $st_hours.':'.$st_minutes); |
|
186 | 186 | tpl_set_var('way_length', $way_length); |
187 | 187 | |
188 | 188 | |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | } |
197 | 197 | |
198 | 198 | //tos |
199 | - $tos = isset($_POST['TOS']) ? 1 : 0; // Ocprop |
|
199 | + $tos = isset($_POST['TOS']) ? 1 : 0; // Ocprop |
|
200 | 200 | if ($tos == 1) { |
201 | 201 | tpl_set_var('toschecked', ' checked="checked"'); |
202 | 202 | } else { |
@@ -204,9 +204,9 @@ discard block |
||
204 | 204 | } |
205 | 205 | |
206 | 206 | //hidden_since |
207 | - $hidden_day = isset($_POST['hidden_day']) ? $_POST['hidden_day'] : date('d'); // Ocprop |
|
208 | - $hidden_month = isset($_POST['hidden_month']) ? $_POST['hidden_month'] : date('m'); // Ocprop |
|
209 | - $hidden_year = isset($_POST['hidden_year']) ? $_POST['hidden_year'] : date('Y'); // Ocprop |
|
207 | + $hidden_day = isset($_POST['hidden_day']) ? $_POST['hidden_day'] : date('d'); // Ocprop |
|
208 | + $hidden_month = isset($_POST['hidden_month']) ? $_POST['hidden_month'] : date('m'); // Ocprop |
|
209 | + $hidden_year = isset($_POST['hidden_year']) ? $_POST['hidden_year'] : date('Y'); // Ocprop |
|
210 | 210 | tpl_set_var('hidden_day', htmlspecialchars($hidden_day, ENT_COMPAT, 'UTF-8')); |
211 | 211 | tpl_set_var('hidden_month', htmlspecialchars($hidden_month, ENT_COMPAT, 'UTF-8')); |
212 | 212 | tpl_set_var('hidden_year', htmlspecialchars($hidden_year, ENT_COMPAT, 'UTF-8')); |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | tpl_set_var('publish_later_checked', ''); |
224 | 224 | tpl_set_var('publish_notnow_checked', ''); |
225 | 225 | |
226 | - $publish = isset($_POST['publish']) ? $_POST['publish'] : 'now2'; // Ocprop |
|
226 | + $publish = isset($_POST['publish']) ? $_POST['publish'] : 'now2'; // Ocprop |
|
227 | 227 | if ($publish == 'now2') { |
228 | 228 | tpl_set_var('publish_now_checked', 'checked'); |
229 | 229 | } elseif ($publish == 'later') { |
@@ -237,11 +237,11 @@ discard block |
||
237 | 237 | // fill activate hours |
238 | 238 | $activate_hour = isset($_POST['activate_hour']) ? $_POST['activate_hour'] + 0 : date('H') + 0; |
239 | 239 | $activation_hours = ''; |
240 | - for ($i = 0; $i <= 23; $i ++) { |
|
240 | + for ($i = 0; $i <= 23; $i++) { |
|
241 | 241 | if ($activate_hour == $i) { |
242 | - $activation_hours .= '<option value="' . $i . '" selected="selected">' . $i . '</option>'; |
|
242 | + $activation_hours .= '<option value="'.$i.'" selected="selected">'.$i.'</option>'; |
|
243 | 243 | } else { |
244 | - $activation_hours .= '<option value="' . $i . '">' . $i . '</option>'; |
|
244 | + $activation_hours .= '<option value="'.$i.'">'.$i.'</option>'; |
|
245 | 245 | } |
246 | 246 | $activation_hours .= "\n"; |
247 | 247 | } |
@@ -253,30 +253,30 @@ discard block |
||
253 | 253 | |
254 | 254 | // gc- and nc-waypoints |
255 | 255 | // fix #4356: gc waypoints are frequently copy&pasted with leading spaces |
256 | - $wp_gc = isset($_POST['wp_gc']) ? strtoupper(trim($_POST['wp_gc'])) : ''; // Ocprop |
|
256 | + $wp_gc = isset($_POST['wp_gc']) ? strtoupper(trim($_POST['wp_gc'])) : ''; // Ocprop |
|
257 | 257 | tpl_set_var('wp_gc', htmlspecialchars($wp_gc, ENT_COMPAT, 'UTF-8')); |
258 | 258 | |
259 | 259 | //difficulty |
260 | - $difficulty = isset($_POST['difficulty']) ? $_POST['difficulty'] : 1; // Ocprop |
|
261 | - $difficulty_options = '<option value="1">' . $sel_message . '</option>'; |
|
262 | - for ($i = 2; $i <= 10; $i ++) { |
|
260 | + $difficulty = isset($_POST['difficulty']) ? $_POST['difficulty'] : 1; // Ocprop |
|
261 | + $difficulty_options = '<option value="1">'.$sel_message.'</option>'; |
|
262 | + for ($i = 2; $i <= 10; $i++) { |
|
263 | 263 | if ($difficulty == $i) { |
264 | - $difficulty_options .= '<option value="' . $i . '" selected="selected">' . $i / 2 . '</option>'; |
|
264 | + $difficulty_options .= '<option value="'.$i.'" selected="selected">'.$i / 2.'</option>'; |
|
265 | 265 | } else { |
266 | - $difficulty_options .= '<option value="' . $i . '">' . $i / 2 . '</option>'; |
|
266 | + $difficulty_options .= '<option value="'.$i.'">'.$i / 2.'</option>'; |
|
267 | 267 | } |
268 | 268 | $difficulty_options .= "\n"; |
269 | 269 | } |
270 | 270 | tpl_set_var('difficulty_options', $difficulty_options); |
271 | 271 | |
272 | 272 | //terrain |
273 | - $terrain = isset($_POST['terrain']) ? $_POST['terrain'] : 1; // Ocprop |
|
274 | - $terrain_options = '<option value="1">' . $sel_message . '</option>'; |
|
275 | - for ($i = 2; $i <= 10; $i ++) { |
|
273 | + $terrain = isset($_POST['terrain']) ? $_POST['terrain'] : 1; // Ocprop |
|
274 | + $terrain_options = '<option value="1">'.$sel_message.'</option>'; |
|
275 | + for ($i = 2; $i <= 10; $i++) { |
|
276 | 276 | if ($terrain == $i) { |
277 | - $terrain_options .= '<option value="' . $i . '" selected="selected">' . $i / 2 . '</option>'; |
|
277 | + $terrain_options .= '<option value="'.$i.'" selected="selected">'.$i / 2.'</option>'; |
|
278 | 278 | } else { |
279 | - $terrain_options .= '<option value="' . $i . '">' . $i / 2 . '</option>'; |
|
279 | + $terrain_options .= '<option value="'.$i.'">'.$i / 2.'</option>'; |
|
280 | 280 | } |
281 | 281 | $terrain_options .= "\n"; |
282 | 282 | } |
@@ -284,34 +284,34 @@ discard block |
||
284 | 284 | |
285 | 285 | //sizeoptions |
286 | 286 | $sSelected = ($sel_size == - 1) ? ' selected="selected"' : ''; |
287 | - $sizes = '<option value="-1"' . $sSelected . '>' . htmlspecialchars(t('Please select!'), ENT_COMPAT, 'UTF-8') . '</option>'; |
|
287 | + $sizes = '<option value="-1"'.$sSelected.'>'.htmlspecialchars(t('Please select!'), ENT_COMPAT, 'UTF-8').'</option>'; |
|
288 | 288 | $rsSizes = sql( |
289 | 289 | "SELECT `cache_size`.`id`, IFNULL(`sys_trans_text`.`text`, `cache_size`.`name`) AS `name` |
290 | 290 | FROM `cache_size` |
291 | 291 | LEFT JOIN `sys_trans` ON `cache_size`.`trans_id`=`sys_trans`.`id` |
292 | 292 | LEFT JOIN `sys_trans_text` ON `sys_trans`.`id`=`sys_trans_text`.`trans_id` AND |
293 | - `sys_trans_text`.`lang`='" . sql_escape($locale) . "' |
|
293 | + `sys_trans_text`.`lang`='" . sql_escape($locale)."' |
|
294 | 294 | ORDER BY `cache_size`.`ordinal` ASC" |
295 | 295 | ); |
296 | 296 | while ($rSize = sql_fetch_assoc($rsSizes)) { |
297 | 297 | $sSelected = ($rSize['id'] == $sel_size) ? ' selected="selected"' : ''; |
298 | - $sizes .= '<option value="' . $rSize['id'] . '"' . $sSelected . '>' . htmlspecialchars($rSize['name'], ENT_COMPAT, 'UTF-8') . '</option>'; |
|
298 | + $sizes .= '<option value="'.$rSize['id'].'"'.$sSelected.'>'.htmlspecialchars($rSize['name'], ENT_COMPAT, 'UTF-8').'</option>'; |
|
299 | 299 | } |
300 | 300 | sql_free_result($rsSizes); |
301 | 301 | tpl_set_var('sizeoptions', $sizes); |
302 | 302 | |
303 | 303 | //typeoptions |
304 | 304 | $sSelected = ($sel_type == - 1) ? ' selected="selected"' : ''; |
305 | - $types = '<option value="-1"' . $sSelected . '>' . htmlspecialchars(t('Please select!'), ENT_COMPAT, 'UTF-8') . '</option>'; |
|
305 | + $types = '<option value="-1"'.$sSelected.'>'.htmlspecialchars(t('Please select!'), ENT_COMPAT, 'UTF-8').'</option>'; |
|
306 | 306 | $rsTypes = sql("SELECT `cache_type`.`id`, IFNULL(`sys_trans_text`.`text`, `cache_type`.`en`) AS `name` |
307 | 307 | FROM `cache_type` |
308 | 308 | LEFT JOIN `sys_trans` ON `cache_type`.`trans_id`=`sys_trans`.`id` |
309 | 309 | LEFT JOIN `sys_trans_text` ON `sys_trans`.`id`=`sys_trans_text`.`trans_id` AND |
310 | - `sys_trans_text`.`lang`='" . sql_escape($locale) . "' |
|
310 | + `sys_trans_text`.`lang`='" . sql_escape($locale)."' |
|
311 | 311 | ORDER BY `cache_type`.`ordinal` ASC"); |
312 | 312 | while ($rType = sql_fetch_assoc($rsTypes)) { |
313 | 313 | $sSelected = ($rType['id'] == $sel_type) ? ' selected="selected"' : ''; |
314 | - $types .= '<option value="' . $rType['id'] . '"' . $sSelected . '>' . htmlspecialchars($rType['name'], ENT_COMPAT, 'UTF-8') . '</option>'; |
|
314 | + $types .= '<option value="'.$rType['id'].'"'.$sSelected.'>'.htmlspecialchars($rType['name'], ENT_COMPAT, 'UTF-8').'</option>'; |
|
315 | 315 | } |
316 | 316 | sql_free_result($rsTypes); |
317 | 317 | tpl_set_var('typeoptions', $types); |
@@ -342,7 +342,7 @@ discard block |
||
342 | 342 | tpl_set_var('show_all_langs', '0'); |
343 | 343 | tpl_set_var( |
344 | 344 | 'show_all_langs_submit', |
345 | - '<input type="submit" name="show_all_langs_submit" value="' . $show_all . '"/>' |
|
345 | + '<input type="submit" name="show_all_langs_submit" value="'.$show_all.'"/>' |
|
346 | 346 | ); |
347 | 347 | |
348 | 348 | $rs = sql( |
@@ -376,7 +376,7 @@ discard block |
||
376 | 376 | |
377 | 377 | while ($record = sql_fetch_assoc($rs)) { |
378 | 378 | $sSelected = ($record['short'] == $sel_lang) ? ' selected="selected"' : ''; |
379 | - $langsoptions .= '<option value="' . htmlspecialchars($record['short'], ENT_COMPAT, 'UTF-8') . '"' . $sSelected . '>' . htmlspecialchars($record['name'], ENT_COMPAT, 'UTF-8') . '</option>' . "\n"; |
|
379 | + $langsoptions .= '<option value="'.htmlspecialchars($record['short'], ENT_COMPAT, 'UTF-8').'"'.$sSelected.'>'.htmlspecialchars($record['name'], ENT_COMPAT, 'UTF-8').'</option>'."\n"; |
|
380 | 380 | } |
381 | 381 | |
382 | 382 | tpl_set_var('langoptions', $langsoptions); |
@@ -399,7 +399,7 @@ discard block |
||
399 | 399 | |
400 | 400 | if ($show_all_countries == 0) { |
401 | 401 | tpl_set_var('show_all_countries', '0'); |
402 | - tpl_set_var('show_all_countries_submit', '<input type="submit" id="showallcountries" class="formbutton" name="show_all_countries_submit" value="' . $show_all . '" onclick="submitbutton(\'showallcountries\')" />'); |
|
402 | + tpl_set_var('show_all_countries_submit', '<input type="submit" id="showallcountries" class="formbutton" name="show_all_countries_submit" value="'.$show_all.'" onclick="submitbutton(\'showallcountries\')" />'); |
|
403 | 403 | |
404 | 404 | $rs = sql( |
405 | 405 | "SELECT `countries`.`short`, IFNULL(`sys_trans_text`.`text`, `countries`.`name`) AS `name` |
@@ -434,7 +434,7 @@ discard block |
||
434 | 434 | // build the "country" dropdown list, preselect $sel_country |
435 | 435 | while ($record = sql_fetch_array($rs)) { |
436 | 436 | $sSelected = ($record['short'] == $sel_country) ? ' selected="selected"' : ''; |
437 | - $countriesoptions .= '<option value="' . htmlspecialchars($record['short'], ENT_COMPAT, 'UTF-8') . '"' . $sSelected . '>' . htmlspecialchars($record['name'], ENT_COMPAT, 'UTF-8') . '</option>' . "\n"; |
|
437 | + $countriesoptions .= '<option value="'.htmlspecialchars($record['short'], ENT_COMPAT, 'UTF-8').'"'.$sSelected.'>'.htmlspecialchars($record['name'], ENT_COMPAT, 'UTF-8').'</option>'."\n"; |
|
438 | 438 | } |
439 | 439 | sql_free_result($rs); |
440 | 440 | |
@@ -488,7 +488,7 @@ discard block |
||
488 | 488 | LEFT JOIN `sys_trans_text` AS `ttdesc` |
489 | 489 | ON `tdesc`.`id`=`ttdesc`.`trans_id` |
490 | 490 | AND `ttdesc`.`lang`='&1' |
491 | - WHERE `cache_attrib`.`group_id`=" . ($rAttrGroup['id'] + 0) . " |
|
491 | + WHERE `cache_attrib`.`group_id`=" . ($rAttrGroup['id'] + 0)." |
|
492 | 492 | AND NOT IFNULL(`cache_attrib`.`hidden`, 0)=1 |
493 | 493 | AND `cache_attrib`.`selectable`!=0 |
494 | 494 | ORDER BY `cache_attrib`.`group_id`, `cache_attrib`.`id`", |
@@ -508,7 +508,7 @@ discard block |
||
508 | 508 | $line = mb_ereg_replace('{name}', escape_javascript($record['name']), $line); |
509 | 509 | $line = mb_ereg_replace('{color}', $rAttrGroup['color'], $line); |
510 | 510 | $group_line .= $line; |
511 | - $nLineAttrCount ++; |
|
511 | + $nLineAttrCount++; |
|
512 | 512 | |
513 | 513 | $line = $cache_attrib_js; |
514 | 514 | $line = mb_ereg_replace('{id}', $record['id'], $line); |
@@ -674,8 +674,8 @@ discard block |
||
674 | 674 | "SELECT MIN(wp_oc) |
675 | 675 | FROM `caches` |
676 | 676 | WHERE `status`=1 |
677 | - AND ROUND(`longitude`,6)=ROUND('" . sql_escape($longitude) . "',6) |
|
678 | - AND ROUND(`latitude`,6)=ROUND('" . sql_escape($latitude) . "',6)", |
|
677 | + AND ROUND(`longitude`,6)=ROUND('" . sql_escape($longitude)."',6) |
|
678 | + AND ROUND(`latitude`,6)=ROUND('" . sql_escape($latitude)."',6)", |
|
679 | 679 | null |
680 | 680 | ); |
681 | 681 | if ($duplicate_wpoc) { |
@@ -813,7 +813,7 @@ discard block |
||
813 | 813 | $activation_column = ' '; |
814 | 814 | } elseif ($publish == 'later') { |
815 | 815 | $sel_status = 5; |
816 | - $activation_date = "'" . date( |
|
816 | + $activation_date = "'".date( |
|
817 | 817 | 'Y-m-d H:i:s', |
818 | 818 | mktime( |
819 | 819 | $activate_hour, |
@@ -822,7 +822,7 @@ discard block |
||
822 | 822 | $activate_month, |
823 | 823 | $activate_day, |
824 | 824 | $activate_year |
825 | - )). "'"; |
|
825 | + ))."'"; |
|
826 | 826 | } elseif ($publish == 'notnow') { |
827 | 827 | $sel_status = 5; |
828 | 828 | $activation_date = 'NULL'; |
@@ -902,7 +902,7 @@ discard block |
||
902 | 902 | ); |
903 | 903 | |
904 | 904 | // insert cache-attributes |
905 | - for ($i = 0; $i < count($cache_attribs); $i ++) { |
|
905 | + for ($i = 0; $i < count($cache_attribs); $i++) { |
|
906 | 906 | if (($cache_attribs[$i] + 0) > 0) { |
907 | 907 | sql( |
908 | 908 | "INSERT INTO `caches_attributes` (`cache_id`, `attrib_id`) VALUES ('&1', '&2')", |
@@ -915,14 +915,14 @@ discard block |
||
915 | 915 | // only if cache is published NOW or activate_date is in the past |
916 | 916 | if ($publish == 'now2' || ($publish == 'later' && mktime($activate_hour, 0, 0, $activate_month, $activate_day, $activate_year) <= $today)) { |
917 | 917 | //do event handling |
918 | - include_once(__DIR__ . '/lib/eventhandler.inc.php'); |
|
918 | + include_once(__DIR__.'/lib/eventhandler.inc.php'); |
|
919 | 919 | |
920 | 920 | event_notify_new_cache($cache_id + 0); |
921 | 921 | event_new_cache($usr['userid'] + 0); |
922 | 922 | } |
923 | 923 | |
924 | 924 | // redirection |
925 | - tpl_redirect('viewcache.php?cacheid=' . urlencode($cache_id)); |
|
925 | + tpl_redirect('viewcache.php?cacheid='.urlencode($cache_id)); |
|
926 | 926 | } else { |
927 | 927 | tpl_set_var('general_message', $error_general); |
928 | 928 | } |
@@ -106,7 +106,8 @@ discard block |
||
106 | 106 | tpl_set_var('short_desc', htmlspecialchars($short_desc, ENT_COMPAT, 'UTF-8')); |
107 | 107 | |
108 | 108 | // descMode auslesen, falls nicht gesetzt aus dem Profil laden |
109 | - if (isset($_POST['descMode'])) {// Ocprop |
|
109 | + if (isset($_POST['descMode'])) { |
|
110 | +// Ocprop |
|
110 | 111 | $descMode = $_POST['descMode'] + 0; |
111 | 112 | if (($descMode < 1) || ($descMode > 3)) { |
112 | 113 | $descMode = 3; |
@@ -569,7 +570,8 @@ discard block |
||
569 | 570 | |
570 | 571 | tpl_set_var('firstcache_note', mb_ereg_replace('%1', $opt['page']['sitename'], $firstcache_note)); |
571 | 572 | |
572 | - if (isset($_POST['submitform'])) // Ocprop |
|
573 | + if (isset($_POST['submitform'])) { |
|
574 | + // Ocprop |
|
573 | 575 | { |
574 | 576 | //check the entered data |
575 | 577 | |
@@ -577,6 +579,7 @@ discard block |
||
577 | 579 | if ($lat_h != '' || $lat_min != '') { |
578 | 580 | if (!mb_ereg_match('^[0-9]{1,2}$', $lat_h)) { |
579 | 581 | tpl_set_var('lat_message', $error_lat_not_ok); |
582 | + } |
|
580 | 583 | $error = true; |
581 | 584 | $lat_h_not_ok = true; |
582 | 585 | } else { |
@@ -5,7 +5,7 @@ |
||
5 | 5 | * Unicode Reminder メモ |
6 | 6 | ***************************************************************************/ |
7 | 7 | |
8 | -require_once __DIR__ . '/./lib2/web.inc.php'; |
|
8 | +require_once __DIR__.'/./lib2/web.inc.php'; |
|
9 | 9 | |
10 | 10 | $tpl->name = 'mystatpic'; |
11 | 11 | $tpl->menuitem = MNU_MYPROFILE_DATA_STATPIC; |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | * Unicode Reminder メモ |
6 | 6 | ***************************************************************************/ |
7 | 7 | |
8 | -require __DIR__ . '/lib2/web.inc.php'; |
|
8 | +require __DIR__.'/lib2/web.inc.php'; |
|
9 | 9 | |
10 | 10 | $tpl->name = 'query'; |
11 | 11 | $tpl->menuitem = MNU_MYPROFILE_QUERIES; |
@@ -72,7 +72,7 @@ discard block |
||
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) { |
@@ -39,7 +39,8 @@ discard block |
||
39 | 39 | } elseif ($action == 'delete') { |
40 | 40 | $queryid = isset($_REQUEST['queryid']) ? $_REQUEST['queryid'] + 0 : 0; |
41 | 41 | deletequery($queryid); |
42 | -} else { // default: view |
|
42 | +} else { |
|
43 | +// default: view |
|
43 | 44 | viewqueries(); |
44 | 45 | } |
45 | 46 | |
@@ -106,9 +107,9 @@ discard block |
||
106 | 107 | } |
107 | 108 | } else { |
108 | 109 | // save as |
109 | - if (sql_value("SELECT COUNT(*) FROM `queries` WHERE `id`='&1' AND `user_id`='&2'", 0, $saveas_queryid, $login->userid) == 0) |
|
110 | - $tpl->assign('errorMustSelectQuery', true); |
|
111 | - else { |
|
110 | + if (sql_value("SELECT COUNT(*) FROM `queries` WHERE `id`='&1' AND `user_id`='&2'", 0, $saveas_queryid, $login->userid) == 0) { |
|
111 | + $tpl->assign('errorMustSelectQuery', true); |
|
112 | + } else { |
|
112 | 113 | sql("UPDATE `queries` SET `options`='&1' WHERE `id`='&2'", $options, $saveas_queryid); |
113 | 114 | $tpl->redirect('query.php?action=view'); |
114 | 115 | } |
@@ -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 | |
@@ -277,7 +277,7 @@ discard block |
||
277 | 277 | $opt['logic']['pictures']['dummy']['bgcolor'] = [255, 255, 255]; |
278 | 278 | $opt['logic']['pictures']['dummy']['text'] = ''; |
279 | 279 | $opt['logic']['pictures']['dummy']['textcolor'] = [0, 0, 0]; |
280 | -$opt['logic']['pictures']['dummy']['replacepic'] = $opt['rootpath'] . 'images/'; |
|
280 | +$opt['logic']['pictures']['dummy']['replacepic'] = $opt['rootpath'].'images/'; |
|
281 | 281 | |
282 | 282 | /* cachemaps (obsolete) |
283 | 283 | */ |
@@ -379,7 +379,7 @@ discard block |
||
379 | 379 | |
380 | 380 | /* license-related functions |
381 | 381 | */ |
382 | -$opt['logic']['license']['newusers'] = 2; // see license constants in lib2/logic/const.inc.php |
|
382 | +$opt['logic']['license']['newusers'] = 2; // see license constants in lib2/logic/const.inc.php |
|
383 | 383 | $opt['logic']['license']['admin'] = true; |
384 | 384 | $opt['logic']['license']['disclaimer'] = false; |
385 | 385 | $opt['logic']['license']['terms'] = 'articles.php?page=impressum#datalicense'; |
@@ -387,18 +387,18 @@ discard block |
||
387 | 387 | |
388 | 388 | /* optional APIs |
389 | 389 | */ |
390 | -$opt['logic']['api']['email_problems']['key'] = ''; // must be set to enable |
|
391 | -$opt['logic']['api']['user_inactivity']['key'] = ''; // must be set to enable |
|
390 | +$opt['logic']['api']['email_problems']['key'] = ''; // must be set to enable |
|
391 | +$opt['logic']['api']['user_inactivity']['key'] = ''; // must be set to enable |
|
392 | 392 | |
393 | 393 | /* cache report info settings |
394 | 394 | */ |
395 | 395 | $opt['logic']['cache_reports']['delaydays'] = 2; |
396 | -$opt['logic']['cache_reports']['min_processperday'] = 5; // set to 0 to disable |
|
397 | -$opt['logic']['cache_reports']['max_processperday'] = 20; // set to 0 to disable |
|
396 | +$opt['logic']['cache_reports']['min_processperday'] = 5; // set to 0 to disable |
|
397 | +$opt['logic']['cache_reports']['max_processperday'] = 20; // set to 0 to disable |
|
398 | 398 | |
399 | 399 | /* cronjob |
400 | 400 | */ |
401 | -$opt['cron']['username'] = 'apache'; // system username for cronjobs |
|
401 | +$opt['cron']['username'] = 'apache'; // system username for cronjobs |
|
402 | 402 | |
403 | 403 | /* phpbb news integration (index.php, outdated) |
404 | 404 | * |
@@ -496,7 +496,7 @@ discard block |
||
496 | 496 | // a redirect to redirect-setting will be done |
497 | 497 | // (use exact same url with slashes etc. as registered by garmin) |
498 | 498 | $opt['lib']['garmin']['domain'] = 'www.site.org'; |
499 | -$opt['lib']['garmin']['url'] = 'http://' . $opt['lib']['garmin']['domain'] . '/'; |
|
499 | +$opt['lib']['garmin']['url'] = 'http://'.$opt['lib']['garmin']['domain'].'/'; |
|
500 | 500 | |
501 | 501 | // if the plugin is not called from the correct domain, redirect to this site |
502 | 502 | // (e.g. domain called without www. prefix) - must match domain of $opt['lib']['garmin']['url'] |
@@ -524,7 +524,7 @@ discard block |
||
524 | 524 | |
525 | 525 | // max number of caches displayed in google maps |
526 | 526 | if (isset($_SERVER['HTTP_USER_AGENT'])) { |
527 | - $user_agent = " " . $_SERVER['HTTP_USER_AGENT']; |
|
527 | + $user_agent = " ".$_SERVER['HTTP_USER_AGENT']; |
|
528 | 528 | if (strpos($user_agent, "MSIE") && !strpos($user_agent, "Opera")) { |
529 | 529 | $opt['map']['maxrecords'] = 200; |
530 | 530 | } else { |
@@ -540,7 +540,7 @@ discard block |
||
540 | 540 | /* |
541 | 541 | * OKAPI |
542 | 542 | */ |
543 | -$opt['okapi']['var_dir'] = $opt['rootpath'] . 'var/okapi'; |
|
543 | +$opt['okapi']['var_dir'] = $opt['rootpath'].'var/okapi'; |
|
544 | 544 | $opt['okapi']['github_access_token'] = null; |
545 | 545 | |
546 | 546 | /* Opencaching Node Daemon |
@@ -15,11 +15,11 @@ discard block |
||
15 | 15 | * bin/dbsv-update.php will then migrate the tables' charset. |
16 | 16 | */ |
17 | 17 | $opt['charset']['iconv'] = 'UTF-8'; // 'ISO-8859-1'; // use iconv compatible charset-name |
18 | -$opt['charset']['mysql'] = 'utf8'; // use mysql compatible charset-name |
|
18 | +$opt['charset']['mysql'] = 'utf8'; // use mysql compatible charset-name |
|
19 | 19 | |
20 | 20 | // handling of SQL and PHP errors |
21 | 21 | $opt['db']['error']['display'] = false; |
22 | -$opt['db']['error']['mail'] = 'root'; // set '' to disable |
|
22 | +$opt['db']['error']['mail'] = 'root'; // set '' to disable |
|
23 | 23 | |
24 | 24 | // page title |
25 | 25 | $opt['page']['title'] = 'OPENCACHING'; |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | * Additionally, the cookie domain (different vor lib1 and lib2) can be overwritten. |
58 | 58 | * See examples for overriding in settings-sample.inc.php. |
59 | 59 | */ |
60 | -$opt['page']['meta']['keywords'] = 'Geocaching, Geocache, Cache, Schatzsuche, GPS, kostenlos, GPX, Koordinaten, Hobby, Natur'; // 5-10 keywords are recommended |
|
60 | +$opt['page']['meta']['keywords'] = 'Geocaching, Geocache, Cache, Schatzsuche, GPS, kostenlos, GPX, Koordinaten, Hobby, Natur'; // 5-10 keywords are recommended |
|
61 | 61 | // see http://forum.opencaching.de/index.php?topic=3065.0 |
62 | 62 | // and http://forum.opencaching.de/index.php?topic=3065.0 regarding description |
63 | 63 | $opt['page']['meta']['description'] = 'Opencaching.de ist das freie Portal für Geocaching, ein Schatzsuche-Spiel. Mittels GPS-Koordinaten sind Behälter oder Objekte zu finden.'; |
@@ -94,12 +94,12 @@ discard block |
||
94 | 94 | // see also setting in lib/settings.inc.php! |
95 | 95 | $opt['logic']['admin']['team_comments_only_for_reports'] = true; |
96 | 96 | $opt['logic']['admin']['enable_listing_admins'] = false; |
97 | -$opt['logic']['admin']['listingadmin_notification'] = ''; // Email address(es), comma separated |
|
97 | +$opt['logic']['admin']['listingadmin_notification'] = ''; // Email address(es), comma separated |
|
98 | 98 | |
99 | 99 | /* |
100 | 100 | * html purifier |
101 | 101 | */ |
102 | -$opt['html_purifier']['cache_path'] = dirname(__FILE__) . '/../cache2/html_purifier/'; |
|
102 | +$opt['html_purifier']['cache_path'] = dirname(__FILE__).'/../cache2/html_purifier/'; |
|
103 | 103 | |
104 | 104 | /* |
105 | 105 | * CMS links for external pages |
@@ -174,9 +174,9 @@ discard block |
||
174 | 174 | $primary_httpsdefault = $opt['page']['https']['is_default']; |
175 | 175 | } |
176 | 176 | if ($primary_httpsdefault) { |
177 | - $opt['page']['default_primary_url'] = 'https' . strstr($primary_site_url, '://'); |
|
177 | + $opt['page']['default_primary_url'] = 'https'.strstr($primary_site_url, '://'); |
|
178 | 178 | } else { |
179 | - $opt['page']['default_primary_url'] = 'http' . strstr($primary_site_url, '://'); |
|
179 | + $opt['page']['default_primary_url'] = 'http'.strstr($primary_site_url, '://'); |
|
180 | 180 | } |
181 | 181 | |
182 | 182 | // 2. create settings for the current domain |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | if (isset($opt['domain'][$current_domain]['url'])) { |
188 | 188 | $current_site_url = $opt['domain'][$current_domain]['url']; |
189 | 189 | } else { |
190 | - $current_site_url = 'x://' . $current_domain . parse_url($primary_site_url, PHP_URL_PATH); |
|
190 | + $current_site_url = 'x://'.$current_domain.parse_url($primary_site_url, PHP_URL_PATH); |
|
191 | 191 | } |
192 | 192 | if (substr($current_site_url, - 1, 1) != '/') { |
193 | 193 | $current_site_url .= '/'; |
@@ -199,8 +199,8 @@ discard block |
||
199 | 199 | } |
200 | 200 | |
201 | 201 | $adr = strstr($current_site_url, '://'); |
202 | - $opt['page']['absolute_http_url'] = 'http' . $adr; |
|
203 | - $opt['page']['absolute_https_url'] = 'https' . $adr; |
|
202 | + $opt['page']['absolute_http_url'] = 'http'.$adr; |
|
203 | + $opt['page']['absolute_https_url'] = 'https'.$adr; |
|
204 | 204 | $opt['page']['https']['active'] = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off'); |
205 | 205 | |
206 | 206 | if ($opt['page']['https']['active']) { |
@@ -231,18 +231,18 @@ discard block |
||
231 | 231 | $opt['page']['default_primary_shortlink_url'] = false; |
232 | 232 | } else { |
233 | 233 | if ($primary_httpsdefault) { |
234 | - $opt['page']['default_primary_shortlink_url'] = 'https://' . $primary_shortlink_domain . '/'; |
|
234 | + $opt['page']['default_primary_shortlink_url'] = 'https://'.$primary_shortlink_domain.'/'; |
|
235 | 235 | } else { |
236 | - $opt['page']['default_primary_shortlink_url'] = 'http://' . $primary_shortlink_domain . '/'; |
|
236 | + $opt['page']['default_primary_shortlink_url'] = 'http://'.$primary_shortlink_domain.'/'; |
|
237 | 237 | } |
238 | 238 | |
239 | 239 | if (isset($opt['domain'][$current_domain]['shortlink_domain']) && $opt['domain'][$current_domain]['shortlink_domain']) { |
240 | - $opt['page']['shortlink_url'] = $opt['page']['protocol'] . '://' . $opt['domain'][$current_domain]['shortlink_domain'] . '/'; |
|
241 | - $opt['page']['default_shortlink_url'] = $opt['page']['default_protocol'] . '://' . $opt['domain'][$current_domain]['shortlink_domain'] . '/'; |
|
240 | + $opt['page']['shortlink_url'] = $opt['page']['protocol'].'://'.$opt['domain'][$current_domain]['shortlink_domain'].'/'; |
|
241 | + $opt['page']['default_shortlink_url'] = $opt['page']['default_protocol'].'://'.$opt['domain'][$current_domain]['shortlink_domain'].'/'; |
|
242 | 242 | } else { |
243 | 243 | if ($current_domain == $primary_domain) { |
244 | 244 | $opt['page']['default_shortlink_url'] = $opt['page']['default_primary_shortlink_url']; |
245 | - $opt['page']['shortlink_url'] = $opt['page']['protocol'] . strstr( |
|
245 | + $opt['page']['shortlink_url'] = $opt['page']['protocol'].strstr( |
|
246 | 246 | $opt['page']['default_shortlink_url'], |
247 | 247 | '://' |
248 | 248 | ); |
@@ -256,16 +256,16 @@ discard block |
||
256 | 256 | // 4. set location of uploaded images |
257 | 257 | |
258 | 258 | if (!isset($opt['logic']['pictures']['dir'])) { |
259 | - $opt['logic']['pictures']['dir'] = dirname(__FILE__) . '/../images/uploads'; |
|
259 | + $opt['logic']['pictures']['dir'] = dirname(__FILE__).'/../images/uploads'; |
|
260 | 260 | } // Ocprop, OKAPI ! |
261 | 261 | if (!isset($opt['logic']['pictures']['url'])) { |
262 | - $opt['logic']['pictures']['url'] = $opt['page']['default_primary_url'] . 'images/uploads'; |
|
262 | + $opt['logic']['pictures']['url'] = $opt['page']['default_primary_url'].'images/uploads'; |
|
263 | 263 | } |
264 | 264 | if (!isset($opt['logic']['pictures']['thumb_dir'])) { |
265 | - $opt['logic']['pictures']['thumb_dir'] = $opt['logic']['pictures']['dir'] . '/thumbs'; |
|
265 | + $opt['logic']['pictures']['thumb_dir'] = $opt['logic']['pictures']['dir'].'/thumbs'; |
|
266 | 266 | } |
267 | 267 | if (!isset($opt['logic']['pictures']['thumb_url'])) { |
268 | - $opt['logic']['pictures']['thumb_url'] = $opt['logic']['pictures']['url'] . '/thumbs'; |
|
268 | + $opt['logic']['pictures']['thumb_url'] = $opt['logic']['pictures']['url'].'/thumbs'; |
|
269 | 269 | } |
270 | 270 | } |
271 | 271 |
@@ -66,8 +66,8 @@ discard block |
||
66 | 66 | * other parameters may be customized |
67 | 67 | */ |
68 | 68 | $opt['session']['mode'] = SAVE_COOKIE; |
69 | -$opt['session']['cookiename'] = '<cookiename>'; // e.g. 'ocde' |
|
70 | -$opt['session']['domain'] = '<.do.main>'; // may be overwritten by $opt['domain'][...]['cookiedomain'] |
|
69 | +$opt['session']['cookiename'] = '<cookiename>'; // e.g. 'ocde' |
|
70 | +$opt['session']['domain'] = '<.do.main>'; // may be overwritten by $opt['domain'][...]['cookiedomain'] |
|
71 | 71 | |
72 | 72 | /* If the Referer was sent by the client and the substring was not found, |
73 | 73 | * the embedded session id will be marked as invalid. |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | |
101 | 101 | /* default locale |
102 | 102 | */ |
103 | -$opt['template']['default']['locale'] = 'DE'; // can be overwritten by $opt['domain'][<domain>]['locale'] |
|
103 | +$opt['template']['default']['locale'] = 'DE'; // can be overwritten by $opt['domain'][<domain>]['locale'] |
|
104 | 104 | |
105 | 105 | /* multi-domain settings |
106 | 106 | * |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | */ |
192 | 192 | $opt['lib']['garmin']['domain'] = '<domain>'; |
193 | 193 | $opt['lib']['garmin']['key'] = '00112233445566778899AABBCCDDEEFF00'; |
194 | -$opt['lib']['garmin']['url'] = 'http://' . $opt['lib']['garmin']['domain'] . '/'; |
|
194 | +$opt['lib']['garmin']['url'] = 'http://'.$opt['lib']['garmin']['domain'].'/'; |
|
195 | 195 | $opt['lib']['garmin']['page_url'] = 'http://<domain>/'; |
196 | 196 | |
197 | 197 | // developer.what3words.com API Key |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | ); |
81 | 81 | |
82 | 82 | $opt['page']['develsystem'] = true; |
83 | -$opt['page']['max_logins_per_hour'] = 1000; // for development ... |
|
83 | +$opt['page']['max_logins_per_hour'] = 1000; // for development ... |
|
84 | 84 | |
85 | 85 | $opt['mail']['from'] = 'root'; |
86 | 86 | $opt['mail']['subject'] = '[local.opencaching.de] '; |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | $opt['lib']['garmin']['key'] = '00112233445566778899AABBCCDDEEFF00'; |
103 | 103 | $opt['lib']['garmin']['domain'] = 'local.opencaching.de'; |
104 | 104 | $opt['lib']['garmin']['url'] = 'http://local.opencaching.de/'; |
105 | -$opt['lib']['garmin']['page_url'] = $opt['lib']['garmin']['url'] . ($dev_codepath == '*' ? '' : $dev_codepath . 'htdocs/'); |
|
105 | +$opt['lib']['garmin']['page_url'] = $opt['lib']['garmin']['url'].($dev_codepath == '*' ? '' : $dev_codepath.'htdocs/'); |
|
106 | 106 | |
107 | 107 | // developer.what3words.com API Key |
108 | 108 | $opt['lib']['w3w']['apikey'] = 'YOURAPIKEY'; |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | $opt['page']['showsocialmedia'] = true; |
113 | 113 | $opt['page']['headoverlay'] = 'oc_head_alpha3'; |
114 | 114 | |
115 | -$opt['logic']['pictures']['dummy']['replacepic'] = $dev_basepath . $dev_codepath . 'htdocs/images/no_image_license.png'; |
|
115 | +$opt['logic']['pictures']['dummy']['replacepic'] = $dev_basepath.$dev_codepath.'htdocs/images/no_image_license.png'; |
|
116 | 116 | $opt['logic']['license']['disclaimer'] = true; |
117 | 117 | $opt['logic']['admin']['listingadmin_notification'] = 'root'; |
118 | 118 |