Index: trunk/CHANGELOG
===================================================================
--- trunk/CHANGELOG	(revision 802)
+++ trunk/CHANGELOG	(revision 803)
@@ -10,7 +10,9 @@
 # = Bugfix
 ! = Update/Change
 
-------------------------------------- 2.7.0 -------------------------------------
+------------------------------------- 2.7.0 -------------------------------------
+05-Apr-2008 Thomas Hornik
+!	some small fixes: group_id/groups_id-handling, safe_mode-query in install, better work-around for issue with phplib and code-module (removed {})
 05-Apr-2008 Christian Sommer
 !	added workaround for template parser class
 !	moved functions to edit module CSS files into the WB core to avoid duplication of code
Index: trunk/wb/include/phplib/template.inc
===================================================================
--- trunk/wb/include/phplib/template.inc	(revision 802)
+++ trunk/wb/include/phplib/template.inc	(revision 803)
@@ -657,11 +657,15 @@
     if ($this->debug & 4) {
       echo "<p><b>pparse:</b> passing parameters to parse...</p>\n";
     }
-		if($clear)
+		if(!$clear) {
+			$unknowns = $this->unknowns;
+			$this->set_unknowns('keep');
 			print $this->finish($this->parse($target, $varname, $append));
-		else
-			print $this->parse($target, $varname, $append);
-    return false;
+			$this->set_unknowns($unknowns);
+		} else {
+			print $this->finish($this->parse($target, $varname, $append));
+		}
+		return false;
   }
 
 
Index: trunk/wb/admin/users/add.php
===================================================================
--- trunk/wb/admin/users/add.php	(revision 802)
+++ trunk/wb/admin/users/add.php	(revision 803)
@@ -33,6 +33,7 @@
 
 // Get details entered
 $groups_id = implode(",", $admin->add_slashes($_POST['groups'])); //should check permissions
+$groups_id = trim($groups_id, ','); // there will be an additional ',' when "Please Choose" was selected, too
 $active = $admin->add_slashes($_POST['active'][0]);
 $username_fieldname = $admin->get_post_escaped('username_fieldname');
 $username = strtolower($admin->get_post_escaped($username_fieldname));
@@ -44,10 +45,10 @@
 $default_language = DEFAULT_LANGUAGE;
 
 // Create a javascript back link
-$js_back = "javascript: history.go(-1);";
+$js_back = 'javascript: history.go(-1);';
 
 // Check values
-if($groups_id == "") {
+if($groups_id == '') {
 	$admin->print_error($MESSAGE['USERS']['NO_GROUP'], $js_back);
 }
 if(strlen($username) < 2) {
@@ -59,12 +60,18 @@
 if($password != $password2) {
 	$admin->print_error($MESSAGE['USERS']['PASSWORD_MISMATCH'], $js_back);
 }
-if($email != "") {
+if($email != '') {
 	if($admin->validate_email($email) == false) {
 		$admin->print_error($MESSAGE['USERS']['INVALID_EMAIL'], $js_back);
 	}
 }
 
+// choose group_id from groups_id - workaround for still remaining calls to group_id (to be cleaned-up)
+$gid_tmp = explode(',', $groups_id);
+if(in_array('1', $gid_tmp)) $group_id = '1'; // if user is in administrator-group, get this group
+else $group_id = $gid_tmp[0]; // else just get the first one
+unset($gid_tmp);
+
 // Check if username already exists
 $results = $database->query("SELECT user_id FROM ".TABLE_PREFIX."users WHERE username = '$username'");
 if($results->numRows() > 0) {
Index: trunk/wb/account/signup2.php
===================================================================
--- trunk/wb/account/signup2.php	(revision 802)
+++ trunk/wb/account/signup2.php	(revision 803)
@@ -107,7 +107,7 @@
 $md5_password = md5($new_pass);
 
 // Inser the user into the database
-$query = "INSERT INTO ".TABLE_PREFIX."users (groups_id,active,username,password,display_name,email) VALUES ('$groups_id', '$active', '$username','$md5_password','$display_name','$email')";
+$query = "INSERT INTO ".TABLE_PREFIX."users (group_id,groups_id,active,username,password,display_name,email) VALUES ('$groups_id', '$groups_id', '$active', '$username','$md5_password','$display_name','$email')";
 $database->query($query);
 
 if($database->is_error()) {
Index: trunk/wb/install/index.php
===================================================================
--- trunk/wb/install/index.php	(revision 802)
+++ trunk/wb/install/index.php	(revision 803)
@@ -153,10 +153,10 @@
 			<td width="115" style="color: #666666;">PHP Safe Mode</td>
 			<td>
 				<?php
-				if(ini_get('safe_mode')) {
+				if(ini_get('safe_mode')=='' || stripos(ini_get('safe_mode'), 'off')!==FALSE || ini_get('safe_mode')==0) {
+					?><font class="good">Disabled</font><?php
+				} else {
 					?><font class="bad">Enabled</font><?php
-				} else {
-					?><font class="good">Disabled</font><?php
 				}	
 				?>
 			</td>
