aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorDavid M <davidmj@users.sourceforge.net>2007-07-27 18:28:25 +0000
committerDavid M <davidmj@users.sourceforge.net>2007-07-27 18:28:25 +0000
commita5327bcfe91c94c6f6d066936e61ef20da0ac03a (patch)
treeb2e84e9772a51d547ce68f3c76fbc02428c2cea1 /phpBB/includes
parent9d4381b0ac446693f9d1307d77f7b16b763f65ea (diff)
downloadforums-a5327bcfe91c94c6f6d066936e61ef20da0ac03a.tar
forums-a5327bcfe91c94c6f6d066936e61ef20da0ac03a.tar.gz
forums-a5327bcfe91c94c6f6d066936e61ef20da0ac03a.tar.bz2
forums-a5327bcfe91c94c6f6d066936e61ef20da0ac03a.tar.xz
forums-a5327bcfe91c94c6f6d066936e61ef20da0ac03a.zip
- properly export localized imagesets
git-svn-id: file:///svn/phpbb/trunk@7964 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/acp/acp_styles.php48
1 files changed, 48 insertions, 0 deletions
diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php
index 00c5e9adc7..45e0ed35d1 100644
--- a/phpBB/includes/acp/acp_styles.php
+++ b/phpBB/includes/acp/acp_styles.php
@@ -1847,6 +1847,54 @@ parse_css_file = {PARSE_CSS_FILE}
'prefix' => 'imageset/imageset.cfg'
);
+ end($data);
+
+ $imageset_root = "{$phpbb_root_path}styles/{$style_row['imageset_path']}/imageset/";
+
+ $dh = @opendir($imageset_root);
+ while (($fname = readdir($dh)) !== false)
+ {
+ if ($fname[0] != '.' && $fname != 'CVS' && is_dir("$imageset_root$fname"))
+ {
+ $files[key($files)]['exclude'] .= ',' . $fname . '/imageset.cfg';
+ }
+ }
+ @closedir($dh);
+
+ $imageset_lang = array();
+
+ $sql = 'SELECT image_filename, image_name, image_height, image_width, image_lang
+ FROM ' . STYLES_IMAGESET_DATA_TABLE . "
+ WHERE imageset_id = $style_id
+ AND image_lang <> ''";
+ $result = $db->sql_query($sql);
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $imageset_lang[$row['image_lang']][$row['image_name']] = $row['image_filename'] . ($row['image_height'] ? '*' . $row['image_height']: '') . ($row['image_width'] ? '*' . $row['image_width']: '');
+ }
+ $db->sql_freeresult($result);
+
+ foreach ($imageset_lang as $lang => $imageset_localized)
+ {
+ $imageset_cfg = str_replace(array('{MODE}', '{NAME}', '{COPYRIGHT}', '{VERSION}'), array($mode, $style_row['imageset_name'], $style_row['imageset_copyright'], $config['version']), $this->imageset_cfg);
+
+ foreach ($this->imageset_keys as $topic => $key_array)
+ {
+ foreach ($key_array as $key)
+ {
+ if (isset($imageset_localized[$key]))
+ {
+ $imageset_cfg .= "\nimg_" . $key . ' = ' . str_replace("styles/{$style_row['imageset_path']}/imageset/", '{PATH}', $imageset_localized[$key]);
+ }
+ }
+ }
+
+ $data[] = array(
+ 'src' => trim($imageset_cfg),
+ 'prefix' => 'imageset/' . $lang . '/imageset.cfg'
+ );
+ }
+
unset($imageset_cfg);
}