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/acp/acp_styles.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/acp/acp_styles.php')
-rw-r--r-- | phpBB/includes/acp/acp_styles.php | 75 |
1 files changed, 40 insertions, 35 deletions
diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php index 116bd3ab8b..56c8369176 100644 --- a/phpBB/includes/acp/acp_styles.php +++ b/phpBB/includes/acp/acp_styles.php @@ -2904,49 +2904,54 @@ pagination_sep = \'{PAGINATION_SEP}\' $mode . '_path' => $path, ); - if ($mode != 'imageset') + switch ($mode) { - switch ($mode) - { - case 'template': - // We set a pre-defined bitfield here which we may use further in 3.2 - $sql_ary += array( - 'bbcode_bitfield' => TEMPLATE_BITFIELD, - 'template_storedb' => $store_db - ); - break; + case 'template': + // We set a pre-defined bitfield here which we may use further in 3.2 + $sql_ary += array( + 'bbcode_bitfield' => TEMPLATE_BITFIELD, + 'template_storedb' => $store_db + ); + break; - case 'theme': - $sql_ary += array( - 'theme_storedb' => $store_db, - 'theme_data' => ($store_db) ? (($root_path) ? $this->db_theme_data($sql_ary, false, $root_path) : '') : '', - 'theme_mtime' => filemtime("{$phpbb_root_path}styles/$path/theme/stylesheet.css") - ); - break; - } - } - else - { - $cfg_data = parse_cfg_file("$root_path$mode/imageset.cfg"); + case 'theme': + // We are only interested in the theme configuration for now + $theme_cfg = parse_cfg_file("{$phpbb_root_path}styles/$path/theme/theme.cfg"); - $imageset_definitions = array(); - foreach ($this->imageset_keys as $topic => $key_array) - { - $imageset_definitions = array_merge($imageset_definitions, $key_array); - } + if (isset($theme_cfg['parse_css_file']) && $theme_cfg['parse_css_file']) + { + $store_db = 1; + } - foreach ($cfg_data as $key => $value) - { - if (strpos($key, 'img_') === 0) + $sql_ary += array( + 'theme_storedb' => $store_db, + 'theme_data' => ($store_db) ? $this->db_theme_data($sql_ary, false, $root_path) : '', + 'theme_mtime' => filemtime("{$phpbb_root_path}styles/$path/theme/stylesheet.css") + ); + break; + + case 'imageset': + $cfg_data = parse_cfg_file("$root_path$mode/imageset.cfg"); + + $imageset_definitions = array(); + foreach ($this->imageset_keys as $topic => $key_array) + { + $imageset_definitions = array_merge($imageset_definitions, $key_array); + } + + foreach ($cfg_data as $key => $value) { - $key = substr($key, 4); - if (in_array($key, $imageset_definitions)) + if (strpos($key, 'img_') === 0) { - $sql_ary[$key] = str_replace('{PATH}', "styles/$path/imageset/", trim($value)); + $key = substr($key, 4); + if (in_array($key, $imageset_definitions)) + { + $sql_ary[$key] = str_replace('{PATH}', "styles/$path/imageset/", trim($value)); + } } } - } - unset($cfg_data); + unset($cfg_data); + break; } $db->sql_transaction('begin'); |