Index: branches/2.8.x/CHANGELOG
===================================================================
--- branches/2.8.x/CHANGELOG	(revision 1736)
+++ branches/2.8.x/CHANGELOG	(revision 1737)
@@ -13,6 +13,10 @@
 
 
 
+05 Sep-2012 Build 1737 Dietmar Woellbrink (Luisehahne)
+# fixed sql statement groups_added in settings
+! set stored passwords in $session to empty string
+! installer now detect browser language and operating_system
 31 Aug-2012 Build 1736 Dietmar Woellbrink (Luisehahne)
 ! replace more invalid char in secureform.mtab to work with settings_page
 31 Aug-2012 Build 1735 Dietmar Woellbrink (Luisehahne)
Index: branches/2.8.x/wb/admin/interface/version.php
===================================================================
--- branches/2.8.x/wb/admin/interface/version.php	(revision 1736)
+++ branches/2.8.x/wb/admin/interface/version.php	(revision 1737)
@@ -51,5 +51,5 @@
 
 // check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled)
 if(!defined('VERSION')) define('VERSION', '2.8.3');
-if(!defined('REVISION')) define('REVISION', '1736');
+if(!defined('REVISION')) define('REVISION', '1737');
 if(!defined('SP')) define('SP', '');
Index: branches/2.8.x/wb/install/save.php
===================================================================
--- branches/2.8.x/wb/install/save.php	(revision 1736)
+++ branches/2.8.x/wb/install/save.php	(revision 1737)
@@ -42,7 +42,7 @@
 	if(isset($message) AND $message != '') {
 		// Copy values entered into session so user doesn't have to re-enter everything
 		if(isset($_POST['website_title'])) {
-			$_SESSION['wb_url'] = $_POST['wb_url'];
+			$_SESSION['website_title'] = $_POST['website_title'];
 			$_SESSION['default_timezone'] = $_POST['default_timezone'];
 			$_SESSION['default_language'] = $_POST['default_language'];
 			if(!isset($_POST['operating_system'])) {
@@ -57,11 +57,11 @@
 			}
 			$_SESSION['database_host'] = $_POST['database_host'];
 			$_SESSION['database_username'] = $_POST['database_username'];
-			$_SESSION['database_password'] = $_POST['database_password'];
+			$_SESSION['database_password'] = '';
 			$_SESSION['database_name'] = $_POST['database_name'];
 			$_SESSION['table_prefix'] = $_POST['table_prefix'];
 			if(!isset($_POST['install_tables'])) {
-				$_SESSION['install_tables'] = false;
+				$_SESSION['install_tables'] = true;
 			} else {
 				$_SESSION['install_tables'] = true;
 			}
@@ -68,8 +68,8 @@
 			$_SESSION['website_title'] = $_POST['website_title'];
 			$_SESSION['admin_username'] = $_POST['admin_username'];
 			$_SESSION['admin_email'] = $_POST['admin_email'];
-			$_SESSION['admin_password'] = $_POST['admin_password'];
-			$_SESSION['admin_repassword'] = $_POST['admin_repassword'];
+			$_SESSION['admin_password'] = '';
+			$_SESSION['admin_repassword'] = '';
 		}
 		// Set the message
 		$_SESSION['message'] = $message;
@@ -479,7 +479,7 @@
 	." ('wbmailer_smtp_password', ''),"
 	." ('fingerprint_with_ip_octets', '2'),"
 	." ('secure_form_module', ''),"
-	." ('groups_updated', 'time()' ),"
+    ." ('groups_updated', '".time()."' ),"
 	." ('page_extended', 'true'),"
 	." ('mediasettings', '')";
 	$database->query($settings_rows);
Index: branches/2.8.x/wb/install/index.php
===================================================================
--- branches/2.8.x/wb/install/index.php	(revision 1736)
+++ branches/2.8.x/wb/install/index.php	(revision 1737)
@@ -68,6 +68,13 @@
 	}
 }
 
+$sapi_type = php_sapi_name();
+
+if(!isset($_SESSION['operating_system'])) {
+    $operating_system = ((strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') ? 'windows' : 'linux');
+} else {
+    $operating_system = $_SESSION['operating_system'];
+}
 ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
@@ -74,7 +81,7 @@
 <title>WebsiteBaker Installation Wizard</title>
 <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
 <link href="stylesheet.css" rel="stylesheet" type="text/css" />
-<script language="javascript" type="text/javascript">
+<script type="text/javascript">
 
 function confirm_link(message, url) {
 	if(confirm(message)) location.href = url;
@@ -337,6 +344,13 @@
 			<td>
 				<select <?php echo field_error('default_language');?> tabindex="3" name="default_language" style="width: 100%;">
 					<?php
+                	$sAutoLanguage = 'EN'; // default, if no information from client available
+                	if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
+                		if(preg_match('/([a-z]{2})(?:-[a-z]{2})*/i', strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE']), $matches)) {
+                			$sAutoLanguage = strtoupper($matches[1]);
+                		}
+                	}
+                	$sAutoLanguage = isset($_SESSION['default_language']) ? $_SESSION['default_language'] : $sAutoLanguage;
 					$DEFAULT_LANGUAGE = array(
 						'BG'=>'Bulgarian', 'CA'=>'Catalan', 'CS'=>'&#268;e&scaron;tina', 'DA'=>'Danish', 'DE'=>'Deutsch', 'EN'=>'English',
 						'ES'=>'Spanish', 'ET'=>'Eesti', 'FI'=>'Suomi', 'FR'=>'Fran&ccedil;ais',
@@ -345,7 +359,7 @@
 					);
 					foreach($DEFAULT_LANGUAGE as $lang_id => $lang_title) {
 						?>
-							<option value="<?php echo $lang_id; ?>"<?php if(isset($_SESSION['default_language']) AND $_SESSION['default_language'] == $lang_id) { echo ' selected="selected"'; } elseif(!isset($_SESSION['default_language']) AND $lang_id == 'EN') { echo ' selected="selected"'; } ?>><?php echo $lang_title; ?></option>
+							<option value="<?php echo $lang_id; ?>"<?php if($sAutoLanguage == $lang_id) { echo ' selected="selected"'; }  ?> ><?php echo $lang_title; ?></option>
 						<?php
 					}
 					?>
@@ -361,12 +375,12 @@
 			<td class="name">&nbsp;
 				Server Operating System:
 			</td>
-			<td style="">
-				<input type="radio" tabindex="4" name="operating_system" id="operating_system_linux" onclick="document.getElementById('file_perms_box').style.display = 'none';" value="linux"<?php if(!isset($_SESSION['operating_system']) OR $_SESSION['operating_system'] == 'linux') { echo ' checked="checked"'; } ?> />
-				<span style="cursor: pointer;" onclick="javascript: change_os('linux');">Linux/Unix based</span>
+			<td style="<?php echo $operating_system ?>">
+				<input type="radio" tabindex="4" name="operating_system" id="operating_system_linux" onclick="document.getElementById('file_perms_box').style.display = 'none';" value="linux"<?php if($operating_system == 'linux') { echo ' checked="checked"'; } ?> />
+				<span style="cursor: pointer;" onclick="javascript:change_os('linux');">Linux/Unix based</span>
 				<br />
-				<input type="radio" tabindex="5" name="operating_system" id="operating_system_windows" onclick="document.getElementById('file_perms_box').style.display = 'none';" value="windows"<?php if(isset($_SESSION['operating_system']) AND $_SESSION['operating_system'] == 'windows') { echo ' checked="checked"'; } ?> />
-				<span style="cursor: pointer;" onclick="javascript: change_os('windows');">Windows</span>
+				<input type="radio" tabindex="5" name="operating_system" id="operating_system_windows" onclick="document.getElementById('file_perms_box').style.display = 'none';" value="windows"<?php if($operating_system == 'windows') { echo ' checked="checked"'; } ?> />
+				<span style="cursor: pointer;" onclick="javascript:change_os('windows');">Windows</span>
 			</td>
 		</tr>
 		<tr>
