1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-03 23:37:39 +02:00

[ticket/14285] Use route service for download routes

PHPBB3-14285
This commit is contained in:
rubencm
2021-03-21 21:46:56 +01:00
parent f66c1d9e1e
commit c375f2c9e5
12 changed files with 106 additions and 49 deletions

View File

@@ -894,11 +894,13 @@ function parse_cfg_file($filename, $lines = false)
{
$parsed_items = array();
if ($lines === false) {
if ($lines === false)
{
$lines = file($filename);
}
foreach ($lines as $line) {
foreach ($lines as $line)
{
$line = trim($line);
if (!$line || $line[0] == '#' || ($delim_pos = strpos($line, '=')) === false)
@@ -927,14 +929,15 @@ function parse_cfg_file($filename, $lines = false)
$value = htmlspecialchars(substr($value, 1, strlen($value) - 2), ENT_COMPAT);
}
else
{
{
$value = htmlspecialchars($value, ENT_COMPAT);
}
$parsed_items[$key] = $value;
}
if (isset($parsed_items['parent']) && isset($parsed_items['name']) && $parsed_items['parent'] == $parsed_items['name']) {
if (isset($parsed_items['parent']) && isset($parsed_items['name']) && $parsed_items['parent'] == $parsed_items['name'])
{
unset($parsed_items['parent']);
}