@@ -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.'; |
@@ -98,12 +98,12 @@ discard block |
||
98 | 98 | // see also setting in lib/settings.inc.php! |
99 | 99 | $opt['logic']['admin']['team_comments_only_for_reports'] = true; |
100 | 100 | $opt['logic']['admin']['enable_listing_admins'] = false; |
101 | -$opt['logic']['admin']['listingadmin_notification'] = ''; // Email address(es), comma separated |
|
101 | +$opt['logic']['admin']['listingadmin_notification'] = ''; // Email address(es), comma separated |
|
102 | 102 | |
103 | 103 | /* |
104 | 104 | * html purifier |
105 | 105 | */ |
106 | -$opt['html_purifier']['cache_path'] = dirname(__FILE__) . '/../cache2/html_purifier/'; |
|
106 | +$opt['html_purifier']['cache_path'] = dirname(__FILE__).'/../cache2/html_purifier/'; |
|
107 | 107 | |
108 | 108 | /* |
109 | 109 | * CMS links for external pages |
@@ -178,9 +178,9 @@ discard block |
||
178 | 178 | $primary_httpsdefault = $opt['page']['https']['is_default']; |
179 | 179 | } |
180 | 180 | if ($primary_httpsdefault) { |
181 | - $opt['page']['default_primary_url'] = 'https' . strstr($primary_site_url, '://'); |
|
181 | + $opt['page']['default_primary_url'] = 'https'.strstr($primary_site_url, '://'); |
|
182 | 182 | } else { |
183 | - $opt['page']['default_primary_url'] = 'http' . strstr($primary_site_url, '://'); |
|
183 | + $opt['page']['default_primary_url'] = 'http'.strstr($primary_site_url, '://'); |
|
184 | 184 | } |
185 | 185 | |
186 | 186 | // 2. create settings for the current domain |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | if (isset($opt['domain'][$current_domain]['url'])) { |
192 | 192 | $current_site_url = $opt['domain'][$current_domain]['url']; |
193 | 193 | } else { |
194 | - $current_site_url = 'x://' . $current_domain . parse_url($primary_site_url, PHP_URL_PATH); |
|
194 | + $current_site_url = 'x://'.$current_domain.parse_url($primary_site_url, PHP_URL_PATH); |
|
195 | 195 | } |
196 | 196 | if (substr($current_site_url, - 1, 1) != '/') { |
197 | 197 | $current_site_url .= '/'; |
@@ -203,8 +203,8 @@ discard block |
||
203 | 203 | } |
204 | 204 | |
205 | 205 | $adr = strstr($current_site_url, '://'); |
206 | - $opt['page']['absolute_http_url'] = 'http' . $adr; |
|
207 | - $opt['page']['absolute_https_url'] = 'https' . $adr; |
|
206 | + $opt['page']['absolute_http_url'] = 'http'.$adr; |
|
207 | + $opt['page']['absolute_https_url'] = 'https'.$adr; |
|
208 | 208 | $opt['page']['https']['active'] = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off'); |
209 | 209 | |
210 | 210 | if ($opt['page']['https']['active']) { |
@@ -235,19 +235,19 @@ discard block |
||
235 | 235 | $opt['page']['default_primary_shortlink_url'] = false; |
236 | 236 | } else { |
237 | 237 | if ($primary_httpsdefault) { |
238 | - $opt['page']['default_primary_shortlink_url'] = 'https://' . $primary_shortlink_domain . '/'; |
|
238 | + $opt['page']['default_primary_shortlink_url'] = 'https://'.$primary_shortlink_domain.'/'; |
|
239 | 239 | } else { |
240 | - $opt['page']['default_primary_shortlink_url'] = 'http://' . $primary_shortlink_domain . '/'; |
|
240 | + $opt['page']['default_primary_shortlink_url'] = 'http://'.$primary_shortlink_domain.'/'; |
|
241 | 241 | } |
242 | 242 | |
243 | 243 | if (isset($opt['domain'][$current_domain]['shortlink_domain']) && $opt['domain'][$current_domain]['shortlink_domain']) { |
244 | - $opt['page']['shortlink_url'] = $opt['page']['protocol'] . '://' . $opt['domain'][$current_domain]['shortlink_domain'] . '/'; |
|
245 | - $opt['page']['default_shortlink_url'] = $opt['page']['default_protocol'] . '://' . $opt['domain'][$current_domain]['shortlink_domain'] . '/'; |
|
244 | + $opt['page']['shortlink_url'] = $opt['page']['protocol'].'://'.$opt['domain'][$current_domain]['shortlink_domain'].'/'; |
|
245 | + $opt['page']['default_shortlink_url'] = $opt['page']['default_protocol'].'://'.$opt['domain'][$current_domain]['shortlink_domain'].'/'; |
|
246 | 246 | } else { |
247 | 247 | if ($current_domain == $primary_domain) { |
248 | 248 | $opt['page']['default_shortlink_url'] = $opt['page']['default_primary_shortlink_url']; |
249 | 249 | $opt['page']['shortlink_url'] = |
250 | - $opt['page']['protocol'] . strstr($opt['page']['default_shortlink_url'], '://'); |
|
250 | + $opt['page']['protocol'].strstr($opt['page']['default_shortlink_url'], '://'); |
|
251 | 251 | } else { |
252 | 252 | $opt['page']['shortlink_url'] = false; |
253 | 253 | $opt['page']['default_shortlink_url'] = false; |
@@ -258,16 +258,16 @@ discard block |
||
258 | 258 | // 4. set location of uploaded images |
259 | 259 | |
260 | 260 | if (!isset($opt['logic']['pictures']['dir'])) { |
261 | - $opt['logic']['pictures']['dir'] = dirname(__FILE__) . '/../images/uploads'; |
|
261 | + $opt['logic']['pictures']['dir'] = dirname(__FILE__).'/../images/uploads'; |
|
262 | 262 | } // Ocprop, OKAPI ! |
263 | 263 | if (!isset($opt['logic']['pictures']['url'])) { |
264 | - $opt['logic']['pictures']['url'] = $opt['page']['default_primary_url'] . 'images/uploads'; |
|
264 | + $opt['logic']['pictures']['url'] = $opt['page']['default_primary_url'].'images/uploads'; |
|
265 | 265 | } |
266 | 266 | if (!isset($opt['logic']['pictures']['thumb_dir'])) { |
267 | - $opt['logic']['pictures']['thumb_dir'] = $opt['logic']['pictures']['dir'] . '/thumbs'; |
|
267 | + $opt['logic']['pictures']['thumb_dir'] = $opt['logic']['pictures']['dir'].'/thumbs'; |
|
268 | 268 | } |
269 | 269 | if (!isset($opt['logic']['pictures']['thumb_url'])) { |
270 | - $opt['logic']['pictures']['thumb_url'] = $opt['logic']['pictures']['url'] . '/thumbs'; |
|
270 | + $opt['logic']['pictures']['thumb_url'] = $opt['logic']['pictures']['url'].'/thumbs'; |
|
271 | 271 | } |
272 | 272 | } |
273 | 273 |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | |
10 | 10 | $build_map_towns_menu = true; |
11 | 11 | |
12 | -require __DIR__ . '/lib2/web.inc.php'; |
|
12 | +require __DIR__.'/lib2/web.inc.php'; |
|
13 | 13 | |
14 | 14 | /* because the map does access some private info like |
15 | 15 | * ignored caches, we need to verify the login data |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | WHERE option_id=6 AND user_id='&1'", true, $login->userid)) |
68 | 68 | ) { |
69 | 69 | $fullscreen = true; |
70 | - $tpl->popup = true; // disables page header and -frame |
|
70 | + $tpl->popup = true; // disables page header and -frame |
|
71 | 71 | $tpl->popupmargin = false; |
72 | 72 | } else { |
73 | 73 | $fullscreen = false; |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | $tpl->error($translate->t('There is no google maps key registered for this domain.', '', '', 0)); |
134 | 134 | } |
135 | 135 | |
136 | -$tpl->add_header_javascript($opt['page']['protocol'] . '://maps.googleapis.com/maps/api/js?sensor=false&key=' . urlencode($sGMKey) . '&language=' . strtolower($opt['template']['locale'])); |
|
136 | +$tpl->add_header_javascript($opt['page']['protocol'].'://maps.googleapis.com/maps/api/js?sensor=false&key='.urlencode($sGMKey).'&language='.strtolower($opt['template']['locale'])); |
|
137 | 137 | // https is supported by google, but may make problems in some environments, |
138 | 138 | // e.g. does not work with MSIE 7 on WinXP |
139 | 139 | $tpl->add_header_javascript('resource2/misc/map/dragzoom_packed.js'); |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | global $login; |
280 | 280 | |
281 | 281 | $rsCache = sql_slave( |
282 | - "SELECT " . geomath::getSqlDistanceFormula($nLon, $nLat, $nDistance) . " AS `distance`, |
|
282 | + "SELECT ".geomath::getSqlDistanceFormula($nLon, $nLat, $nDistance)." AS `distance`, |
|
283 | 283 | `caches`.`wp_oc` |
284 | 284 | FROM `caches` |
285 | 285 | INNER JOIN `cache_status` ON `caches`.`status`=`cache_status`.`id` |
@@ -389,42 +389,42 @@ discard block |
||
389 | 389 | $wphandler = new HandlerChildWp(); |
390 | 390 | $waypoints = $wphandler->getChildWps($rCache['cache_id'], true); |
391 | 391 | |
392 | - echo '<caches>' . "\n"; |
|
392 | + echo '<caches>'."\n"; |
|
393 | 393 | echo ' <cache '; |
394 | - echo 'name="' . xmlentities($rCache['name']) . '" '; |
|
395 | - echo 'wpoc="' . xmlentities($rCache['wp_oc']) . '" '; |
|
396 | - echo 'coords="' . $rCache['longitude'] . ',' . $rCache['latitude'] . '" '; |
|
397 | - echo 'inactive="' . xmlentities($rCache['inactive']) . '" '; |
|
398 | - echo 'status_text="' . xmlentities($rCache['statustext']) . '" '; |
|
399 | - echo 'type_id="' . xmlentities($rCache['type_id']) . '" '; |
|
400 | - echo 'type_text="' . xmlentities($rCache['type_text']) . '" '; |
|
401 | - echo 'size="' . xmlentities($rCache['size']) . '" '; |
|
402 | - echo 'difficulty="' . xmlentities($rCache['difficulty'] / 2) . '" '; |
|
403 | - echo 'terrain="' . xmlentities($rCache['terrain'] / 2) . '" '; |
|
404 | - echo 'listed_since="' . xmlentities(strftime($opt['locale'][$opt['template']['locale']]['format']['date'], strtotime($rCache['date_created']))) . '" '; |
|
405 | - echo 'is_publishdate="' . xmlentities($rCache['is_publishdate']) . '" '; |
|
406 | - echo 'toprating="' . xmlentities($rCache['toprating']) . '" '; |
|
407 | - echo 'geokreties="' . xmlentities($nGeokretyCount) . '" '; |
|
408 | - echo 'found="' . xmlentities(($nFoundCount > 0) ? 1 : 0) . '" '; |
|
409 | - echo 'notfound="' . xmlentities(($nNotFoundCount > 0) ? 1 : 0) . '" '; |
|
410 | - echo 'attended="' . xmlentities(($nAttendedCount > 0) ? 1 : 0) . '" '; |
|
411 | - echo 'oconly="' . xmlentities($rCache['oconly']) . '" '; |
|
412 | - echo 'owner="' . xmlentities($rCache['owner']) . '" '; |
|
413 | - echo 'username="' . xmlentities($rCache['username']) . '" '; |
|
414 | - echo 'userid="' . xmlentities($rCache['user_id']) . '" '; |
|
415 | - echo 'picurl="' . xmlentities($rCache['picurl']) . '" '; |
|
416 | - echo 'pictitle="' . xmlentities(trim($rCache['pictitle'])) . '" >\n'; |
|
394 | + echo 'name="'.xmlentities($rCache['name']).'" '; |
|
395 | + echo 'wpoc="'.xmlentities($rCache['wp_oc']).'" '; |
|
396 | + echo 'coords="'.$rCache['longitude'].','.$rCache['latitude'].'" '; |
|
397 | + echo 'inactive="'.xmlentities($rCache['inactive']).'" '; |
|
398 | + echo 'status_text="'.xmlentities($rCache['statustext']).'" '; |
|
399 | + echo 'type_id="'.xmlentities($rCache['type_id']).'" '; |
|
400 | + echo 'type_text="'.xmlentities($rCache['type_text']).'" '; |
|
401 | + echo 'size="'.xmlentities($rCache['size']).'" '; |
|
402 | + echo 'difficulty="'.xmlentities($rCache['difficulty'] / 2).'" '; |
|
403 | + echo 'terrain="'.xmlentities($rCache['terrain'] / 2).'" '; |
|
404 | + echo 'listed_since="'.xmlentities(strftime($opt['locale'][$opt['template']['locale']]['format']['date'], strtotime($rCache['date_created']))).'" '; |
|
405 | + echo 'is_publishdate="'.xmlentities($rCache['is_publishdate']).'" '; |
|
406 | + echo 'toprating="'.xmlentities($rCache['toprating']).'" '; |
|
407 | + echo 'geokreties="'.xmlentities($nGeokretyCount).'" '; |
|
408 | + echo 'found="'.xmlentities(($nFoundCount > 0) ? 1 : 0).'" '; |
|
409 | + echo 'notfound="'.xmlentities(($nNotFoundCount > 0) ? 1 : 0).'" '; |
|
410 | + echo 'attended="'.xmlentities(($nAttendedCount > 0) ? 1 : 0).'" '; |
|
411 | + echo 'oconly="'.xmlentities($rCache['oconly']).'" '; |
|
412 | + echo 'owner="'.xmlentities($rCache['owner']).'" '; |
|
413 | + echo 'username="'.xmlentities($rCache['username']).'" '; |
|
414 | + echo 'userid="'.xmlentities($rCache['user_id']).'" '; |
|
415 | + echo 'picurl="'.xmlentities($rCache['picurl']).'" '; |
|
416 | + echo 'pictitle="'.xmlentities(trim($rCache['pictitle'])).'" >\n'; |
|
417 | 417 | |
418 | 418 | foreach ($waypoints as $waypoint) { |
419 | 419 | echo ' <wpt '; |
420 | - echo 'typeid="' . xmlentities($waypoint['type']) . '" '; |
|
421 | - echo 'typename="' . xmlentities($waypoint['name']) . '" '; |
|
422 | - echo 'typepreposition="' . xmlentities($waypoint['preposition']) . '" '; |
|
423 | - echo 'image="' . xmlentities($waypoint['image']) . '" '; |
|
420 | + echo 'typeid="'.xmlentities($waypoint['type']).'" '; |
|
421 | + echo 'typename="'.xmlentities($waypoint['name']).'" '; |
|
422 | + echo 'typepreposition="'.xmlentities($waypoint['preposition']).'" '; |
|
423 | + echo 'image="'.xmlentities($waypoint['image']).'" '; |
|
424 | 424 | echo 'imagewidth="38" imageheight="38" '; |
425 | - echo 'latitude="' . xmlentities($waypoint['latitude']) . '" '; |
|
426 | - echo 'longitude="' . xmlentities($waypoint['longitude']) . '" '; |
|
427 | - echo 'description="' . xmlentities(mb_ereg_replace('\r\n', '<br />', htmlentities(trim($waypoint['description']), ENT_NOQUOTES, 'UTF-8'))) . '" />\n'; |
|
425 | + echo 'latitude="'.xmlentities($waypoint['latitude']).'" '; |
|
426 | + echo 'longitude="'.xmlentities($waypoint['longitude']).'" '; |
|
427 | + echo 'description="'.xmlentities(mb_ereg_replace('\r\n', '<br />', htmlentities(trim($waypoint['description']), ENT_NOQUOTES, 'UTF-8'))).'" />\n'; |
|
428 | 428 | } |
429 | 429 | |
430 | 430 | echo ' </cache>\n'; |
@@ -438,9 +438,9 @@ discard block |
||
438 | 438 | { |
439 | 439 | global $login, $opt; |
440 | 440 | |
441 | - echo '<caches>' . "\n"; |
|
441 | + echo '<caches>'."\n"; |
|
442 | 442 | $rs = sql_slave( |
443 | - "SELECT " . geomath::getSqlDistanceFormula($nLon, $nLat, 0) . " AS `distance`, |
|
443 | + "SELECT ".geomath::getSqlDistanceFormula($nLon, $nLat, 0)." AS `distance`, |
|
444 | 444 | `caches`.`name`, `caches`.`wp_oc` |
445 | 445 | FROM `map2_data` |
446 | 446 | INNER JOIN `caches` ON `map2_data`.`cache_id`=`caches`.`cache_id` |
@@ -449,30 +449,30 @@ discard block |
||
449 | 449 | AND (`cache_status`.`allow_user_view`=1 OR `caches`.`user_id`='&3') |
450 | 450 | AND `map2_data`.`result_id`='&2' |
451 | 451 | ORDER BY `distance` ASC LIMIT 30", |
452 | - '%' . $sName . '%', |
|
452 | + '%'.$sName.'%', |
|
453 | 453 | $nResultId, |
454 | 454 | $login->userid |
455 | 455 | ); |
456 | 456 | $caches_found = 0; |
457 | 457 | while ($r = sql_fetch_assoc($rs)) { |
458 | - echo '<cache name="' . xmlentities($r['name']) . '" wpoc="' . xmlentities($r['wp_oc']) . '" />' . "\n"; |
|
459 | - ++ $caches_found; |
|
458 | + echo '<cache name="'.xmlentities($r['name']).'" wpoc="'.xmlentities($r['wp_oc']).'" />'."\n"; |
|
459 | + ++$caches_found; |
|
460 | 460 | } |
461 | 461 | sql_free_result($rs); |
462 | 462 | |
463 | 463 | if (!$caches_found && preg_match('/^[^\s[:punct:]]{2,}\.[^\s[:punct:]]{2,}\.[^\s[:punct:]]{2,}$/', $sName)) { |
464 | - $result = @file_get_contents('http://api.what3words.com/w3w?key=' . $opt['lib']['w3w']['apikey'] |
|
465 | - . '&string=' . urlencode($sName)); |
|
464 | + $result = @file_get_contents('http://api.what3words.com/w3w?key='.$opt['lib']['w3w']['apikey'] |
|
465 | + . '&string='.urlencode($sName)); |
|
466 | 466 | if ($result) { |
467 | 467 | $json = json_decode($result, true); |
468 | 468 | if (!is_null($json['words']) && !is_null($json['position']) && count($json['position']) == 2) { |
469 | - echo '<coord name="' . xmlentities(implode('.', $json['words'])) . |
|
470 | - '" latitude="' . xmlentities($json["position"][0]) . |
|
471 | - '" longitude="' . xmlentities($json["position"][1]) . '" />' . "\n"; |
|
469 | + echo '<coord name="'.xmlentities(implode('.', $json['words'])). |
|
470 | + '" latitude="'.xmlentities($json["position"][0]). |
|
471 | + '" longitude="'.xmlentities($json["position"][1]).'" />'."\n"; |
|
472 | 472 | } |
473 | 473 | } |
474 | 474 | } |
475 | - echo '</caches>' . "\n"; |
|
475 | + echo '</caches>'."\n"; |
|
476 | 476 | |
477 | 477 | exit; |
478 | 478 | } |
@@ -495,7 +495,7 @@ discard block |
||
495 | 495 | "SELECT `slave_id` |
496 | 496 | FROM `map2_result` |
497 | 497 | WHERE `result_id`='&1' AND DATE_ADD(`date_created`, INTERVAL '&2' SECOND)>NOW()", |
498 | - - 2, |
|
498 | + -2, |
|
499 | 499 | $nResultId, |
500 | 500 | $opt['map']['maxcacheage'] |
501 | 501 | ); |
@@ -561,8 +561,8 @@ discard block |
||
561 | 561 | $bMaxRecordReached = ($nRecordCount > $maxrecords); |
562 | 562 | |
563 | 563 | // output data |
564 | - echo '<searchresult count="' . xmlentities($nRecordCount) . '" available="1"' . |
|
565 | - ' maxrecordreached="' . ($bMaxRecordReached ? '1' : '0') . '">' . "\n"; |
|
564 | + echo '<searchresult count="'.xmlentities($nRecordCount).'" available="1"'. |
|
565 | + ' maxrecordreached="'.($bMaxRecordReached ? '1' : '0').'">'."\n"; |
|
566 | 566 | |
567 | 567 | if (!$bMaxRecordReached) { |
568 | 568 | $namequery = ($cachenames ? ", `caches`.`name` AS `cachename`" : ""); |
@@ -577,7 +577,7 @@ discard block |
||
577 | 577 | IF(`found_logs`.`id` IS NULL, 0, 1) AS `found`, |
578 | 578 | IF(`found_logs`.`id` IS NULL AND `notfound_logs`.`id` IS NOT NULL, 1, 0) AS `notfound`, |
579 | 579 | IF(`caches_attributes`.`attrib_id` IS NULL, 0, 1) AS `oconly`" . |
580 | - $namequery . " |
|
580 | + $namequery." |
|
581 | 581 | FROM `map2_data` |
582 | 582 | INNER JOIN `caches` ON `map2_data`.`cache_id`=`caches`.`cache_id` |
583 | 583 | INNER JOIN `user` ON `user`.`user_id`=`caches`.`user_id` |
@@ -624,19 +624,19 @@ discard block |
||
624 | 624 | echo |
625 | 625 | '<c d="' |
626 | 626 | . xmlentities( |
627 | - $r['wp_oc'] . '/' . round($r['longitude'], 5) . '/' . |
|
628 | - round($r['latitude'], 5) . '/' . $r['type'] . '/' . $flags |
|
629 | - ) . '"' |
|
630 | - . (isset($r['cachename']) ? ' n="' . xmlentities($r['cachename']) . '"' : '') |
|
627 | + $r['wp_oc'].'/'.round($r['longitude'], 5).'/'. |
|
628 | + round($r['latitude'], 5).'/'.$r['type'].'/'.$flags |
|
629 | + ).'"' |
|
630 | + . (isset($r['cachename']) ? ' n="'.xmlentities($r['cachename']).'"' : '') |
|
631 | 631 | . ' />'; |
632 | 632 | } else { |
633 | 633 | echo |
634 | - '<cache wp="' . xmlentities($r['wp_oc']) . '"' . |
|
635 | - ' lon="' . xmlentities(round($r['longitude'], 5)) . '"' . |
|
636 | - ' lat="' . xmlentities(round($r['latitude'], 5)) . '"' . |
|
637 | - ' type="' . xmlentities($r['type']) . '"' . |
|
638 | - (isset($r['cachename']) ? ' n="' . xmlentities($r['cachename']) . '"' : '') . |
|
639 | - ' f="' . xmlentities($flags) . '" />' . "\n"; |
|
634 | + '<cache wp="'.xmlentities($r['wp_oc']).'"'. |
|
635 | + ' lon="'.xmlentities(round($r['longitude'], 5)).'"'. |
|
636 | + ' lat="'.xmlentities(round($r['latitude'], 5)).'"'. |
|
637 | + ' type="'.xmlentities($r['type']).'"'. |
|
638 | + (isset($r['cachename']) ? ' n="'.xmlentities($r['cachename']).'"' : ''). |
|
639 | + ' f="'.xmlentities($flags).'" />'."\n"; |
|
640 | 640 | } |
641 | 641 | } |
642 | 642 | sql_free_result($rs); |
@@ -27,7 +27,8 @@ |
||
27 | 27 | $for_cachedesc, |
28 | 28 | $html, |
29 | 29 | $twolines = false |
30 | -) { |
|
30 | +) |
|
31 | +{ |
|
31 | 32 | global $opt, $translate; |
32 | 33 | |
33 | 34 | $ltext = ""; |
@@ -9,15 +9,15 @@ discard block |
||
9 | 9 | * Unicode Reminder メモ |
10 | 10 | ***************************************************************************/ |
11 | 11 | |
12 | -$opt['rootpath'] = __DIR__ . '/../../htdocs/'; |
|
13 | -require $opt['rootpath'] . 'lib2/cli.inc.php'; |
|
12 | +$opt['rootpath'] = __DIR__.'/../../htdocs/'; |
|
13 | +require $opt['rootpath'].'lib2/cli.inc.php'; |
|
14 | 14 | |
15 | 15 | if (!($opt['debug'] & DEBUG_DEVELOPER)) { |
16 | 16 | die("This script deletes lot of data and must be run only on development systems.\n"); |
17 | 17 | } |
18 | 18 | if ($argc != 2 || $argv[1] != 'go') { |
19 | 19 | die( |
20 | - "This script deletes lot of data. Make sure that you really want to dos this,\n" . |
|
20 | + "This script deletes lot of data. Make sure that you really want to dos this,\n". |
|
21 | 21 | "and confirm it by adding the parameter 'go'.\n" |
22 | 22 | ); |
23 | 23 | } |
@@ -63,11 +63,11 @@ discard block |
||
63 | 63 | echo "clearing user data\n"; |
64 | 64 | sql('TRUNCATE `cache_adoption`'); |
65 | 65 | sql('TRUNCATE `cache_ignore`'); |
66 | -sql('DELETE FROM `cache_lists` WHERE `is_public`<2'); // trigger deletes dependent data |
|
66 | +sql('DELETE FROM `cache_lists` WHERE `is_public`<2'); // trigger deletes dependent data |
|
67 | 67 | sql('TRUNCATE `cache_list_bookmarks`'); |
68 | 68 | sql('TRUNCATE `cache_list_watches`'); |
69 | 69 | sql('TRUNCATE `cache_watches`'); |
70 | -sql('DELETE FROM `coordinates` WHERE `type`=2'); // personal cache notes and coords |
|
70 | +sql('DELETE FROM `coordinates` WHERE `type`=2'); // personal cache notes and coords |
|
71 | 71 | sql('TRUNCATE `queries`'); |
72 | 72 | sql('TRUNCATE `user_options`'); |
73 | 73 | sql( |
@@ -132,10 +132,10 @@ discard block |
||
132 | 132 | |
133 | 133 | echo "clearing other nonpublic data\n"; |
134 | 134 | sql('TRUNCATE `news`'); |
135 | -$rs = sql("SHOW TABLES WHERE `Tables_in_" . $opt['db']['placeholder']['db'] . "` LIKE '\_%'"); |
|
135 | +$rs = sql("SHOW TABLES WHERE `Tables_in_".$opt['db']['placeholder']['db']."` LIKE '\_%'"); |
|
136 | 136 | $tables = sql_fetch_column($rs); |
137 | 137 | foreach ($tables as $table) { |
138 | - sql('DROP TABLE ' . $table); |
|
138 | + sql('DROP TABLE '.$table); |
|
139 | 139 | } |
140 | 140 | |
141 | 141 | echo "done.\n"; |
@@ -17,9 +17,9 @@ discard block |
||
17 | 17 | * $opt['locale'] |
18 | 18 | ***************************************************************************/ |
19 | 19 | |
20 | -define('OC_LOCALE_ACTIVE', 2); // enable language and show language button in header line |
|
21 | -define('OC_LOCALE_HIDDEN', 1); // enable language but hide language button in header line |
|
22 | -define('OC_LOCALE_DISABLED', 0); // disable language |
|
20 | +define('OC_LOCALE_ACTIVE', 2); // enable language and show language button in header line |
|
21 | +define('OC_LOCALE_HIDDEN', 1); // enable language but hide language button in header line |
|
22 | +define('OC_LOCALE_DISABLED', 0); // disable language |
|
23 | 23 | |
24 | 24 | $opt['template']['locales']['DE']['status'] = OC_LOCALE_ACTIVE; |
25 | 25 | $opt['template']['locales']['DE']['flag'] = 'images/flag/DE.png'; |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | $opt['locale']['DE']['page']['license'] = '<a rel="license" href="%1"><img alt="Creative Commons Lizenzvertrag" style="border-width:0" src="resource2/ocstyle/images/media/cc-by-nc-nd-small.png" /></a><div style="text-align:center; margin:8px 0 0 6px;">Die <a href="articles.php?page=impressum#datalicense">Inhalte</a> von {site} stehen unter der Creative-Commons-Lizenz <a rel="license" href="%1">BY-NC-ND 3.0 DE</a>.</div>'; |
132 | 132 | $opt['locale']['DE']['helpwiki'] = 'http://wiki.opencaching.de/index.php/'; |
133 | 133 | $opt['locale']['DE']['mostly_translated'] = true; |
134 | -$opt['locale']['DE']['what3words'] = true; // "beta" |
|
134 | +$opt['locale']['DE']['what3words'] = true; // "beta" |
|
135 | 135 | |
136 | 136 | $opt['locale']['IT']['format']['dateshort'] = '%d/%m/%y'; |
137 | 137 | $opt['locale']['IT']['format']['dm'] = '%d/%m'; |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | $opt['locale']['SV']['page']['subtitle1'] = 'Geocaching med Opencaching'; |
233 | 233 | $opt['locale']['SV']['page']['subtitle2'] = ''; |
234 | 234 | $opt['locale']['SV']['mostly_translated'] = false; |
235 | -$opt['locale']['SV']['what3words'] = true; // "beta" |
|
235 | +$opt['locale']['SV']['what3words'] = true; // "beta" |
|
236 | 236 | |
237 | 237 | $opt['locale']['NO']['format']['dateshort'] = '%d.%m.%y'; |
238 | 238 | $opt['locale']['NO']['format']['dm'] = '%d.%m.'; |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | $opt['locale']['RU']['format']['colonspace'] = ''; |
280 | 280 | $opt['locale']['RU']['country'] = 'RU'; |
281 | 281 | $opt['locale']['RU']['mostly_translated'] = false; |
282 | -$opt['locale']['RU']['what3words'] = true; // "beta" |
|
282 | +$opt['locale']['RU']['what3words'] = true; // "beta" |
|
283 | 283 | |
284 | 284 | $opt['locale']['DA']['format']['dateshort'] = '%d.%m.%y'; |
285 | 285 | $opt['locale']['DA']['format']['dm'] = '%d.%m.'; |
@@ -11,7 +11,7 @@ |
||
11 | 11 | $dev_baseurl = 'http://local.opencaching.de '; |
12 | 12 | |
13 | 13 | // common developer system settings |
14 | -require __DIR__ . '/settings-dev.inc.php'; |
|
14 | +require __DIR__.'/settings-dev.inc.php'; |
|
15 | 15 | |
16 | 16 | // database access |
17 | 17 | $opt['db']['servername'] = 'localhost'; |
@@ -11,7 +11,7 @@ |
||
11 | 11 | $dev_baseurl = 'http://local.opencaching.de '; |
12 | 12 | |
13 | 13 | // common developer system settings |
14 | -require __DIR__ . '/settings-dev.inc.php'; |
|
14 | +require __DIR__.'/settings-dev.inc.php'; |
|
15 | 15 | |
16 | 16 | // database access |
17 | 17 | $opt['db']['servername'] = 'localhost'; |
@@ -19,7 +19,7 @@ |
||
19 | 19 | // because the effect of forgetting a --test parameter can be worse |
20 | 20 | // than forgetting the --auto option in crontab. |
21 | 21 | return true; |
22 | - } elseif (@file_get_contents($opt['page']['absolute_http_url'] . 'api/ping.php') !== false) { |
|
22 | + } elseif (@file_get_contents($opt['page']['absolute_http_url'].'api/ping.php') !== false) { |
|
23 | 23 | // website is up and running |
24 | 24 | return true; |
25 | 25 | } else { |
@@ -31,11 +31,11 @@ |
||
31 | 31 | usort($this->topiclist, 'sort_compare_updated'); |
32 | 32 | $this->topiclist = array_slice($this->topiclist, 0, $opt['cron']['phpbbtopics']['count']); |
33 | 33 | |
34 | - $f = fopen(__DIR__ . '/../../cache2/phpbb.inc.php', 'w'); |
|
35 | - fwrite($f, '<?php' . "\n"); |
|
34 | + $f = fopen(__DIR__.'/../../cache2/phpbb.inc.php', 'w'); |
|
35 | + fwrite($f, '<?php'."\n"); |
|
36 | 36 | fwrite( |
37 | 37 | $f, |
38 | - '$phpbb_topics = unserialize("' . str_replace('"', '\\"', serialize($this->topiclist)) . '");' . "\n" |
|
38 | + '$phpbb_topics = unserialize("'.str_replace('"', '\\"', serialize($this->topiclist)).'");'."\n" |
|
39 | 39 | ); |
40 | 40 | fwrite($f, '?>'); |
41 | 41 | fclose($f); |
@@ -11,8 +11,8 @@ discard block |
||
11 | 11 | * |
12 | 12 | ***************************************************************************/ |
13 | 13 | |
14 | -$opt['rootpath'] = __DIR__ . '/../../'; |
|
15 | -require $opt['rootpath'] . 'lib2/cli.inc.php'; |
|
14 | +$opt['rootpath'] = __DIR__.'/../../'; |
|
15 | +require $opt['rootpath'].'lib2/cli.inc.php'; |
|
16 | 16 | |
17 | 17 | if (!Cronjobs::enabled()) { |
18 | 18 | exit; |
@@ -22,9 +22,9 @@ discard block |
||
22 | 22 | $processUser = posix_getpwuid(posix_geteuid()); |
23 | 23 | if ($processUser['name'] != $opt['cron']['username']) { |
24 | 24 | die( |
25 | - "ERROR: runcron must be run by '" . $opt['cron']['username'] |
|
26 | - . "' but was called by '" . $processUser['name'] . "'\n" . |
|
27 | - "Try something like 'sudo -u " . $opt['cron']['username'] . " php runcron.php'.\n" |
|
25 | + "ERROR: runcron must be run by '".$opt['cron']['username'] |
|
26 | + . "' but was called by '".$processUser['name']."'\n". |
|
27 | + "Try something like 'sudo -u ".$opt['cron']['username']." php runcron.php'.\n" |
|
28 | 28 | ); |
29 | 29 | } |
30 | 30 | |
@@ -39,22 +39,22 @@ discard block |
||
39 | 39 | } |
40 | 40 | } |
41 | 41 | |
42 | - $modules_dir = $opt['rootpath'] . 'util2/cron/modules/'; |
|
42 | + $modules_dir = $opt['rootpath'].'util2/cron/modules/'; |
|
43 | 43 | $param = count($argv) > 1 ? $argv[1] : ''; |
44 | 44 | |
45 | 45 | if ($param != '' && substr($param, 0, 1) != '-' && !strstr('/', $param)) { |
46 | 46 | // run one job manually for debugging purpose |
47 | 47 | $ignore_interval = true; |
48 | - require $modules_dir . $argv[1] . '.class.php'; |
|
48 | + require $modules_dir.$argv[1].'.class.php'; |
|
49 | 49 | } else { |
50 | 50 | $ignore_interval = false; |
51 | 51 | $hDir = opendir($modules_dir); |
52 | 52 | while (false !== ($file = readdir($hDir))) { |
53 | 53 | if (substr($file, -10) == '.class.php') { |
54 | 54 | if ($param == '--show') { |
55 | - echo 'running ' . $file . "\n"; |
|
55 | + echo 'running '.$file."\n"; |
|
56 | 56 | } |
57 | - require $modules_dir . $file; |
|
57 | + require $modules_dir.$file; |
|
58 | 58 | } |
59 | 59 | } |
60 | 60 | } |