Index: branches/2.8.x/CHANGELOG
===================================================================
--- branches/2.8.x/CHANGELOG	(revision 1822)
+++ branches/2.8.x/CHANGELOG	(revision 1823)
@@ -13,6 +13,10 @@
 
 
 
+20 Nov-2012 Build 1823 Dietmar Woellbrink (Luisehahne)
+! update user management, now home folder only will be created
+  if homefolders in settings are enabledPlugin
+  add save & back in user modify
 20 Nov-2012 Build 1822 Dietmar Woellbrink (Luisehahne)
 ! update installer, strict difference between table structure and data 
 # fixed wrong constant for settings table
Index: branches/2.8.x/wb/admin/skel/themes/htt/users_form.htt
===================================================================
--- branches/2.8.x/wb/admin/skel/themes/htt/users_form.htt	(revision 1822)
+++ branches/2.8.x/wb/admin/skel/themes/htt/users_form.htt	(revision 1823)
@@ -14,6 +14,7 @@
 <input type="hidden" name="user_id" value="{USER_ID}" />
 <input type="hidden" name="username_fieldname" value="{USERNAME_FIELDNAME}" />
 <input type="hidden" name="BackLink" value="{BACK_LINK}" />
+<input type="hidden" name="cancel_url" value="{{CANCEL_URL}}" />
 {FTAN}
 <table>
 <!-- BEGIN show_modify_loginname_block -->
@@ -104,6 +105,7 @@
 <tr>
 	<td colspan="2" class="center">
 		<input type="submit" name="{SUB_ACTION}" value="{SUBMIT_TITLE}" />
+		<span class="{HIDE_SAVE_BACK}"><input type="submit" name="save_back" value="{TEXT_SAVE_BACK}" /></span>
 		<input type="reset" name="reset" value="{TEXT_RESET}" />
 		<input type="button" style="width: 100px; margin-top: 5px;" onclick="javascript:window.location='{CANCEL_URL}';" value="{TEXT_CANCEL}" />
 	</td>
Index: branches/2.8.x/wb/admin/interface/version.php
===================================================================
--- branches/2.8.x/wb/admin/interface/version.php	(revision 1822)
+++ branches/2.8.x/wb/admin/interface/version.php	(revision 1823)
@@ -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', '1822');
+if(!defined('REVISION')) define('REVISION', '1823');
 if(!defined('SP')) define('SP', '');
Index: branches/2.8.x/wb/admin/users/user_list.php
===================================================================
--- branches/2.8.x/wb/admin/users/user_list.php	(revision 1822)
+++ branches/2.8.x/wb/admin/users/user_list.php	(revision 1823)
@@ -173,8 +173,8 @@
         $oTpl->set_file('page', 'users_form.htt');
         $oTpl->set_block('page', 'main_block', 'main');
         $oTpl->set_block('main_block', 'show_modify_loginname_block', 'show_modify_loginname');
+
         $oTpl->set_block('main_block', 'show_add_loginname_block', 'show_add_loginname');
-
 		$oTpl->set_block('main_block', 'show_change_group_list_block', 'show_change_group_list');
 
 		$oTpl->parse('show_change_group_list', '');
@@ -193,6 +193,7 @@
     			   'HEADING_MODIFY_USER' => '',
     			   'DISPLAY_HOME_FOLDERS' => '',
     			   'SUBMIT_TITLE' => $TEXT['ADD'],
+                   'HIDE_SAVE_BACK' => 'hide',
     			   )
 			);
 
@@ -264,7 +265,7 @@
         }
 
         // Include the WB functions file
-        require_once(WB_PATH.'/framework/functions.php');
+        if(!function_exists('directory_list')) { require(WB_PATH.'/framework/functions.php'); }
 
         // Add media folders to home folder list
         $oTpl->set_block('main_block', 'folder_list_block', 'folder_list');
Index: branches/2.8.x/wb/admin/users/save.php
===================================================================
--- branches/2.8.x/wb/admin/users/save.php	(revision 1822)
+++ branches/2.8.x/wb/admin/users/save.php	(revision 1823)
@@ -29,6 +29,7 @@
         // Create a javascript back link
 //        $js_back = ADMIN_URL.'/users/index.php';
         unset($aActionRequest['save']);
+
         $aActionRequest['modify']= 'change';
 		$database = WbDatabase::getInstance();
         $bRetVal = 0;
@@ -164,14 +165,17 @@
             	$username_code = '';
             }
 
-            // Include the WB functions file
-            if(!function_exists('media_filename')) { require(WB_PATH.'/framework/functions.php'); }
+            if(defined('HOME_FOLDERS') && HOME_FOLDERS) {
 
-            // Remove bad characters
-            $sHomeFolder = WB_PATH.MEDIA_DIRECTORY.'/home/'.( media_filename($username) );
-            if ( sizeof(createFolderProtectFile( $sHomeFolder )) )
-            {
-//            	msgQueue::add($MESSAGE['MEDIA_DIR_NOT_MADE']);
+                // Include the WB functions file
+                if(!function_exists('media_filename')) { require(WB_PATH.'/framework/functions.php'); }
+
+                // Remove bad characters
+                $sHomeFolder = WB_PATH.MEDIA_DIRECTORY.'/home/'.( media_filename($username) );
+                if ( sizeof(createFolderProtectFile( $sHomeFolder )) )
+                {
+    //            	msgQueue::add($MESSAGE['MEDIA_DIR_NOT_MADE']);
+                }
             }
 
 			$sql  = 'UPDATE `'.TABLE_PREFIX.'users` SET ';
Index: branches/2.8.x/wb/admin/users/user_form.php
===================================================================
--- branches/2.8.x/wb/admin/users/user_form.php	(revision 1822)
+++ branches/2.8.x/wb/admin/users/user_form.php	(revision 1823)
@@ -171,7 +171,7 @@
 		}
 
 		// Include the WB functions file
-		require_once(WB_PATH.'/framework/functions.php');
+        if(!function_exists('directory_list')) { require(WB_PATH.'/framework/functions.php'); }
 
 		// Add media folders to home folder list
 		$oTpl->set_block('main_block', 'folder_list_block', 'folder_list');
@@ -202,6 +202,7 @@
                     'TEXT_GROUP' => $TEXT['GROUP'],
                     'TEXT_NONE' => $TEXT['NONE'],
                     'TEXT_HOME_FOLDER' => $TEXT['HOME_FOLDER'],
+                    'TEXT_SAVE_BACK' => $TEXT['SAVE'].' &amp; '.$TEXT['BACK'],
                     'USERNAME_FIELDNAME' => $username_fieldname,
                     'CHANGING_PASSWORD' => $MESSAGE['USERS_CHANGING_PASSWORD'],
                     'HEADING_MODIFY_USER' => $HEADING['MODIFY_USER']
Index: branches/2.8.x/wb/admin/users/index.php
===================================================================
--- branches/2.8.x/wb/admin/users/index.php	(revision 1822)
+++ branches/2.8.x/wb/admin/users/index.php	(revision 1823)
@@ -44,6 +44,7 @@
         // Set parameter 'action' as alternative to javascript mechanism
         $action = (isset($aActionRequest['add'])    ? 'add'    : $action );
         $action = (isset($aActionRequest['save'])   ? 'save'   : $action );
+        $action = (isset($aActionRequest['save_back']) ? 'save'   : $action );
         $action = (isset($aActionRequest['modify']) ? 'modify' : $action );
         $action = (isset($aActionRequest['delete']) ? 'delete' : $action );
         $action = (isset($aActionRequest['delete_outdated']) ? 'delete_outdated' : $action );
@@ -141,6 +142,7 @@
 					$output  = show_userlist($admin, $aActionRequest);
 				}
 		endswitch; // end of switch
+
 		if( ($msg = msgQueue::getSuccess()) != '')
 		{
 			$output = $admin->format_message($msg, 'ok').$output;
@@ -149,8 +151,21 @@
 		{
 			$output = $admin->format_message($msg, 'error').$output;
 		}
+
 		print $output;
+        if( isset($aActionRequest['BackLink']) && isset($aActionRequest['save_back']) ) {
+            $sBackLink = $aActionRequest['BackLink'];
+echo "<script type=\"text/javascript\">
+<!--
+// Get the location object
+var locationObj = document.location;
+// Set the value of the location object
+document.location = '$sBackLink';
+-->
+</script>";
+        }
 		$admin->print_footer();
+
     }
 
 	if(!defined('WB_URL'))
Index: branches/2.8.x/wb/admin/users/add.php
===================================================================
--- branches/2.8.x/wb/admin/users/add.php	(revision 1822)
+++ branches/2.8.x/wb/admin/users/add.php	(revision 1823)
@@ -142,14 +142,16 @@
             //if user is in administrator-group, get this group else just get the first one
             if($admin->is_group_match($groups_id,'1')) { $group_id = 1; $groups_id = '1'; }
 
-            // Include the WB functions file
-            if(!function_exists('media_filename')) { require(WB_PATH.'/framework/functions.php'); }
+            if(defined('HOME_FOLDERS') && HOME_FOLDERS) {
+                // Include the WB functions file
+                if(!function_exists('media_filename')) { require(WB_PATH.'/framework/functions.php'); }
 
-            // Remove bad characters
-            $sHomeFolder = WB_PATH.MEDIA_DIRECTORY.'/home/'.( media_filename($username) );
-            if ( sizeof(createFolderProtectFile( $sHomeFolder )) )
-            {
-            	msgQueue::add($MESSAGE['MEDIA_DIR_NOT_MADE'].' ('.basename($sHomeFolder).') ' );
+                // Remove bad characters
+                $sHomeFolder = WB_PATH.MEDIA_DIRECTORY.'/home/'.( media_filename($username) );
+                if ( sizeof(createFolderProtectFile( $sHomeFolder )) )
+                {
+                	msgQueue::add($MESSAGE['MEDIA_DIR_NOT_MADE'].' ('.basename($sHomeFolder).') ' );
+                }
             }
             // Inser the user into the database
 			$sql  = 'INSERT INTO `'.TABLE_PREFIX.'users` SET '.
