Browse Source

! Choosing theme variant shows wrong initial selection [Bug 4861]

emanuele 13 years ago
parent
commit
09dc54d105
1 changed files with 4 additions and 1 deletions
  1. 4 1
      Sources/Themes.php

+ 4 - 1
Sources/Themes.php

@@ -1178,9 +1178,12 @@ function PickTheme()
 		$request = $smcFunc['db_query']('', '
 			SELECT id_theme, value
 			FROM {db_prefix}themes
-			WHERE variable = {string:theme_variant}',
+			WHERE variable = {string:theme_variant}
+				AND id_member IN ({array_int:id_member})
+			ORDER BY id_member ASC',
 			array(
 				'theme_variant' => 'theme_variant',
+				'id_member' => isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' ? array(-1, $context['current_member']) : array(-1),
 			)
 		);
 		while ($row = $smcFunc['db_fetch_assoc']($request))