@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | // database placeholder |
| 108 | 108 | |
| 109 | 109 | // productive database with opencaching-tables |
| 110 | -$opt['db']['placeholder']['db'] = ''; // selected by default |
|
| 110 | +$opt['db']['placeholder']['db'] = ''; // selected by default |
|
| 111 | 111 | |
| 112 | 112 | // empty database for temporary table creation |
| 113 | 113 | $opt['db']['placeholder']['tmpdb'] = ''; |
@@ -121,14 +121,14 @@ discard block |
||
| 121 | 121 | $opt['system']['maillog']['syslog_db_user'] = ''; |
| 122 | 122 | $opt['system']['maillog']['syslog_db_password'] = ''; |
| 123 | 123 | $opt['system']['maillog']['syslog_db_table'] = ''; |
| 124 | -$opt['system']['maillog']['syslog_oc_host'] = ''; // 'host_name' column in syslog DB |
|
| 125 | -$opt['system']['maillog']['syslog_mta'] = 'postfix/smtp%'; // 'program' column in syslog DB |
|
| 126 | -$opt['system']['maillog']['column']['id'] = 'id'; // 'ID' |
|
| 127 | -$opt['system']['maillog']['column']['created'] = 'created'; // 'ReceivedAt' |
|
| 124 | +$opt['system']['maillog']['syslog_oc_host'] = ''; // 'host_name' column in syslog DB |
|
| 125 | +$opt['system']['maillog']['syslog_mta'] = 'postfix/smtp%'; // 'program' column in syslog DB |
|
| 126 | +$opt['system']['maillog']['column']['id'] = 'id'; // 'ID' |
|
| 127 | +$opt['system']['maillog']['column']['created'] = 'created'; // 'ReceivedAt' |
|
| 128 | 128 | $opt['system']['maillog']['column']['host_name'] = 'host_name'; // 'FromHost' |
| 129 | -$opt['system']['maillog']['column']['message'] = 'message'; // 'Message' |
|
| 130 | -$opt['system']['maillog']['column']['program'] = 'program'; // 'SysLogTag' |
|
| 131 | -$opt['system']['maillog']['inactivity_warning'] = 30; // warn after N days without new entries |
|
| 129 | +$opt['system']['maillog']['column']['message'] = 'message'; // 'Message' |
|
| 130 | +$opt['system']['maillog']['column']['program'] = 'program'; // 'SysLogTag' |
|
| 131 | +$opt['system']['maillog']['inactivity_warning'] = 30; // warn after N days without new entries |
|
| 132 | 132 | |
| 133 | 133 | /* cookie or session |
| 134 | 134 | * |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | */ |
| 153 | 153 | $opt['session']['cookiename'] = 'ocdevelopment'; // only with SAVE_COOKIE |
| 154 | 154 | $opt['session']['path'] = '/'; |
| 155 | -$opt['session']['domain'] = ''; // may be overwritten by $opt['domain'][...]['cookiedomain'] |
|
| 155 | +$opt['session']['domain'] = ''; // may be overwritten by $opt['domain'][...]['cookiedomain'] |
|
| 156 | 156 | |
| 157 | 157 | /* Debug level (combine with OR | ) |
| 158 | 158 | * DEBUG_NO = productive use |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | /* other template options |
| 171 | 171 | * |
| 172 | 172 | */ |
| 173 | -$opt['page']['origin_url'] = 'https://www.opencaching.de/'; // production installation for this OC site |
|
| 173 | +$opt['page']['origin_url'] = 'https://www.opencaching.de/'; // production installation for this OC site |
|
| 174 | 174 | $opt['page']['develsystem'] = false; |
| 175 | 175 | $opt['page']['teampic_url'] = 'https://www.opencaching.de/images/team/'; |
| 176 | 176 | $opt['page']['teammember_url'] = 'https://www.opencaching.de/'; |
@@ -204,7 +204,7 @@ discard block |
||
| 204 | 204 | 'newcaches' => [ |
| 205 | 205 | 'show' => true, |
| 206 | 206 | 'url' => 'https://www.opencaching.de', |
| 207 | - 'urlname' => '', // optional: show other name than the url-domain |
|
| 207 | + 'urlname' => '', // optional: show other name than the url-domain |
|
| 208 | 208 | ], |
| 209 | 209 | ]; |
| 210 | 210 | |
@@ -364,7 +364,7 @@ discard block |
||
| 364 | 364 | |
| 365 | 365 | /* license-related functions |
| 366 | 366 | */ |
| 367 | -$opt['logic']['license']['newusers'] = 2; // see license constants in lib2/logic/const.inc.php |
|
| 367 | +$opt['logic']['license']['newusers'] = 2; // see license constants in lib2/logic/const.inc.php |
|
| 368 | 368 | $opt['logic']['license']['admin'] = true; |
| 369 | 369 | $opt['logic']['license']['disclaimer'] = false; |
| 370 | 370 | $opt['logic']['license']['terms'] = 'articles.php?page=impressum#datalicense'; |
@@ -372,18 +372,18 @@ discard block |
||
| 372 | 372 | |
| 373 | 373 | /* optional APIs |
| 374 | 374 | */ |
| 375 | -$opt['logic']['api']['email_problems']['key'] = ''; // must be set to enable |
|
| 376 | -$opt['logic']['api']['user_inactivity']['key'] = ''; // must be set to enable |
|
| 375 | +$opt['logic']['api']['email_problems']['key'] = ''; // must be set to enable |
|
| 376 | +$opt['logic']['api']['user_inactivity']['key'] = ''; // must be set to enable |
|
| 377 | 377 | |
| 378 | 378 | /* cache report info settings |
| 379 | 379 | */ |
| 380 | 380 | $opt['logic']['cache_reports']['delaydays'] = 2; |
| 381 | -$opt['logic']['cache_reports']['min_processperday'] = 5; // set to 0 to disable |
|
| 382 | -$opt['logic']['cache_reports']['max_processperday'] = 20; // set to 0 to disable |
|
| 381 | +$opt['logic']['cache_reports']['min_processperday'] = 5; // set to 0 to disable |
|
| 382 | +$opt['logic']['cache_reports']['max_processperday'] = 20; // set to 0 to disable |
|
| 383 | 383 | |
| 384 | 384 | /* cronjob |
| 385 | 385 | */ |
| 386 | -$opt['cron']['username'] = 'apache'; // system username for cronjobs |
|
| 386 | +$opt['cron']['username'] = 'apache'; // system username for cronjobs |
|
| 387 | 387 | |
| 388 | 388 | /* generate sitemap.xml and upload to search engines |
| 389 | 389 | * |
@@ -25,13 +25,13 @@ |
||
| 25 | 25 | |
| 26 | 26 | if (isset($_REQUEST['list_caches'])) { |
| 27 | 27 | $list_caches = strtoupper(trim($_REQUEST['list_caches'])); |
| 28 | -} elseif (isset($_REQUEST['addCache']) && $_REQUEST['addCache'] >= 1) { |
|
| 28 | +} elseif (isset($_REQUEST['addCache']) && $_REQUEST['addCache'] >= 1) { |
|
| 29 | 29 | $list_caches = $_REQUEST['addCache']; |
| 30 | 30 | } else { |
| 31 | 31 | $list_caches = ''; |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | -if (isset($_REQUEST['addCache'])){ |
|
| 34 | +if (isset($_REQUEST['addCache'])) { |
|
| 35 | 35 | foreach ($list_caches as $nCacheId) { |
| 36 | 36 | $cache = new cache($nCacheId); |
| 37 | 37 | $oc_codes[] = $cache->getWPOC(); |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | $load_query = false; |
| 89 | 89 | $show_lastsearchbutton = true; |
| 90 | 90 | |
| 91 | -$list_caches = isset($_REQUEST['addCache']) && $_REQUEST['addCache'] >= 1 ? $_REQUEST['addCache'] : ''; |
|
| 91 | +$list_caches = isset($_REQUEST['addCache']) && $_REQUEST['addCache'] >= 1 ? $_REQUEST['addCache'] : ''; |
|
| 92 | 92 | $added_waypoints = 0; |
| 93 | 93 | |
| 94 | 94 | if (isset($_REQUEST['queryid']) || isset($_REQUEST['showresult'])) { // Ocprop: showresult, queryid |
@@ -1297,11 +1297,11 @@ discard block |
||
| 1297 | 1297 | |
| 1298 | 1298 | //add selected caches to selected cachelist |
| 1299 | 1299 | if (isset($_REQUEST['addToList']) && isset($_REQUEST['addCache']) && isset($_REQUEST['selectCachelist'])) { |
| 1300 | - $list_caches_= $_REQUEST['addToList']; |
|
| 1300 | + $list_caches_ = $_REQUEST['addToList']; |
|
| 1301 | 1301 | $added_waypoints = addToList($list_caches); |
| 1302 | - $addCachelist= cachelist::getListById((int) $_REQUEST['selectCachelist']); // null for invalid ID |
|
| 1302 | + $addCachelist = cachelist::getListById((int)$_REQUEST['selectCachelist']); // null for invalid ID |
|
| 1303 | 1303 | } elseif (isset($_REQUEST['addToList'])) { |
| 1304 | - $addCachelist= cachelist::getListById((int) $_REQUEST['selectCachelist']); // null for invalid ID |
|
| 1304 | + $addCachelist = cachelist::getListById((int)$_REQUEST['selectCachelist']); // null for invalid ID |
|
| 1305 | 1305 | $error_addCaches = true; |
| 1306 | 1306 | } |
| 1307 | 1307 | |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | * @param $oldDescMode |
| 32 | 32 | * @param $descMode |
| 33 | 33 | * @param $text |
| 34 | - * @return mixed|string |
|
| 34 | + * @return string |
|
| 35 | 35 | */ |
| 36 | 36 | function processEditorInput($oldDescMode, $descMode, $text, &$representText) |
| 37 | 37 | { |
@@ -54,9 +54,9 @@ discard block |
||
| 54 | 54 | |
| 55 | 55 | /** |
| 56 | 56 | * @param $text |
| 57 | - * @param $texthtml0 |
|
| 57 | + * @param boolean $texthtml0 |
|
| 58 | 58 | * |
| 59 | - * @return mixed|string |
|
| 59 | + * @return string |
|
| 60 | 60 | */ |
| 61 | 61 | function html2plaintext($text, $texthtml0) |
| 62 | 62 | { |
@@ -6,8 +6,6 @@ |
||
| 6 | 6 | |
| 7 | 7 | // used in both lib1 and lib2 code |
| 8 | 8 | |
| 9 | -use OcLegacy\Editor\EditorConstants; |
|
| 10 | - |
|
| 11 | 9 | require_once __DIR__ . '/smiley.inc.php'; |
| 12 | 10 | |
| 13 | 11 | |
@@ -96,7 +96,7 @@ |
||
| 96 | 96 | // REDMINE-1249: Missing log text in mail notification |
| 97 | 97 | // simpler solution that converts html to text as the previous class html2text emptied the text completely |
| 98 | 98 | // implementation for line wrap, url's and probably more is missing |
| 99 | - $text = preg_replace( "/\n\s+/", "\n", rtrim(html_entity_decode(strip_tags($text)))); |
|
| 99 | + $text = preg_replace("/\n\s+/", "\n", rtrim(html_entity_decode(strip_tags($text)))); |
|
| 100 | 100 | |
| 101 | 101 | $text = str_replace( |
| 102 | 102 | [ |
@@ -143,7 +143,7 @@ |
||
| 143 | 143 | |
| 144 | 144 | // editor mode switching |
| 145 | 145 | if (isset($_POST['descMode'])) { |
| 146 | - $descMode = (int) $_POST['descMode']; // Ocprop: 2 |
|
| 146 | + $descMode = (int)$_POST['descMode']; // Ocprop: 2 |
|
| 147 | 147 | if (($descMode < EditorConstants::HTML_MODE) || ($descMode > EditorConstants::EDITOR_MODE)) { |
| 148 | 148 | $descMode = EditorConstants::EDITOR_MODE; |
| 149 | 149 | } |
@@ -99,7 +99,7 @@ |
||
| 99 | 99 | if (isset($_REQUEST['save'])) { |
| 100 | 100 | $purifier = new OcHTMLPurifier($opt); |
| 101 | 101 | $desctext = isset($_REQUEST['desctext']) ? $purifier->purify($_REQUEST['desctext']) : ""; |
| 102 | - $desc_htmledit = isset($_REQUEST['descMode']) && ((int) $_REQUEST['descMode']) == EditorConstants::HTML_MODE ? '0' : '1'; |
|
| 102 | + $desc_htmledit = isset($_REQUEST['descMode']) && ((int)$_REQUEST['descMode']) == EditorConstants::HTML_MODE ? '0' : '1'; |
|
| 103 | 103 | sql( |
| 104 | 104 | " |
| 105 | 105 | UPDATE `user` |
@@ -24,8 +24,8 @@ discard block |
||
| 24 | 24 | isset($_REQUEST['desclang']) && |
| 25 | 25 | !isset($_REQUEST['descid'])) { // Ocprop |
| 26 | 26 | |
| 27 | - $cache_id = $_REQUEST['cacheid']; // Ocprop |
|
| 28 | - $desc_lang = $_REQUEST['desclang']; // Ocprop |
|
| 27 | + $cache_id = $_REQUEST['cacheid']; // Ocprop |
|
| 28 | + $desc_lang = $_REQUEST['desclang']; // Ocprop |
|
| 29 | 29 | |
| 30 | 30 | $rs = sql("SELECT `id` FROM `cache_desc` WHERE `cache_id`='&1' AND `language`='&2'", $cache_id, $desc_lang); |
| 31 | 31 | if (mysqli_num_rows($rs) == 1) { |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | //save to DB? |
| 93 | 93 | if (isset($_POST['post'])) { // Ocprop |
| 94 | 94 | //here we read all used information from the form if submitted |
| 95 | - $descMode = (int) $_POST['descMode'] ?? EditorConstants::EDITOR_MODE; // Ocprop |
|
| 95 | + $descMode = (int)$_POST['descMode'] ?? EditorConstants::EDITOR_MODE; // Ocprop |
|
| 96 | 96 | |
| 97 | 97 | switch ($descMode) { |
| 98 | 98 | case EditorConstants::HTML_MODE: |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | $oldDescMode = $descMode; |
| 116 | 116 | } |
| 117 | 117 | |
| 118 | - $short_desc = trim($_POST['short_desc']); // Ocprop |
|
| 118 | + $short_desc = trim($_POST['short_desc']); // Ocprop |
|
| 119 | 119 | $hint = htmlspecialchars(trim($_POST['hints']), ENT_COMPAT, 'UTF-8'); |
| 120 | 120 | $desclang = $_POST['desclang']; |
| 121 | 121 | $show_all_langs = isset($_POST['show_all_langs_value']) ? $_POST['show_all_langs_value'] : 0; |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | } |
| 131 | 131 | |
| 132 | 132 | // Text from textarea |
| 133 | - $desc = trim($_POST['desc']); // Ocprop |
|
| 133 | + $desc = trim($_POST['desc']); // Ocprop |
|
| 134 | 134 | |
| 135 | 135 | // fuer alte Versionen von OCProp |
| 136 | 136 | if (isset($_POST['submit']) && !isset($_POST['version2'])) { |
@@ -287,7 +287,7 @@ discard block |
||
| 287 | 287 | tpl_set_var('desclang', htmlspecialchars($desc_lang, ENT_COMPAT, 'UTF-8')); |
| 288 | 288 | tpl_set_var('desclang_name', htmlspecialchars(db_LanguageFromShort($desc_lang), ENT_COMPAT, 'UTF-8')); |
| 289 | 289 | tpl_set_var('cachename', htmlspecialchars($desc_record['name'], ENT_COMPAT, 'UTF-8')); |
| 290 | - tpl_set_var('reset', $reset); // obsolete |
|
| 290 | + tpl_set_var('reset', $reset); // obsolete |
|
| 291 | 291 | tpl_set_var('submit', $submit); |
| 292 | 292 | |
| 293 | 293 | // Text / normal HTML / HTML editor |
@@ -108,12 +108,12 @@ |
||
| 108 | 108 | // descMode auslesen, falls nicht gesetzt aus dem Profil laden |
| 109 | 109 | if (isset($_POST['descMode'])) { |
| 110 | 110 | // Ocprop |
| 111 | - $descMode = (int) $_POST['descMode']; |
|
| 111 | + $descMode = (int)$_POST['descMode']; |
|
| 112 | 112 | if (($descMode < EditorConstants::HTML_MODE) || ($descMode > EditorConstants::EDITOR_MODE)) { |
| 113 | 113 | $descMode = EditorConstants::EDITOR_MODE; |
| 114 | 114 | } |
| 115 | 115 | if (isset($_POST['oldDescMode'])) { |
| 116 | - $oldDescMode = (int) $_POST['oldDescMode']; |
|
| 116 | + $oldDescMode = (int)$_POST['oldDescMode']; |
|
| 117 | 117 | if (($oldDescMode < EditorConstants::HTML_MODE) || ($oldDescMode > EditorConstants::EDITOR_MODE)) { |
| 118 | 118 | $oldDescMode = $descMode; |
| 119 | 119 | } |
@@ -5,9 +5,9 @@ discard block |
||
| 5 | 5 | use Symfony\Component\ErrorHandler\Debug; |
| 6 | 6 | use Symfony\Component\HttpFoundation\Request; |
| 7 | 7 | |
| 8 | -require dirname(__DIR__).'/vendor/autoload.php'; |
|
| 8 | +require dirname(__DIR__) . '/vendor/autoload.php'; |
|
| 9 | 9 | |
| 10 | -(new Dotenv())->bootEnv(dirname(__DIR__).'/.env'); |
|
| 10 | +(new Dotenv())->bootEnv(dirname(__DIR__) . '/.env'); |
|
| 11 | 11 | |
| 12 | 12 | if ($_SERVER['APP_DEBUG']) { |
| 13 | 13 | umask(0000); |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | Request::setTrustedHosts([$trustedHosts]); |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | -$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']); |
|
| 26 | +$kernel = new Kernel($_SERVER['APP_ENV'], (bool)$_SERVER['APP_DEBUG']); |
|
| 27 | 27 | $request = Request::createFromGlobals(); |
| 28 | 28 | $response = $kernel->handle($request); |
| 29 | 29 | $response->send(); |