Index: /sandbox/filemanager/setup/phpgw_pt-br.lang
===================================================================
--- /sandbox/filemanager/setup/phpgw_pt-br.lang	(revision 1693)
+++ /sandbox/filemanager/setup/phpgw_pt-br.lang	(revision 1694)
@@ -29,4 +29,5 @@
 The file %1 sent was considered infected	filemanager	pt-bt	o arquivo (%1) enviado foi considerado infectado por vírus
 Note: Uploaded is limited to %1MB	filemanager	pt-br	Nota: O tamanho máximo de envio é limitado a %1MB
+This property will change the visibility of all users that have access to this file, continue?	filemanager	pt-br	Esta propriedade altera visibilidade dos usuários que estão compartilhados, deseja continuar?
 no comments	filemanager	pt-br	sem comentários
 created %1,%2	filemanager	pt-br	Criado %1, %2
Index: /sandbox/filemanager/inc/class.uifilemanager.inc.php
===================================================================
--- /sandbox/filemanager/inc/class.uifilemanager.inc.php	(revision 1693)
+++ /sandbox/filemanager/inc/class.uifilemanager.inc.php	(revision 1694)
@@ -54,5 +54,5 @@
 		var $current_config;
 		var $goto_x;
-		var $todir;
+		var $to;
 		var $changedir; // for switching dir.
 		var $cdtodir; // for switching dir.
@@ -79,5 +79,5 @@
 		var $file; // FIXME WHERE IS THIS FILLED?
 		var $sortby;
-		var $messages = array();
+		var $messages;
 		var $show_upload_boxes;
 
@@ -86,5 +86,6 @@
 		function uifilemanager()
 		{
-			//			error_reporting(8);
+			$this->messages = &$_SESSION['phpgw_info']['filemanager']['user']['messages'];
+
 			$GLOBALS['phpgw']->browser = CreateObject('phpgwapi.browser');
 
@@ -124,5 +125,7 @@
 				'sortby'	=> array('sortby' => ''),
 				'messages'	=> array('messages'	=> ''),
-				'show_upload_boxes'	=> array('show_upload_boxes' => '')
+				'show_upload_boxes'	=> array('show_upload_boxes' => ''),
+				'to' => array('to' => '')
+
 			);
 
@@ -591,8 +594,9 @@
 					foreach($this->messages as $msg)
 					{
-						$messages.='<p>'.$msg.'</p>';
-					}
-				}
-
+						$messages.='<span>'.$msg.'</span>';
+					}
+				}
+				$this->messages = NULL;
+				
 				$vars[messages]=$messages;
 
@@ -696,5 +700,5 @@
 						}
 						$link=$this->encode_href('/index.php','menuaction=filemanager.vfs_functions.setRestricted','file='.$files['name'].'&path='.$this->path);
-						$minibar_data = '<img id="restrict_'.$files['name'].'" onClick="cExecute(\''.$link.'\',setRestricted)" alt="'.lang("mark as restricted").'" title="'.lang("mark as restricted").'" src="'.$image.'">';
+						$minibar_data = '<img id="restrict_'.$files['name'].'" onClick="setRestricted(\''.$link.'\')" alt="'.lang("mark as restricted").'" title="'.lang("mark as restricted").'" src="'.$image.'">';
 					}
 
@@ -1102,5 +1106,5 @@
 		function moveTo()
 		{
-			if(!$this->todir)
+			if(!$this->to)
 			{
 				$this->messages[] = lang('Error:').lang('Could not move file because no destination directory is given ', $this->disppath.'/'.$file);
@@ -1114,14 +1118,14 @@
 					if($this->bo->vfs->mv(array(
 						'from'	=> $file,
-						'to'	=> $this->todir . '/' . $file,
+						'to'	=> $this->to . '/' . $file,
 						'relatives'	=> array(RELATIVE_ALL, RELATIVE_NONE)
 					)))
 					{
 						$moved++;
-						$this->messages[]=lang('Moved %1 to %2', $this->disppath.'/'.$file, $this->todir.'/'.$file);
+						$this->messages[]=lang('Moved %1 to %2', $this->disppath.'/'.$file, $this->to.'/'.$file);
 					}
 					else
 					{
-						$this->messages[] = lang('Error:').lang('Could not move %1 to %2', $this->disppath.'/'.$file, $this->todir.'/'.$file);
+						$this->messages[] = lang('Error:').lang('Could not move %1 to %2', $this->disppath.'/'.$file, $this->to.'/'.$file);
 					}
 				}
@@ -1140,5 +1144,5 @@
 		function copyTo()
 		{
-			if(!$this->todir)
+			if(!$this->to)
 			{
 				$this->messages[] = lang('Error:').lang('Could not copy file because no destination directory is given ', $this->disppath.'/'.$file);
@@ -1151,14 +1155,14 @@
 					if($this->bo->vfs->cp(array(
 						'from'	=> $file,
-						'to'	=> $this->todir . '/' . $file,
+						'to'	=> $this->to . '/' . $file,
 						'relatives'	=> array(RELATIVE_ALL, RELATIVE_NONE)
 					)))
 					{
 						$copied++;
-						$this->messages[] = lang('Copied %1 to %2', $this->disppath.'/'.$file, $this->todir.'/'.$file);
+						$this->messages[] = lang('Copied %1 to %2', $this->disppath.'/'.$file, $this->to.'/'.$file);
 					}
 					else
 					{
-						$this->messages[] = lang('Error:').lang('Could not copy %1 to %2', $this->disppath.'/'.$file, $this->todir.'/'.$file);
+						$this->messages[] = lang('Error:').lang('Could not copy %1 to %2', $this->disppath.'/'.$file, $this->to.'/'.$file);
 					}
 				}
@@ -1531,5 +1535,4 @@
 					return;
 				}
-				$_SESSION['debug'][] = $ls_array;
 				if($ls_array[0]['mime_type'])
 				{
Index: /sandbox/filemanager/inc/upload.php
===================================================================
--- /sandbox/filemanager/inc/upload.php	(revision 1693)
+++ /sandbox/filemanager/inc/upload.php	(revision 1694)
@@ -26,6 +26,6 @@
 		if($badchar = $bo->bad_chars($_FILES['upload_file']['name'][$i], True, True))
 		{
-			$_SESSION['response'] = lang('Error:').lang('File names cannot contain "%1"', $badchar);
-			return;
+			$_SESSION['phpgw_info']['filemanager']['user']['messages'][] = lang('Error:').lang('File names cannot contain "%1"', $badchar);
+			continue;
 		}
 
@@ -44,6 +44,6 @@
 			if($fileinfo['mime_type'] == 'Directory')
 			{
-				$_SESSION['response'] = lang('Error:').lang('Cannot replace %1 because it is a directory', $fileinfo['name']);
-				return;
+				$_SESSION['phpgw_info']['filemanager']['user']['messages'][] = lang('Error:').lang('Cannot replace %1 because it is a directory', $fileinfo['name']);
+				continue;
 			}
 		}
@@ -51,6 +51,6 @@
 		if ($_FILES['upload_file']['size'][$i] > ($upload_max_size*1024*1024))
 		{
-			$_SESSION['response'] = lang('The size of %1 has exceded the limit: %2', $_FILES['upload_file']['name'][$i], $upload_max_size);
-			return;
+			$_SESSION['phpgw_info']['filemanager']['user']['messages'][] = lang('The size of %1 has exceded the limit: %2', $_FILES['upload_file']['name'][$i], $upload_max_size);
+			continue;
 		}
 		else if(strlen($current_config['filemanager_antivirus_command']) > 0)
@@ -60,6 +60,6 @@
 			if ($return == 1)
 			{
-				 $_SESSION['response'] = lang('Error:').lang('The file %1 sent was considered infected',$_FILES['upload_file']['name'][$i]);
-				return;
+				$_SESSION['phpgw_info']['filemanager']['user']['messages'][] = lang('Error:').lang('The file %1 sent was considered infected',$_FILES['upload_file']['name'][$i]);
+				continue;
 			}
 		}
@@ -90,5 +90,5 @@
 				$bo->vfs->cp($tmp_arr);
 
-				 $_SESSION['response'] .= lang('Created new %1', $_FILES['upload_file']['name'][$i])."\n";
+				$_SESSION['phpgw_info']['filemanager']['user']['messages'][] = lang('Created new %1', $_FILES['upload_file']['name'][$i])."\n";
 			}
 			else
@@ -110,5 +110,5 @@
 				));
 
-				 $_SESSION['response'] .= lang('Created %1,%2', $_FILES['upload_file']['name'][$i], $_FILES['upload_file']['size'][$i])."\n";
+				 $_SESSION['phpgw_info']['filemanager']['user']['messages'][] = lang('Created %1,%2', $_FILES['upload_file']['name'][$i], $_FILES['upload_file']['size'][$i])."\n";
 			}
 		}
@@ -129,5 +129,6 @@
 			));
 
-			 $_SESSION['response'] .= lang('Created %1,%2', $_FILES['upload_file']['name'][$i], $file_size[$i])."\n";
+			 $_SESSION['phpgw_info']['filemanager']['user']['messages'][] = lang('Created %1,%2', $_FILES['upload_file']['name'][$i], $file_size[$i])."\n";
+
 		}
 	}
Index: /sandbox/filemanager/js/draw_api.js
===================================================================
--- /sandbox/filemanager/js/draw_api.js	(revision 1654)
+++ /sandbox/filemanager/js/draw_api.js	(revision 1694)
@@ -8,5 +8,5 @@
 	if (parseInt(quotaSize) != 0)
 		document.getElementById('content_quota').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)+'% ('+(usedSpace/1024/1024).toFixed(1)+'M/'+(quotaSize/1024/1024)+'M)</span></td></tr></tbody></table></td></tr></table>';
-	setTimeout('displayMessages();',500);
+	setTimeout('displayMessages()',500);
 }
 var headerMsgLock = false;
@@ -38,4 +38,5 @@
 function displayMessages(){
 	var messages = document.getElementById("allMessages");
+
 	for (i=0; i < messages.childNodes.length; i++){
 		if (messages.childNodes[i].innerHTML.indexOf(get_lang('Error:')) == 0)
Index: /sandbox/filemanager/js/uploadForm.js
===================================================================
--- /sandbox/filemanager/js/uploadForm.js	(revision 1693)
+++ /sandbox/filemanager/js/uploadForm.js	(revision 1694)
@@ -20,5 +20,4 @@
 
 function handler_upload(data){
-	alert(data);
 	window.location = "/index.php?menuaction=filemanager.uifilemanager.index";
 }
Index: /sandbox/filemanager/js/common_functions.js
===================================================================
--- /sandbox/filemanager/js/common_functions.js	(revision 1654)
+++ /sandbox/filemanager/js/common_functions.js	(revision 1694)
@@ -9,5 +9,11 @@
 		menu.style.top = top_pos+"px";
 		for(j in elements)
-			menu.innerHTML += "<a href="+elements[j]['url']+">"+elements[j]['text']+"</a><br>";
+		{
+			var link = document.createElement( 'A' );
+			link.href = elements[j]['url'];
+			link.appendChild( document.createTextNode( elements[j]['text'] ) );
+			menu.appendChild(link);
+			menu.appendChild(document.createElement( 'BR' ));
+		}
 
 		menu.onmouseout = function () { menuTimeout = setTimeout("document.getElementById('menu_newFile"+id+"').style.visibility = 'hidden'",50);}
@@ -129,6 +135,8 @@
 				address = address.split("&");
 				elements[i]['url'] = address[0]+
-					"&todir="+inputEl[0].childNodes[i].innerHTML+
-					"&"+arg+".x=10"+filesUrl;
+					"&"+escape(arg)+".x=10"+
+					"&to="+base64_encode(inputEl[0].childNodes[i].innerHTML)+
+					filesUrl;
+
 			}
 			draw_menu(arg,button.parentNode.offsetLeft+50,190,elements);
@@ -256,5 +264,11 @@
 
 
-function setRestricted(data){
+function setRestricted(link){
+	var continue_set = confirm(get_lang('This property will change the visibility of all users that have access to this file, continue?'));
+	if (continue_set)
+		cExecute(link,setRestricted_handler);
+}
+
+function setRestricted_handler(data){
 	if (data.indexOf("True") == 0){
 		returnVal = data.split(':');
Index: /sandbox/filemanager/templates/default/config.tpl
===================================================================
--- /sandbox/filemanager/templates/default/config.tpl	(revision 1678)
+++ /sandbox/filemanager/templates/default/config.tpl	(revision 1694)
@@ -10,5 +10,5 @@
     <td>{lang_Max_file_size}</td>
     <td>
-    <input size="1" name="newsettings[filemanager_Max_file_size]" value="{value_filemanager_Max_file_size}">&nbsp;Mb
+    <input size="3" name="newsettings[filemanager_Max_file_size]" value="{value_filemanager_Max_file_size}">&nbsp;Mb
     </td>
     </tr>
@@ -16,5 +16,5 @@
     <td>{lang_quota_size}</td>
     <td>
-    <input size="2" name="newsettings[filemanager_quota_size]" value="{value_filemanager_quota_size}">&nbsp;Mb
+    <input size="3" name="newsettings[filemanager_quota_size]" value="{value_filemanager_quota_size}">&nbsp;Mb
     </td>
     </tr>
@@ -22,5 +22,5 @@
     <td>{lang_antivirus_command}</td>    
     <td>
-    <input size="50" name="newsettings[filemanager_antivirus_command]" value="{value_filemanager_antivirus_command}">
+    <input size="40" name="newsettings[filemanager_antivirus_command]" value="{value_filemanager_antivirus_command}">
     </td>
     </tr>
Index: /sandbox/filemanager/templates/default/filelisting.tpl
===================================================================
--- /sandbox/filemanager/templates/default/filelisting.tpl	(revision 1654)
+++ /sandbox/filemanager/templates/default/filelisting.tpl	(revision 1694)
@@ -29,5 +29,6 @@
 </div>
 <div id="fmStatusBar"><b>{lang_files_in_this_dir}:</b> {files_in_this_dir} <b>{lang_used_space}: </b> {used_space}</div>
+<div style="visibility: hidden" id="allMessages">{messages}</div>
 </form>
-<div style="visibility: hidden;" id="allMessages">{messages}</div>
+
 <!-- END filemanager_footer -->
