diff options
| author | David M <davidmj@users.sourceforge.net> | 2006-01-04 06:37:17 +0000 |
|---|---|---|
| committer | David M <davidmj@users.sourceforge.net> | 2006-01-04 06:37:17 +0000 |
| commit | 17dc26e19b1738ccb3a2c8bb4b3757168cf9eabd (patch) | |
| tree | a336e7f3bff32c0afe1e78c67efdfc8f2ee71f53 /phpBB/style.php | |
| parent | 6583da5bf03f563b97047871d60ed3ae70af69d0 (diff) | |
| download | forums-17dc26e19b1738ccb3a2c8bb4b3757168cf9eabd.tar forums-17dc26e19b1738ccb3a2c8bb4b3757168cf9eabd.tar.gz forums-17dc26e19b1738ccb3a2c8bb4b3757168cf9eabd.tar.bz2 forums-17dc26e19b1738ccb3a2c8bb4b3757168cf9eabd.tar.xz forums-17dc26e19b1738ccb3a2c8bb4b3757168cf9eabd.zip | |
- file_get_contents instead of imploding file()s or fread()ing till the maximum filesize
- language and style properly use compression
- language now prompts user for methods
- functions_compress does not need to eval() to get a hex date, instead calls pack()
- A writing method is defined at the end of tar operations only if data has been sent to the archive
- BBCode parser does not have to eval(), it instead uses the regex to loop around the matches
Hopefully nothing broke :-)
git-svn-id: file:///svn/phpbb/trunk@5422 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/style.php')
| -rw-r--r-- | phpBB/style.php | 26 |
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 |
