diff options
| author | Nils Adermann <naderman@naderman.de> | 2006-08-08 19:02:44 +0000 |
|---|---|---|
| committer | Nils Adermann <naderman@naderman.de> | 2006-08-08 19:02:44 +0000 |
| commit | c69a6f7acd9c9c0b1293e6977fe1ec5b490725d4 (patch) | |
| tree | 7b52ef2b8f7c9525cc039517d8fa98da57e8728d /phpBB/includes/session.php | |
| parent | 2ed25800c5ad5125740f574092098d284071300b (diff) | |
| download | forums-c69a6f7acd9c9c0b1293e6977fe1ec5b490725d4.tar forums-c69a6f7acd9c9c0b1293e6977fe1ec5b490725d4.tar.gz forums-c69a6f7acd9c9c0b1293e6977fe1ec5b490725d4.tar.bz2 forums-c69a6f7acd9c9c0b1293e6977fe1ec5b490725d4.tar.xz forums-c69a6f7acd9c9c0b1293e6977fe1ec5b490725d4.zip | |
- fixed some problems with themes
- added support for {IMG_NAME_SRC}, {IMG_NAME_WIDTH} and {IMG_NAME_HEIGHT}
- fulltext_native has to use group by in a few more quries
git-svn-id: file:///svn/phpbb/trunk@6254 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/session.php')
| -rw-r--r-- | phpBB/includes/session.php | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php index 998b8be5f6..38107d80db 100644 --- a/phpBB/includes/session.php +++ b/phpBB/includes/session.php @@ -1080,8 +1080,33 @@ class user extends session { $this->theme['theme_storedb'] = 1; + $stylesheet = file_get_contents("{$phpbb_root_path}styles/{$this->theme['theme_path']}/theme/stylesheet.css"); + // Match CSS imports + $matches = array(); + preg_match_all('/@import url\(["\'](.*)["\']\);/i', $stylesheet, $matches); + + if (sizeof($matches)) + { + $content = ''; + foreach ($matches[0] as $idx => $match) + { + if ($content = @file_get_contents("{$phpbb_root_path}styles/{$this->theme['theme_path']}/theme/" . $matches[1][$idx])) + { + $content = trim($content); + } + else + { + $content = ''; + } + $stylesheet = str_replace($match, $content, $stylesheet); + } + unset ($content); + } + + $stylesheet = str_replace('./', 'styles/' . $this->theme['theme_path'] . '/theme/', $stylesheet); + $sql_ary = array( - 'theme_data' => implode('', file("{$phpbb_root_path}styles/" . $this->theme['theme_path'] . '/theme/stylesheet.css')), + 'theme_data' => $stylesheet, 'theme_mtime' => time(), 'theme_storedb' => 1 ); |
