diff --git a/phpBB/includes/functions_compatibility.php b/phpBB/includes/functions_compatibility.php
index 2a53b2ec3a..7c12914b3a 100644
--- a/phpBB/includes/functions_compatibility.php
+++ b/phpBB/includes/functions_compatibility.php
@@ -894,17 +894,14 @@ 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)
- {
+ if (!$line || $line[0] == '#' || ($delim_pos = strpos($line, '=')) === false) {
continue;
}
@@ -912,34 +909,97 @@ function parse_cfg_file($filename, $lines = false)
$key = htmlspecialchars(strtolower(trim(substr($line, 0, $delim_pos))), ENT_COMPAT);
$value = trim(substr($line, $delim_pos + 1));
- if (in_array($value, array('off', 'false', '0')))
- {
+ if (in_array($value, array('off', 'false', '0'))) {
$value = false;
- }
- else if (in_array($value, array('on', 'true', '1')))
- {
+ } else if (in_array($value, array('on', 'true', '1'))) {
$value = true;
- }
- else if (!trim($value))
- {
+ } else if (!trim($value)) {
$value = '';
- }
- else if (($value[0] == "'" && $value[strlen($value) - 1] == "'") || ($value[0] == '"' && $value[strlen($value) - 1] == '"'))
- {
- $value = htmlspecialchars(substr($value, 1, strlen($value)-2), ENT_COMPAT);
- }
- else
- {
+ } else if (($value[0] == "'" && $value[strlen($value) - 1] == "'") || ($value[0] == '"' && $value[strlen($value) - 1] == '"')) {
+ $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']);
}
return $parsed_items;
}
+
+/**
+* Wraps an url into a simple html page. Used to display attachments in IE.
+* this is a workaround for now; might be moved to template system later
+* direct any complaints to 1 Microsoft Way, Redmond
+*
+* @deprecated: 3.3.0-dev (To be removed: 4.0.0)
+*/
+function wrap_img_in_html($src, $title)
+{
+ echo '';
+ echo '';
+ echo '
';
+ echo '';
+ echo '';
+ echo '' . $title . '';
+ echo '';
+ echo '';
+ echo '';
+ echo '

';
+ echo '
';
+ echo '';
+ echo '';
+}
+
+/**
+* Garbage Collection
+*
+* @param bool $exit Whether to die or not.
+*
+* @return null
+*
+* @deprecated: 3.3.0-dev (To be removed: 4.0.0)
+*/
+function file_gc($exit = true)
+{
+ global $cache, $db;
+
+ if (!empty($cache))
+ {
+ $cache->unload();
+ }
+
+ $db->sql_close();
+
+ if ($exit)
+ {
+ exit;
+ }
+}
+
+/**
+* Check if the browser is internet explorer version 7+
+*
+* @param string $user_agent User agent HTTP header
+* @param int $version IE version to check against
+*
+* @return bool true if internet explorer version is greater than $version
+*
+* @deprecated: 3.3.0-dev (To be removed: 4.0.0)
+*/
+function phpbb_is_greater_ie_version($user_agent, $version)
+{
+ if (preg_match('/msie (\d+)/', strtolower($user_agent), $matches))
+ {
+ $ie_version = (int) $matches[1];
+ return ($ie_version > $version);
+ }
+ else
+ {
+ return false;
+ }
+}
diff --git a/phpBB/includes/functions_download.php b/phpBB/includes/functions_download.php
deleted file mode 100644
index 37da8e8887..0000000000
--- a/phpBB/includes/functions_download.php
+++ /dev/null
@@ -1,93 +0,0 @@
-
-* @license GNU General Public License, version 2 (GPL-2.0)
-*
-* For full copyright and license information, please see
-* the docs/CREDITS.txt file.
-*
-*/
-
-/**
-* @ignore
-*/
-if (!defined('IN_PHPBB'))
-{
- exit;
-}
-
-/**
-* Wraps an url into a simple html page. Used to display attachments in IE.
-* this is a workaround for now; might be moved to template system later
-* direct any complaints to 1 Microsoft Way, Redmond
-*
-* @deprecated: 3.3.0-dev (To be removed: 4.0.0)
-*/
-function wrap_img_in_html($src, $title)
-{
- echo '';
- echo '';
- echo '';
- echo '';
- echo '';
- echo '' . $title . '';
- echo '';
- echo '';
- echo '';
- echo '

';
- echo '
';
- echo '';
- echo '';
-}
-
-/**
-* Garbage Collection
-*
-* @param bool $exit Whether to die or not.
-*
-* @return null
-*
-* @deprecated: 3.3.0-dev (To be removed: 4.0.0)
-*/
-function file_gc($exit = true)
-{
- global $cache, $db;
-
- if (!empty($cache))
- {
- $cache->unload();
- }
-
- $db->sql_close();
-
- if ($exit)
- {
- exit;
- }
-}
-
-/**
-* Check if the browser is internet explorer version 7+
-*
-* @param string $user_agent User agent HTTP header
-* @param int $version IE version to check against
-*
-* @return bool true if internet explorer version is greater than $version
-*
-* @deprecated: 3.3.0-dev (To be removed: 4.0.0)
-*/
-function phpbb_is_greater_ie_version($user_agent, $version)
-{
- if (preg_match('/msie (\d+)/', strtolower($user_agent), $matches))
- {
- $ie_version = (int) $matches[1];
- return ($ie_version > $version);
- }
- else
- {
- return false;
- }
-}