Index: /sandbox/filemanager/inc/class.vfs_functions.inc.php
===================================================================
--- /sandbox/filemanager/inc/class.vfs_functions.inc.php	(revision 1865)
+++ /sandbox/filemanager/inc/class.vfs_functions.inc.php	(revision 1869)
@@ -53,5 +53,5 @@
 		function vfs_functions()
 		{
-			$this->now = date('Y-m-d');
+			$this->now = date('Y-m-d H:i:s');
 
 			$this->bo = CreateObject('filemanager.bofilemanager');
@@ -197,5 +197,5 @@
 				)
 				{
-					echo "True:".$this->file;
+					echo "True|".$this->file;
 				}
 				else
@@ -244,6 +244,7 @@
 	
 		function delete(){
-			foreach($this->fileman as $filename)
-			{
+			foreach($this->fileman as $filecode)
+			{
+				$filename = base64_decode($filecode);
 				if($this->verifyLock($filename,RELATIVE_ALL) && $this->bo->vfs->rm(array(
 					'string' => $this->path.'/'.$filename,
@@ -251,9 +252,9 @@
 				)))
 				{
-					echo $filename.":";
-				}
-				else
-				{
-					echo "False:".$filename;
+					echo $filename."|";
+				}
+				else
+				{
+					echo "False|".$filename;
 					return False;
 				}
@@ -261,14 +262,15 @@
 		}
 		function archive(){
-			foreach($this->fileman as $filename)
-			{
+			foreach($this->fileman as $filecode)
+			{
+				$filename = base64_decode($filecode);
 				if(!$this->verifyLock($filename,RELATIVE_ALL))
 				{
-					echo "locked:".$filename;
+					echo "locked|".$filename;
 					return False;
 				}
 				$command .= " ".escapeshellarg($filename);
 			}
-			$zipFileName=$GLOBALS['phpgw_info']['user']['account_lid'].date("Ymd").".zip";
+			$zipFileName=$GLOBALS['phpgw_info']['user']['account_lid'].date("Y-m-d,H:i:s").".zip";
 			$zipFilePath=ini_get("session.save_path")."/".$zipFileName;
 			$command = $zipFilePath.$command;
@@ -278,5 +280,10 @@
 			}
 
-			exec("cd ".$this->bo->vfs->basedir.$this->path.";".escapeshellcmd("nice -n19 zip -9 ".$command)."; history -c");
+			exec("cd ".$this->bo->vfs->basedir.$this->path.";".escapeshellcmd("nice -n19 zip -9 ".$command),$output,$return_var);
+			exec("history -c"); // privacy is good, we dont want get passwords!
+                        if ($return_var > 1){
+				echo "False|".$return_var;
+				return false;
+			}
 
 			$this->bo->vfs->cp(array(
@@ -305,8 +312,8 @@
 
 			if ($return_var == 9 || $return_var == 5 || $return_var == 82){
-				echo "wpasswd:$command";
+				echo "wpasswd|";
 				return false;
 			}else if($return_var > 1){
-				echo "False:";
+				echo "False|";
 			}
 
@@ -322,5 +329,5 @@
 				if($badchar = $this->bo->bad_chars($this->comment, False, True))
 				{
-					echo "False:badchar:".$badchar;
+					echo "False|badchar|".$badchar;
 					return False;
 				}
@@ -334,5 +341,5 @@
 				)))
 				{
-					echo "True:".$this->file;
+					echo "True|".$this->file;
 					return True;
 				}
@@ -345,14 +352,14 @@
 				if($badchar = $this->bo->bad_chars($this->to, True, True))
 				{
-					echo "Error:badchar:".$badchar;
+					echo "Error|badchar|".$badchar;
 					return false;
 				}
 				if(ereg("/", $this->to) || ereg("\\\\", $this->to))
 				{
-					echo "Error:slashes";
+					echo "Error|slashes";
 					return false;
 				}
 				elseif(!$this->verifyLock($this->file,RELATIVE_CURRENT))
-					echo "Error:editing";
+					echo "Error|editing";
 				elseif ($this->bo->vfs->mv(array(
 					'from'  => $this->path.'/'.$this->file,
@@ -361,9 +368,9 @@
 				)))
 				{
-					echo "True:".$this->file.":".$this->to;
-				}
-				else
-				{
-					echo "Error:".$this->file.":".$this->to;
+					echo "True|".$this->file."|".$this->to;
+				}
+				else
+				{
+					echo "Error|".$this->file."|".$this->to;
 				}
 			}
Index: /sandbox/filemanager/inc/upload.php
===================================================================
--- /sandbox/filemanager/inc/upload.php	(revision 1838)
+++ /sandbox/filemanager/inc/upload.php	(revision 1869)
@@ -18,5 +18,5 @@
 $current_config = $c->config_data;
 $upload_max_size = $current_config['filemanager_Max_file_size'];
-$path = base64_decode($_POST['path']);
+$path = $_POST['path'];
 $show_upload_boxes = count($_FILES['upload_file']['name'])-1;
 
@@ -107,4 +107,12 @@
 			if($fileinfo['name'] && $fileinfo['deleteable'] != 'N')
 			{
+				$_FILES['upload_file']['name'][$i] = date('Ymd-H:i')."-".$_FILES['upload_file']['name'][$i];
+				$tmp_arr=array(
+					'from'	=> $_FILES['upload_file']['tmp_name'][$i],
+					'to'	=> $_FILES['upload_file']['name'][$i],
+					'relatives'	=> array(RELATIVE_NONE|VFS_REAL, RELATIVE_ALL)
+
+				);
+				$bo->vfs->cp($tmp_arr);
 				$tmp_arr=array(
 					'string'=> $_FILES['upload_file']['name'][$i],
@@ -113,5 +121,4 @@
 						'owner_id' => $bo->userinfo['username'],
 						'modifiedby_id' => $bo->userinfo['username'],
-						'modified' => $now,
 						'size' => $_FILES['upload_file']['size'][$i],
 						'mime_type' => $_FILES['upload_file']['type'][$i],
@@ -122,14 +129,9 @@
 				$bo->vfs->set_attributes($tmp_arr);
 
-				$tmp_arr=array(
-					'from'	=> $_FILES['upload_file']['tmp_name'][$i],
-					'to'	=> lang('new')."_".$_FILES['upload_file']['name'][$i],
-					'relatives'	=> array(RELATIVE_NONE|VFS_REAL, RELATIVE_ALL)
-				);
-				$bo->vfs->cp($tmp_arr);
+				$return[] = lang("There is a file %1, that was not replaced",$_FILES['upload_file']['name'][$i]);
 			}
 			else
 			{
-		
+
 				if ($bo->vfs->cp(array(
 					'from'=> $_FILES['upload_file']['tmp_name'][$i],
@@ -142,20 +144,8 @@
 						'relatives'	=> array(RELATIVE_ALL),
 						'attributes'=> array(
-						'mime_type' => $_FILES['upload_file']['type'][$i],
-						'comment' => stripslashes($_POST['upload_comment'][$i])
-					)
-				));
-					if (!(strpos(strtoupper($_FILES['upload_file']['type'][$i]),'IMAGE') === FALSE))
-					{
-						$content = create_summaryImage($_FILES['upload_file']['tmp_name'][$i]);
-						if ($content){
-							$bo->vfs->set_summary(array(
-							'string'=> $_FILES['upload_file']['name'][$i],
-							'relatives' => array(RELATIVE_ALL),
-							'summary'=> $content
-							));
-						}
-
-					}
+							'mime_type' => $_FILES['upload_file']['type'][$i],
+							'comment' => stripslashes($_POST['upload_comment'][$i])
+						)
+					));
 				}
 				else{
@@ -177,12 +167,25 @@
 				'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])
 				)
 			));
 
 		}
+
+		if (!(strpos(strtoupper($_FILES['upload_file']['type'][$i]),'IMAGE') === FALSE))
+		{
+			$content = create_summaryImage($_FILES['upload_file']['tmp_name'][$i]);
+			if ($content){
+				$bo->vfs->set_summary(array(
+					'string'=> $_FILES['upload_file']['name'][$i],
+					'relatives' => array(RELATIVE_ALL),
+					'summary'=> $content
+				));
+			}
+
+		}
 	}
-	if (count($return) > 0)
+if (count($return) > 0)
 		$_SESSION['response'] = serialize($return);
 	else
Index: /sandbox/filemanager/inc/class.bofilemanager.inc.php
===================================================================
--- /sandbox/filemanager/inc/class.bofilemanager.inc.php	(revision 1693)
+++ /sandbox/filemanager/inc/class.bofilemanager.inc.php	(revision 1869)
@@ -129,5 +129,5 @@
 			if ($all)
 			{
-				if (preg_match("-([\\/<>\'\"\&])-", $string, $badchars))
+				if (preg_match("-([\\/<>\|\'\"\&])-", $string, $badchars))
 				$rstring = $badchars[1];
 			}
Index: /sandbox/filemanager/js/draw_api.js
===================================================================
--- /sandbox/filemanager/js/draw_api.js	(revision 1865)
+++ /sandbox/filemanager/js/draw_api.js	(revision 1869)
@@ -459,5 +459,5 @@
 				if (files[i].checked){
 					one_checked = true;
-					filesUrl += "&fileman["+j+"]="+files[i].value;
+					filesUrl += "&fileman["+j+"]="+base64_encode(files[i].value);
 					j++;
 				}
@@ -479,5 +479,5 @@
 				if (files[i].checked){
 					one_checked = true;
-					filesUrl += "&fileman["+j+"]="+files[i].value;
+					filesUrl += "&fileman["+j+"]="+base64_encode(files[i].value);
 					j++;
 				}
Index: /sandbox/filemanager/js/handler.js
===================================================================
--- /sandbox/filemanager/js/handler.js	(revision 1865)
+++ /sandbox/filemanager/js/handler.js	(revision 1869)
@@ -2,5 +2,5 @@
 }
 handler.prototype.del = function(data){
-        var returnVal = data.split(':');
+        var returnVal = data.split('|');
         var deletedFiles = "";
         for (i=0; i < returnVal.length; i++)
@@ -16,4 +16,9 @@
                                 pai.parentNode.removeChild(pai);
                         }
+			if (i > 3) //to avoid big message
+			{
+				deletedFiles = "  " +returnVal.length + " " +get_lang("files");
+				break;
+			}
                 }
                 write_msg(get_lang('Deleted %1',deletedFiles.substr(2)));
@@ -26,5 +31,5 @@
         }
         else
-                var returnVal = data.split(':');
+                var returnVal = data.split('|');
         if ( returnVal[0] == "True" ){
                 if (returnVal[1] != returnVal[2]) write_msg(get_lang('Renamed %1 to %2',returnVal[1],returnVal[2]));
@@ -44,13 +49,12 @@
         else
         {
-                if (returnVal[1] == "badchar")
-                        write_error(get_lang('File names cannot contain "%1"',returnVal[2]));
-                else
-                        if (returnVal[1] == "slashes")
-                                write_error(get_lang('File names cannot contain \\ or /'));
-                        if (returnVal[1] == "editing")
-                                write_error(get_lang('This file is being edited right now'));
-                        else
-                                write_error(get_lang('Could not rename %1 to %2', returnVal[1], returnVal[2]));
+		if (returnVal[1] == "badchar")
+			write_error(get_lang('File names cannot contain "%1"',returnVal[2]));
+		else if (returnVal[1] == "slashes")
+			write_error(get_lang('File names cannot contain \\ or /'));
+		else if (returnVal[1] == "editing")
+			write_error(get_lang('This file is being edited right now'));
+		else
+			write_error(get_lang('Could not rename %1 to %2', returnVal[1], returnVal[2]));
         }
 
@@ -69,5 +73,5 @@
 handler.prototype.restricted = function(data){
         if (data.indexOf("True") == 0){
-                returnVal = data.split(':');
+                returnVal = data.split('|');
                 var img_lock = document.getElementById('restrict_'+returnVal[1]);
                 if (img_lock.src.indexOf('button_unlock') > 0)
@@ -86,5 +90,5 @@
 }
 handler.prototype.archive = function(data) {
-	returnVal = data.split(':');
+	returnVal = data.split('|');
 	if (returnVal[0] == 'False')
 	{
@@ -102,4 +106,19 @@
 
 }
+handler.prototype.updateComment = function (data) {
+	var returnVal = data.split('|');
+	if (data.indexOf("True") == 0)
+	{
+		write_msg(get_lang('Updated comment for %1',returnVal[1]));
+	}
+	else
+	{
+		if (returnVal[1] == "badchar")
+			write_error(get_lang('Comments cannot contain "%1"',returnVal[2]));
+		else
+			write_error(get_lang('You have no permission to access this file'));
+	}
+
+}
 
 var handler = new handler();
Index: /sandbox/filemanager/js/common_functions.js
===================================================================
--- /sandbox/filemanager/js/common_functions.js	(revision 1865)
+++ /sandbox/filemanager/js/common_functions.js	(revision 1869)
@@ -160,5 +160,5 @@
 	if (el.value == oldValue) return;
 	var filename = base64_encode(el.id);
-	cExecute('./index.php?menuaction=filemanager.vfs_functions.editComment&file='+filename+'&comment='+base64_encode(el.value),updateComment);
+	cExecute('./index.php?menuaction=filemanager.vfs_functions.editComment&file='+filename+'&comment='+base64_encode(el.value),handler.updateComment);
 }
 
@@ -168,18 +168,5 @@
 }
 
-function updateComment(data) {
-	var returnVal = data.split(':');
-	if (data.indexOf("True") == 0){
-		write_msg(get_lang('Updated comment for %1',returnVal[1]));
-	}
-	else
-	{
-		if (returnVal[1] == "badchar")
-			write_error(get_lang('Comments cannot contain "%1"',returnVal[2]));
-		else
-			write_error(get_lang('You have no permission to access this file'));
-	}
-
-}
+
 function EditColumns(param){
 	if (param == 'close')
