aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp/acp_styles.php
diff options
context:
space:
mode:
authorDavid M <davidmj@users.sourceforge.net>2007-04-06 15:07:33 +0000
committerDavid M <davidmj@users.sourceforge.net>2007-04-06 15:07:33 +0000
commit25fc4fdb664cb1c9cf892bb186e854061ab35468 (patch)
tree145376b51b26e1ae0cb16a185586b6631455970a /phpBB/includes/acp/acp_styles.php
parentba536c6270a1cd448e5a4add56686fd3fdc9d711 (diff)
downloadforums-25fc4fdb664cb1c9cf892bb186e854061ab35468.tar
forums-25fc4fdb664cb1c9cf892bb186e854061ab35468.tar.gz
forums-25fc4fdb664cb1c9cf892bb186e854061ab35468.tar.bz2
forums-25fc4fdb664cb1c9cf892bb186e854061ab35468.tar.xz
forums-25fc4fdb664cb1c9cf892bb186e854061ab35468.zip
#8784
git-svn-id: file:///svn/phpbb/trunk@7287 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acp/acp_styles.php')
-rw-r--r--phpBB/includes/acp/acp_styles.php29
1 files changed, 25 insertions, 4 deletions
diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php
index db976f2f0a..f29010d1e6 100644
--- a/phpBB/includes/acp/acp_styles.php
+++ b/phpBB/includes/acp/acp_styles.php
@@ -1452,7 +1452,7 @@ parse_css_file = {PARSE_CSS_FILE}
{
while (($file = readdir($dp)) !== false)
{
- if (!is_file($dir . '/' . $file) && !is_link($dir . '/' . $file) && $file[0] != '.' && strtoupper($file) != 'CVS' && !sizeof($imagesetlist['lang']))
+ if (!is_file($dir . '/' . $file) && !is_link($dir . '/' . $file) && $file[0] != '.' && strtoupper($file) != 'CVS')
{
$dp2 = @opendir("$dir/$file");
@@ -1463,10 +1463,9 @@ parse_css_file = {PARSE_CSS_FILE}
while (($file2 = readdir($dp2)) !== false)
{
- $imglang = $file;
if (preg_match('#\.(?:gif|jpg|png)$#', $file2))
{
- $imagesetlist['lang'][] = "$file/$file2";
+ $imagesetlist['all_lang'][$file][] = "$file/$file2";
}
}
closedir($dp2);
@@ -1481,7 +1480,29 @@ parse_css_file = {PARSE_CSS_FILE}
// Make sure the list of possible images is sorted alphabetically
sort($imagesetlist['nolang']);
- sort($imagesetlist['lang']);
+ foreach ($imagesetlist['all_lang'] as $lang => $data)
+ {
+ sort($imagesetlist['all_lang'][$lang]);
+ }
+
+ if (isset($imagesetlist['all_lang'][$user->img_lang]) && sizeof($imagesetlist['all_lang'][$user->img_lang]))
+ {
+ $imglang = $lang;
+ $imagesetlist['lang'] = $imagesetlist['all_lang'][$user->img_lang];
+ }
+ else
+ {
+ foreach ($imagesetlist['all_lang'] as $lang => $data)
+ {
+ if (sizeof($imagesetlist['all_lang'][$user->img_lang]))
+ {
+ $imglang = $lang;
+ $imagesetlist['lang'] = $imagesetlist['all_lang'][$lang];
+ break;
+ }
+ }
+ }
+ unset($imagesetlist['all_lang']);
$imagesetlist_options = '';
foreach ($imagesetlist as $type => $img_ary)