aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/style.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/style.php')
-rw-r--r--phpBB/style.php26
1 files changed, 3 insertions, 23 deletions
diff --git a/phpBB/style.php b/phpBB/style.php
index 2c47e72f17..813e39e865 100644
--- a/phpBB/style.php
+++ b/phpBB/style.php
@@ -84,10 +84,10 @@ if ($id && $sid)
}
$force_load = true; // Ideally this needs to be based on $config['load_tplcompile']
-
+
if ($theme['theme_mtime'] < filemtime("{$phpbb_root_path}styles/" . $theme['theme_path'] . '/theme/stylesheet.css') || $force_load)
{
- $theme['theme_data'] = implode('', file("{$phpbb_root_path}styles/" . $theme['theme_path'] . '/theme/stylesheet.css'));
+ $theme['theme_data'] = file_get_contents("{$phpbb_root_path}styles/" . $theme['theme_path'] . '/theme/stylesheet.css');
// Match CSS imports
$matches = array();
@@ -97,7 +97,7 @@ if ($id && $sid)
{
foreach ($matches[0] as $idx => $match)
{
- $theme['theme_data'] = str_replace($match, load_css_file($matches[1][$idx]), $theme['theme_data']);
+ $theme['theme_data'] = str_replace($match, file_get_contents("{$phpbb_root_path}styles/" . $theme['theme_path'] . '/theme/' . $matches[1][$idx]), $theme['theme_data']);
}
}
@@ -132,24 +132,4 @@ if ($id && $sid)
$db->sql_close();
}
-function load_css_file($filename)
-{
- global $phpbb_root_path, $theme;
-
- $handle = "{$phpbb_root_path}styles/" . $theme['theme_path'] . '/theme/' . $filename;
-
- if ($fp = @fopen($handle, 'r'))
- {
- $content = trim(@fread($fp, filesize($handle)));
- @fclose($fp);
- }
- else
- {
- $content = '';
- }
-
- return $content;
-}
-
-
?> \ No newline at end of file