Index: sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/inc/after_upload.php
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/inc/after_upload.php	(revision 3610)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/inc/after_upload.php	(revision 4972)
@@ -21,22 +21,52 @@
 include_once("../../header.inc.php");
 
+
+function convert_char( $String )
+{
+		$String = trim( str_replace( "\'", "", $String) );
+		$String = str_replace( "'", "", $String );
+		$String = str_replace( "Ã§", "c", $String );
+		$String = str_replace( "Ã", "C", $String );
+		$String = ereg_replace( "[Ã¡Ã Ã¢Ã£]", "a", $String );
+		$String = ereg_replace( "[ÃÃÃÃ]", "A", $String );
+		$String = ereg_replace( "[Ã©ÃšÃª]", "e", $String );
+		$String = ereg_replace( "[ÃÃÃ]", "E", $String );
+		$String = ereg_replace( "[Ã­Ã¬Ã®Ã¯]", "i", $String );
+		$String = ereg_replace( "[ÃÃÃ]", "I", $String );
+		$String = ereg_replace( "[Ã³Ã²ÃŽÃµ]", "o", $String );
+		$String = ereg_replace( "[ÃÃÃÃ]", "O", $String );
+		$String = ereg_replace( "[ÃºÃ¹Ã»]", "u", $String );
+		$String = ereg_replace( "[ÃÃÃ]", "U", $String );
+		
+		return $String;
+}
+
 $bo = CreateObject('filemanager.bofilemanager');
 
-foreach ($files as $f) {
-		if ($bo->vfs->cp(array(
-			'from'=> $f['fullName'],
-			'to'=> $f['name'],
-			'relatives'     => array(RELATIVE_NONE|VFS_REAL, RELATIVE_ALL)
-		)))
+foreach ($files as $f)
+{
+	$newName = convert_char( $f['name'] );
+	
+	$_array = array(
+			'from'		=> $f['fullName'],
+			'to'		=> $newName,
+			'relatives'	=> array(RELATIVE_NONE|VFS_REAL, RELATIVE_ALL)
+	);
+	
+	if ( $bo->vfs->cp($_array) )
+	{
+		$bo->vfs->set_attributes(array(
+			'string'		=> $newName,
+			'relatives'		=> array( RELATIVE_ALL ),
+			'attributes'	=> array( 'mime_type' => $f['mimetype'] )
+		));
+		
+		$fullName = $f['fullName'];
+		
+		if( file_exists($fullName) )
 		{
-				$bo->vfs->set_attributes(array(
-				'string'=> $f['name'],
-				'relatives'     => array(RELATIVE_ALL),
-				'attributes'=> array(
-				'mime_type' => $f['mimetype']
-				)
-			));
-			exec("rm -f ".escapeshellcmd(escapeshellarg($f['fullName'])));
+			exec("rm -f ".escapeshellcmd(escapeshellarg($fullName)));
 		}
+	}
 }
 
Index: sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/inc/load_lang.php
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/inc/load_lang.php	(revision 3873)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/inc/load_lang.php	(revision 4972)
@@ -25,5 +25,5 @@
 	}
 	
-	echo "var array_lang = new Array(); \n$script";
+	echo "var array_lang = new Array();\n{$script}";
 	
 ?>
Index: sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/inc/upload.php
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/inc/upload.php	(revision 3897)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/inc/upload.php	(revision 4972)
@@ -33,6 +33,6 @@
 $path					= $_POST['path'];
 $notifUser				= $_POST['notifTo'];
-$show_upload_boxes	= count($_FILES['upload_file']['name']);
-$filesUpload				= $_FILES['upload_file'];
+$show_upload_boxes		= count($_FILES['upload_file']['name']);
+$filesUpload			= $_FILES['upload_file'];
 
 function create_summaryImage($file)
@@ -121,5 +121,5 @@
 		{
 			$badchar = $bo->bad_chars( $_FILES['upload_file']['name'][$i], True, True );
-			
+
 			if( $badchar )
 			{
@@ -165,13 +165,13 @@
 				$bo->vfs->cp($tmp_arr);
 				$tmp_arr=array(
-						'string'=> $_FILES['upload_file']['name'][$i],
-						'relatives'	=> array(RELATIVE_ALL),
+						'string'		=> $_FILES['upload_file']['name'][$i],
+						'relatives'		=> array(RELATIVE_ALL),
 						'attributes'	=> array(
-							'owner_id' => $bo->userinfo['username'],
-							'modifiedby_id' => $bo->userinfo['username'],
-							'size' => $_FILES['upload_file']['size'][$i],
-							'mime_type' => $_FILES['upload_file']['type'][$i],
-							'deleteable' => 'Y',
-							'comment' => stripslashes($_POST['upload_comment'][$i])
+						'owner_id' 		=> $bo->userinfo['username'],
+						'modifiedby_id' => $bo->userinfo['username'],
+						'size' 			=> $_FILES['upload_file']['size'][$i],
+						'mime_type'		=> $_FILES['upload_file']['type'][$i],
+						'deleteable' 	=> 'Y',
+						'comment'		=> stripslashes($_POST['upload_comment'][$i])
 					)
 				);
@@ -191,10 +191,10 @@
 				)))
 				{
-					$bo->vfs->set_attributes(array(
+				$bo->vfs->set_attributes(array(
 							'string'		=> $_FILES['upload_file']['name'][$i],
 							'relatives'	=> array(RELATIVE_ALL),
 							'attributes'	=> array(
-								'mime_type'	=> $_FILES['upload_file']['type'][$i],
-								'comment'	=> stripslashes($_POST['upload_comment'][$i])
+							'mime_type'	=> $_FILES['upload_file']['type'][$i],
+							'comment'	=> stripslashes($_POST['upload_comment'][$i])
 							)
 					));
@@ -218,8 +218,8 @@
 			$bo->vfs->set_attributes(array(
 					'string'		=> $_FILES['upload_file']['name'][$i],
-					'relatives'	=> array(RELATIVE_ALL),
+					'relatives'		=> array(RELATIVE_ALL),
 					'attributes'	=> array(
-										'mime_type'	=> $_FILES['upload_file']['type'][$i],
-										'comment'	=> stripslashes($_POST['upload_comment'][$i])
+					'mime_type'	=> $_FILES['upload_file']['type'][$i],
+					'comment'	=> stripslashes($_POST['upload_comment'][$i])
 					)
 			));
Index: sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/inc/class.uifilemanager.inc.php
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/inc/class.uifilemanager.inc.php	(revision 4228)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/inc/class.uifilemanager.inc.php	(revision 4972)
@@ -582,4 +582,5 @@
 		$return['files'] = $output;
 		$return['quota']['quotaSize'] = ($quota * 1024 * 1024);
+		//echo serialize(htmlspecialchars_decode(htmlentities($return)));
 		echo serialize($return);
 	}
@@ -609,4 +610,5 @@
 			$return[] = $dir['directory'] . $dir['name'];
 		sort(&$return, SORT_STRING);
+
 		echo serialize($return);
 	}
@@ -752,5 +754,6 @@
 	}
 
-	function createdir() {
+	function createdir()
+	{
 		if ($this->bo->badchar = $this->bo->bad_chars($this->filename, True, True)) {
 			echo lang('Error:') . $this->bo->html_encode(lang('Directory names cannot contain "%1"', $badchar), 1);
@@ -771,5 +774,6 @@
 		$fileinfo = $ls_array[0];
 
-		if ($fileinfo['name']) {
+		if ($fileinfo['name'])
+		{
 			if ($fileinfo['mime_type'] != 'Directory') {
 				echo lang('Error:') . lang('%1 already exists as a file', $fileinfo['name']);
@@ -777,14 +781,20 @@
 				echo lang('Error:') . lang('Directory %1 already exists', $fileinfo['name']);
 			}
-		} else {
+		}
+		else
+		{
 			$this->bo->vfs->cd(array('string' => $this->path, 'relatives' => array(RELATIVE_NONE), 'relative' => False));
 
-			if ($this->bo->vfs->mkdir(array('string' => $this->filename))) {
-				echo lang('Created directory %1', $this->disppath . '/' . $this->filename);
-			} else {
+			if ($this->bo->vfs->mkdir(array('string' => $this->filename)))
+			{
+				echo "True";
+				//echo lang('Created directory %1', $this->disppath . '/' . $this->filename);
+			}
+			else
+			{
 				echo lang('Error:') . lang('Could not create %1', $this->disppath . '/' . $this->filename);
 			}
 		}
-		echo lang('Directory created');
+		
 	}
 
Index: sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/inc/uploadApp.php
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/inc/uploadApp.php	(revision 3894)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/inc/uploadApp.php	(revision 4972)
@@ -34,15 +34,15 @@
 							'maxFileSize'		=> $maxFileSize,
 							'maxChunkSize'		=> $maxChunkSize,
-							'archive'				=> '../tp/juploader/wjhk.jupload.jar',
-							'afterUploadURL'		=> 'after_upload.php',
+							'archive'			=> '../tp/juploader/wjhk.jupload.jar',
+							'afterUploadURL'	=> 'after_upload.php',
 							'sendMD5Sum'		=> 'true',
-							'showLogWindow'	=> 'false',
-							'debugLevel'			=> 0 
+							'showLogWindow'		=> 'false',
+							'debugLevel'		=> 0 
 						);
 
 $classParameters = array(
-							'demo_mode'	=> false,
+							'demo_mode'		=> false,
 							'allow_subdirs'	=> true,
-							'destdir'			=> '/tmp'  //Where to store the files on the webserver 
+							'destdir'		=> '/tmp'  //Where to store the files on the webserver 
 						);
 
Index: sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/js/main.js
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/js/main.js	(revision 3019)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/js/main.js	(revision 4972)
@@ -1,2 +1,0 @@
-
-
Index: sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/js/drag_area.js
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/js/drag_area.js	(revision 3436)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/js/drag_area.js	(revision 4972)
@@ -19,5 +19,6 @@
 
 counter = 0;
-DragArea.prototype.dragObj = function(e){
+DragArea.prototype.dragObj = function(e)
+{
         var _event  = is_ie ? window.event : e;
 	var _target = is_ie ? _event.srcElement : _event.target;
Index: sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/js/draw_api.js
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/js/draw_api.js	(revision 3936)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/js/draw_api.js	(revision 4972)
@@ -410,5 +410,5 @@
 		var contentQuota = document.getElementById('content_quota');
 		if (contentQuota != null)
-			contentQuota.innerHTML = '<table width="102" cellspacing="0" cellpadding="0" border="0" id="table_quota"><tbody><tr><td width="102" nowrap="true" height="15" background="../phpgwapi/templates/default/images/dsunused.gif"><table cellspacing="0" cellpadding="0" border="0" style="width: '+parseInt((usedSpace/quotaSize)*100)+'%;"><tbody><tr><td height="15" class="dsused"/></tr></tbody></table></td><td nowrap="true" align="center"><span class="boxHeaderText">'+parseInt(usedSpace/quotaSize*100)+'% ('+borkb(usedSpace)+'/'+borkb(quotaSize)+')</span></td></tr></tbody></table></td></tr></table>';
+			contentQuota.innerHTML = '<table width="102" cellspacing="0" cellpadding="0" border="0" id="table_quota"><tbody><tr><td width="102" nowrap="true" height="15" background="./phpgwapi/templates/default/images/dsunused.gif"><table cellspacing="0" cellpadding="0" border="0" style="width: '+parseInt((usedSpace/quotaSize)*100)+'%;"><tbody><tr><td height="15" class="dsused"/></tr></tbody></table></td><td nowrap="true" align="center"><span class="boxHeaderText">'+parseInt(usedSpace/quotaSize*100)+'% ('+borkb(usedSpace)+'/'+borkb(quotaSize)+')</span></td></tr></tbody></table></td></tr></table>';
 	}
 }
@@ -820,6 +820,7 @@
 				
 			var parentDir_en = base64_encode( parentDir );
-			cExecute_('./index.php?menuaction=filemanager.uifilemanager.createdir&path='
-				+ parentDir_en+'&filename='+base64_encode(name), handler.refreshDir);
+			var _action = './index.php?menuaction=filemanager.uifilemanager.createdir&path='+ parentDir_en+'&filename='+base64_encode(name);	
+			
+			cExecute_( _action , handler.refreshDir );
 				
 			currentPath = parentDir + '/' + name;
@@ -836,7 +837,8 @@
 					Dfolder.replace(my_home_filemanager, get_lang("My folder"))), '') )
 					{
+					
 					var Dfolder_en = base64_encode( Dfolder );
-					
-					cExecute_('./index.php?menuaction=filemanager.uifilemanager.removedir&path=' + Dfolder_en ,handler.refreshDir );
+					var _action = './index.php?menuaction=filemanager.uifilemanager.removedir&path=' + Dfolder_en; 
+					cExecute_( _action , handler.refreshDir );
 					var lastIndex = Dfolder.lastIndexOf('/');
 					currentPath = Dfolder.substr(0,lastIndex);
@@ -871,7 +873,7 @@
 			{
 				'lang_new_folder'		: get_lang('new folder'),
-				'lang_remove_folder'		: get_lang('remove folder'),
+				'lang_remove_folder'	: get_lang('remove folder'),
 				'path_filemanager'		: path_filemanager,
-				'onclick_new_folder'		: 'editFolders("new")',
+				'onclick_new_folder'	: 'editFolders("new")',
 				'onclick_remove_folder'	: 'editFolders("remove")'
 			};
Index: sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/js/handler.js
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/js/handler.js	(revision 3924)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/filemanager/js/handler.js	(revision 4972)
@@ -12,12 +12,12 @@
 
 		if (returnVal[0] == 'wpasswd')
-	{
-		write_error(get_lang('Wrong password'));
-		return;
-	}
-	else
-		write_msg(get_lang('Your operation was successfully executed'));
-
-	toolbar.control('reload');
+		{
+			write_error(get_lang('Wrong password'));
+			return;
+		}
+		else
+			write_msg(get_lang('Your operation was successfully executed'));
+
+		toolbar.control('reload');
 	}
 
@@ -79,10 +79,14 @@
 	function draw_folders_list(data)
 	{
+		var contentFolders = document.getElementById('content_folders');
+		
 		toolbar.control('reload');
 		folders_tree = new dFTree({name: 'main'});
-
 		folders = unserialize(data);
-
+		
+		contentFolders.innerHTML = "";
+		
 		var rootFold = new dNode({id:'root', caption: get_lang("Directories")});
+		
 		folders_tree.add(rootFold,'root');
 
@@ -118,33 +122,50 @@
 		}
 
-		document.getElementById('content_folders').innerHTML = "";
-
-		folders_tree.draw(document.getElementById('content_folders'));
+		folders_tree.draw(contentFolders);
 
 		folders_tree.openTo(currentPath);
 
 		folders_tree.getNodeById(currentPath)._select();
+
 	}
 
 	function moveto(data) 
 	{
-		returnVal = data.split('|');
+		var returnVal = data.split('|');
+		
 		if (returnVal[0] == 'NODIR')
+		{
 			write_error(get_lang('Could not copy file because no destination directory is given'));
-		else if(returnVal[0] == 'SOMEERROR'){
-			write_error(get_lang('Could not move %1 file(s)',returnVal[1]));
-		}
-		else  if(returnVal[0] == 'MOVED'){
-			if (returnVal[1] == 1)
-				write_msg(get_lang('File moved successfuly'));
-			else
-				write_msg(get_lang('%1 files moved successfuly', returnVal[1]));
-		}
-		handler.refreshDir();
+		}	
+		else if( returnVal[0] == 'SOMEERROR' )
+		{
+			write_error( get_lang('Could not move %1 file(s)',returnVal[1]) );
+		}
+		else  if( returnVal[0] == 'MOVED')
+		{
+			if ( returnVal[1] == 1 )
+			{	
+				write_msg( get_lang('File moved successfuly') );
+				toolbar.control('reload');
+			}
+			else
+			{
+				write_msg( get_lang('%1 files moved successfuly', returnVal[1]) );
+			}
+		}
 	}
 
 	function refreshDir(data) 
 	{
-		cExecute_('./index.php?menuaction=filemanager.uifilemanager.get_folders_list', handler.draw_folders_list);
+		if( data.toString() === "True" )
+		{
+			var _action = './index.php?menuaction=filemanager.uifilemanager.get_folders_list';
+			
+			cExecute_( _action , draw_folders_list );
+		}
+		else
+		{
+			write_msg( data );
+		}
 	}
 
@@ -342,8 +363,8 @@
 	handler.prototype.draw_folders_list	= draw_folders_list;
 	handler.prototype.moveto			= moveto;
-	handler.prototype.refreshDir			= refreshDir;
+	handler.prototype.refreshDir		= refreshDir;
 	handler.prototype.rename			= rename;
-	handler.prototype.restricted			= restricted;
-	handler.prototype.updateComment	= updateComment;
+	handler.prototype.restricted		= restricted;
+	handler.prototype.updateComment		= updateComment;
 	handler.prototype.upload			= upload;
 
