mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-05 23:25:30 +02:00
- properly export localized imagesets
git-svn-id: file:///svn/phpbb/trunk@7964 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
9d4381b0ac
commit
a5327bcfe9
@ -288,6 +288,7 @@ p a {
|
||||
<li>[Fix] Fixing session problems when using MySQL strict mode in conjunction with very long browser agent string (Bug #13827)</li>
|
||||
<li>[Fix] Disallow post/pm subjects entirely made up from non-printable chars and whitespaces (Bug #13800)</li>
|
||||
<li>[Fix] Allow moving private messages from the sentbox (Bug #13791)</li>
|
||||
<li>[Fix] Properly export localized imagesets</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user