Index: sandbox/expressoMail1_2/MailArchiver/2.2/phpgwapi/inc/class.vfs_dav.inc.php
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/phpgwapi/inc/class.vfs_dav.inc.php	(revision 3863)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/phpgwapi/inc/class.vfs_dav.inc.php	(revision 4972)
@@ -2002,6 +2002,4 @@
 		function delete ($data)
 		{
-			error_log("Aqui", 3, "/tmp/log");
-			
 			return $this->rm ($data);
 		}
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;
 
Index: sandbox/expressoMail1_2/MailArchiver/2.2/admin/inc/class.bovoip.inc.php
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/admin/inc/class.bovoip.inc.php	(revision 395)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/admin/inc/class.bovoip.inc.php	(revision 4972)
@@ -38,5 +38,5 @@
 		$group = "<groups>";
 	
-		if((trim($groups) != '') && (is_array($groups)))
+		if(is_array($groups))
 		{
 			foreach($groups as $tmp)	
Index: sandbox/expressoMail1_2/MailArchiver/2.2/calendar/inc/class.bocalendar.inc.php
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/calendar/inc/class.bocalendar.inc.php	(revision 4427)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/calendar/inc/class.bocalendar.inc.php	(revision 4972)
@@ -804,5 +804,5 @@
                 }
 
-                // TODO: Levar em consideração no cálculo das ocorrências o parâmetro
+                // TODO: Levar em consideracao no calculo das ocorrencias o parametro
                 // $event['recur_interval']
                 function expand_repetition($event){
@@ -1245,7 +1245,16 @@
 						$this->so->set_recur_weekly((int)$l_recur_enddate['year'],(int)$l_recur_enddate['month'],(int)$l_recur_enddate['mday'],(int)$l_cal['recur_interval'],$l_cal['recur_data']);
 						break;
+					case MCAL_RECUR_MONTHLY_WDAY:
+						$var_wday = true;
 					case MCAL_RECUR_MONTHLY_MDAY:
-						$this->so->set_recur_monthly_mday((int)$l_recur_enddate['year'],(int)$l_recur_enddate['month'],(int)$l_recur_enddate['mday'],(int)$l_cal['recur_interval']);
-
+						if ($var_wday)
+						{
+							$this->so->set_recur_monthly_wday((int)$l_recur_enddate['year'],(int)$l_recur_enddate['month'],(int)$l_recur_enddate['mday'],(int)$l_cal['recur_interval']);
+						}
+						else
+						{
+							$this->so->set_recur_monthly_mday((int)$l_recur_enddate['year'],(int)$l_recur_enddate['month'],(int)$l_recur_enddate['mday'],(int)$l_cal['recur_interval']);
+						}
+						
 						$repetido = (int)$l_cal['recur_type']; // recebe o tipo de repeticao;
 						$this->so->add_attribute('recur_type',(@isset($repetido) && $repetido?$repetido:0));
@@ -1264,7 +1273,4 @@
 							$end_rept = 0; // variavel recebe zero e nao sera adicionado nenhum alarme para o agendamento;
 						}
-						break;
-					case MCAL_RECUR_MONTHLY_WDAY:
-						$this->so->set_recur_monthly_wday((int)$l_recur_enddate['year'],(int)$l_recur_enddate['month'],(int)$l_recur_enddate['mday'],(int)$l_cal['recur_interval']);
 						break;
 					case MCAL_RECUR_YEARLY:
@@ -2985,5 +2991,5 @@
 
 				//set to GMT
-				//Aqui estou pegando o horário do evento e setando para GMT de acordo com o fuso horário estabelecido nas configurações do expresso.
+				//Aqui estou pegando o horario do evento e setando para GMT de acordo com o fuso horario estabelecido nas configuracoes do expresso.
 				$start_time = mktime($event['start']['hour'],$event['start']['min'],$event['start']['sec'],$event['start']['month'],$event['start']['mday'],$event['start']['year']) - $GLOBALS['phpgw']->datetime->tz_offset;
 				$end_time = mktime($event['end']['hour'],$event['end']['min'],$event['end']['sec'],$event['end']['month'],$event['end']['mday'],$event['end']['year']) - $GLOBALS['phpgw']->datetime->tz_offset;
@@ -2992,6 +2998,6 @@
 				$end_time = date("Ymd\THis\Z", $end_time);
 	
-				// Necessário espaços após quebra-de-linha, na descrição, caso contrário 
-				// ocorrerá erro ao importar o agendamento no Outlook (erro lunar).
+				// Necessario espacos apos quebra-de-linha, na descricao, caso contrario 
+				// ocorrera erro ao importar o agendamento no Outlook (erro lunar).
 				$description = str_replace("\n","\n ", $event['description']);
 				
@@ -3433,5 +3439,5 @@
 			}
 
-			//Inicializa variï¿œvel de retorno.
+			//Inicializa variavel de retorno.
 			$returncode=true;			
 			if(count($mail->to)) {				
@@ -3532,5 +3538,5 @@
 			$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'] = $temp_dateformat;
 			
-			// Notifica por email o criador do compromisso, com as possï¿œveis falhas.						
+			// Notifica por email o criador do compromisso, com as posseveis falhas.						
 			if($errorInfo) {
 				$tmpbody = "<font color='red'>".lang("The following commitment had problems for DELIVERING the NOTIFICATION messages.").".</font><br>";
Index: sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/stylesheet/news_add.xsl
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/stylesheet/news_add.xsl	(revision 4778)
+++ 	(revision )
@@ -1,23 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-    
-    <xsl:param name="linkURL" />
-    
-    <xsl:template match="rss/channel">
-        
-        <img src='../phpgwapi/templates/default/images/foldertree_trash.png'>
-            <xsl:attribute name="onclick">
-                    news_edit.unsubscribe('<xsl:value-of select="$linkURL"/>',this);
-            </xsl:attribute>
-            <xsl:attribute name="style">
-                width:16px; height:16px; cursor: pointer;
-            </xsl:attribute>
-        </img>
-        
-        <label titleRss="{title}">
-            <xsl:value-of select = "title" />
-        </label>
-        
-    </xsl:template>
-    
-</xsl:stylesheet>
Index: sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/stylesheet/makeWindow.xsl
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/stylesheet/makeWindow.xsl	(revision 4778)
+++ 	(revision )
@@ -1,35 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-    <xsl:output method="html" omit-xml-declaration="yes"/>    
-    
-    <xsl:param name="lang_label1" />
-    <xsl:param name="lang_label2" />
-    <xsl:param name="lang_subscribe" />
-    
-    <xsl:template match="make_window">
-        
-        <div style="border:1px solid #000; margin: 2px; width: 333px;">
-            
-            <div style="margin: 2px;">
-                <div style="margin-top:5px;">
-                    <label><xsl:value-of select="$lang_label1"/></label>
-                </div>
-                <div style="margin-top:5px;">
-                    <input type="text" id="rssEnter" size="40"/>
-                </div>
-                <div style="margin-top:5px;">
-                    <input value="{$lang_subscribe}" onclick="news_edit.subscribe();" type="button" />
-                </div>
-            </div>
-            
-            <div style="margin:5px 2px 2px 2px;border-bottom: 1px solid #000;">
-                <label><xsl:value-of select="$lang_label2"/></label>
-            </div>
-            
-            <div id="listRSS" style="overflow-y: auto; height: 160px; margin: 2px;"></div>
-            
-        </div>
-
-    </xsl:template>
-    
-</xsl:stylesheet>
Index: sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/templates/default/readRss.tpl
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/templates/default/readRss.tpl	(revision 4972)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/templates/default/readRss.tpl	(revision 4972)
@@ -0,0 +1,65 @@
+<!-- BEGIN bodyRSS -->
+<script type="text/javascript" src="phpgwapi/js/x_tools/xtools.js"></script>
+<script type="text/javascript" src="{path_expressoMail}/js/news_edit.js"></script>
+<script>
+
+	function selectAll() 
+	{
+		if( arguments.length > 0 )
+		{
+			var _select = document.getElementById( arguments[0] );
+
+			for( var i = 0 ; i < _select.options.length; i++ )
+			{
+				_select.options[i].selected = true;
+			}
+		}
+	}
+	
+</script>
+
+<form method="POST" action="{action_url}">
+	<center>
+		<div style="width:500px;border:1px solid #000;">
+			
+			<div style="margin:20px; height:35px;text-align:left;">
+				<img src="{path_expressoMail}/templates/default/images/rss.gif"/>
+				<label style="font-size:12px;font-weight:bold;"> {lang_RSS_Manager} </label>
+			</div>
+			
+			<div style="margin:20px; text-align:left;">
+				<label>{lang_enable_RSS} .:</label>
+				<br/>
+				<select id="enabledReadRSS" name="newsettings[expressoMail_enabled_read_rss]">
+					<option value="false" {selected_expressoMail_enabled_read_rss_false}>{lang_No}</option>
+					<option value="true" {selected_expressoMail_enabled_read_rss_true}>{lang_Yes}</option>	            
+				</select>
+			</div>
+
+			<div style="margin:5px 5px 5px 20px; text-align:left;">
+				<label>{lang_enter_Rss} .:</label>
+				<br/>
+				<input type="text" id="rssEnter" size="45"/>
+			</div>
+
+			<div style="margin:5px 5px 5px 20px; text-align:left;">
+				<button type="button" onclick="news_edit.subscribe();">{lang_add}</button>
+				<button type="button" onclick="news_edit.unsubscribe();">{lang_remove}</button>
+			</div>
+			
+			<div style="margin:15px 5px 5px 20px; text-align:left;">
+				<label>{lang_list_rss} .:</label>
+				<br/>
+				<select id="list_rss" size="10" style="width:320px;" multiple name="newsettings_expressoMail_list_rss[]">{options_list_rss}</select>
+			</div>
+			
+			<div style="margin:20px; text-align:left;">
+				<input type="submit" name="save" value="{lang_submit}" onclick="selectAll('list_rss');" />
+				<input type="submit" name="cancel" value="{lang_cancel}" />
+			</div>
+			<input id="lang_can_not_access_this_rss" type="hidden" name="lang_can_not_access_this_rss" value="{lang_can_not_access_this_rss}" />
+		</div>
+	</center>
+</form>
+
+<!-- END bodyRSS -->
Index: sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/templates/default/config.tpl
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/templates/default/config.tpl	(revision 4778)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/templates/default/config.tpl	(revision 4972)
@@ -147,20 +147,4 @@
        </td>
    </tr> 
-   <tr bgcolor="{th_bg}">
-		<td colspan="2">
-			&nbsp;
-		</td>   	
-   </tr>
-   <tr bgcolor="{row_on}">
-       <td>
-           <label style="font-weight:bold;">Habilitar leitor de RSS</label>
-       </td>
-	   <td>
-	       <select id="enabledReadRSS" name="newsettings[expressoMail_enabled_read_rss]">
-	            <option value="false" {selected_expressoMail_enabled_read_rss_false}>{lang_No}</option>
-				<option value="true" {selected_expressoMail_enabled_read_rss_true}>{lang_Yes}</option>	            
-	       </select>
-       </td>
-   </tr>
 <!-- END body -->
 <!-- BEGIN footer -->
Index: sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/setup/tables_current.inc.php
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/setup/tables_current.inc.php	(revision 4778)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/setup/tables_current.inc.php	(revision 4972)
@@ -33,15 +33,4 @@
             'ix' => array(),
             'uc' => array()
-		),
-		'phpgw_userrss' => array(
-			'fd' => array(
-				'uid'		=> array('type' => 'int', 'nullable' => false  ),
-				'rss_url'	=> array('type' => 'varchar', 'precision' => 1000 ),
-				'name'		=> array('type' => 'varchar', 'precision' => 50)
-			),
-			'pk' => array('uid','rss_url'),
-			'fk' => array(),
-            'ix' => array(),
-            'uc' => array()
 		)
 	);
Index: sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/setup/setup.inc.php
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/setup/setup.inc.php	(revision 4876)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/setup/setup.inc.php	(revision 4972)
@@ -16,5 +16,4 @@
 	$setup_info['expressoMail1_2']['tables'][]		= 'phpgw_expressomail_contacts';
     $setup_info['expressoMail1_2']['tables'][]		= 'phpgw_certificados';
-    $setup_info['expressoMail1_2']['tables'][]		= 'phpgw_userrss';
 	$setup_info['expressoMail1_2']['enable']    	= 1;
 
Index: sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/inc/class.dynamic_contacts.inc.php
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/inc/class.dynamic_contacts.inc.php	(revision 4644)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/inc/class.dynamic_contacts.inc.php	(revision 4972)
@@ -79,5 +79,11 @@
 			{
 				foreach($this->contacts as $item => $valor)
-					$contact .= str_replace("#",";",$this->contacts[$item]['email']) . ',';
+					//
+					if (strstr($this->contacts[$item]['email'], '#')){
+						$contact .= str_replace("#",";",$this->contacts[$item]['email']) . ',';
+					}else{
+						$contact .= ';'.$this->contacts[$item]['email'] . ',';
+					}	
+					
 				//Retira ultima virgula.
 				$contact = substr($contact,0,(strlen($contact) - 1));
@@ -106,5 +112,5 @@
 		{
 			// Trim all whitespaces and duplicated commas from full_email_address
-			$full_email_address = preg_replace('{(,)\1+}',',',ereg_replace( ' +', '', $full_email_address));
+			//$full_email_address = preg_replace('{(,)\1+}',',',ereg_replace( ' +', '', $full_email_address));
 			$parse_address = imap_rfc822_parse_adrlist($full_email_address, "");
 			$new_contacts = array();
@@ -118,7 +124,7 @@
 				if(!$this->contacts) // Used one time to insert the first contact in database
 				{
-					$this->db->insert_contact($val->personal."#".$val->mailbox."@".$val->host);
+					$this->db->insert_contact(ltrim(rtrim($val->personal))."#".$val->mailbox."@".$val->host);
 					// Just new contact added.
-					$new_contacts[] = $val->personal.";".$val->mailbox."@".$val->host;
+					$new_contacts[] = ltrim(rtrim($val->personal)).";".$val->mailbox."@".$val->host;
 					$this->contacts = $this->db->get_dynamic_contacts();
 				}
@@ -129,5 +135,5 @@
 					foreach($this->contacts as $item => $valor)
 					{
-						if($this->contacts[$item]['email'] == $val->personal."#".$val->mailbox."@".$val->host) // check if email already exists
+						if($this->contacts[$item]['email'] == ltrim(rtrim($val->personal))."#".$val->mailbox."@".$val->host) // check if email already exists
 						{	
 							$this->contacts[$item]['timestamp'] = time(); //update timestamp of email
@@ -143,14 +149,14 @@
 					{
 						// Just new contact added.
-						$new_contacts[] = $val->personal.";".$val->mailbox."@".$val->host;
+						$new_contacts[] = ltrim(rtrim($val->personal)).";".$val->mailbox."@".$val->host;
 						if($this->number_of_contacts > count($this->contacts))
 						{
 							$this->contacts[] = array( 'timestamp'	=> time(),
-														'email'		=> $val->personal."#".$val->mailbox."@".$val->host);
+														'email'		=> ltrim(rtrim($val->personal))."#".$val->mailbox."@".$val->host);
 						}
 						if($this->number_of_contacts <= count($this->contacts))
 						{
 							$this->contacts[$older_contact] = array( 'timestamp'	=> time(),
-																		'email'		=> $val->personal."#".$val->mailbox."@".$val->host);
+																		'email'		=> ltrim(rtrim($val->personal))."#".$val->mailbox."@".$val->host);
 						}
 					}
Index: sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/inc/class.ScriptS.inc.php
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/inc/class.ScriptS.inc.php	(revision 4644)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/inc/class.ScriptS.inc.php	(revision 4972)
@@ -254,7 +254,4 @@
         $continue = 1;
         $tmpSubject = "";
-
-        $a = 0;
-        
 
         // Recebe os valores das regras;
@@ -281,14 +278,4 @@
             $rule['unconditional'] = 0;
 
-            if( $a < 2 )
-            {
-                error_log( print_r($tmp, true), 3, "/tmp/log" );
-                
-                error_log( print_r($rule, true), 3, "/tmp/log" );
-                
-                $a++;
-            }    
-            
-            
             if (!$rule['from'] && !$rule['to'] && !$rule['subject'] && !$rule['field'] && empty($rule['size']) && $rule['action']) {
                 $rule['unconditional'] = 1;
Index: sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/inc/class.uiconfigRSS.inc.php
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/inc/class.uiconfigRSS.inc.php	(revision 4972)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/inc/class.uiconfigRSS.inc.php	(revision 4972)
@@ -0,0 +1,126 @@
+<?php
+
+  /***************************************************************************\
+  *  Expresso - ReadRSS			                                              *
+  * ------------------------------------------------------------------------- *
+  *  This program is free software; you can redistribute it and/or modify it  *
+  *  under the terms of the GNU General Public License as published by the    *
+  *  Free Software Foundation; either version 2 of the License, or (at your   *
+  *  option) any later version.                                               *
+  \***************************************************************************/
+
+class uiconfigRss
+{
+	private $dao;
+	
+	public $public_functions = array(
+		'editRss'  	=> True,
+		'saveRss'		=> True,
+	);
+	
+	function __construct()
+	{
+		$this->dao = CreateObject('phpgwapi.config',$GLOBALS['phpgw_info']['flags']['currentapp']);
+		$GLOBALS['phpgw']->common->phpgw_header();
+		$this->dao->read_repository();
+	}	
+	
+	public final function editRss()
+	{
+		if( !$GLOBALS['phpgw']->acl->check('run',1,'admin') )
+		{
+			$GLOBALS['phpgw']->redirect_link('/admin/index.php');
+		}
+
+		$webserver_url = $GLOBALS['phpgw_info']['server']['webserver_url'];
+		$webserver_url = ( !empty($webserver_url) ) ? $webserver_url : '/';
+		
+		$GLOBALS['phpgw_info']['flags']['app_header'] = lang('Admin') .' - ' . lang('RSS Reader');
+		echo parse_navbar();
+		
+		$path_expressoMail = $webserver_url . "/". $GLOBALS['phpgw_info']['flags']['currentapp']; 
+		
+		if ($this->dao->config_data )
+		{
+			$current_config = $this->dao->config_data;
+		}
+		
+		$selected_true = "";
+		 
+		if( $current_config['expressoMail_enabled_read_rss'] === 'true' )
+		{
+			$selected_true = 'selected';
+		}
+
+		//Option True / False
+		$selected_false = "";
+		
+		if( $current_config['expressoMail_enabled_read_rss'] === 'false' )
+		{
+			$selected_false = 'selected';
+		}
+
+		// Options
+		$option = "";
+		
+		if( $current_config['expressoMail_list_rss'] )
+		{
+			foreach($current_config['expressoMail_list_rss'] as $config)
+			{
+				$item = explode("|", $config);
+				$option .= "<option value='{$config}'>".$item[1]."</option>";
+			}
+		}
+		
+		$GLOBALS['phpgw']->template->set_file(array('readRSS' => 'readRss.tpl'));
+		$GLOBALS['phpgw']->template->set_block('readRSS','bodyRSS');	
+		$GLOBALS['phpgw']->template->set_var(array(
+													'action_url'		=> $GLOBALS['phpgw']->link('/index.php','menuaction=expressoMail1_2.uiconfigRSS.saveRss'),											
+													'lang_add'			=> lang('Add'),	
+													'lang_cancel'		=> lang('Cancel'),
+													'lang_enable_RSS'	 => lang('Enable RSS reader'),
+													'lang_enter_Rss'	=> lang('Enter the URL of the RSS service'),
+													'lang_list_rss'		=> lang('List of registered RSS'),
+													'lang_submit' 		=> lang('Save'),
+													'lang_remove'		=> lang('remove'),
+													'lang_RSS_Manager'	=> lang('RSS Manager'),	
+													'lang_No' 			=> lang('No'),
+													'lang_Yes' 			=> lang('Yes'),
+													'lang_can_not_access_this_rss' => lang('Can not access this RSS'),
+													'selected_expressoMail_enabled_read_rss_true' => $selected_true, 
+													'selected_expressoMail_enabled_read_rss_false' => $selected_false,
+													'options_list_rss'	=> $option,
+													'path_expressoMail'	=> $path_expressoMail
+											));
+		
+		$GLOBALS['phpgw']->template->pparse('out','bodyRSS');
+	}
+	
+	public final function saveRss()
+	{
+		if( !$GLOBALS['phpgw']->acl->check('run',1,'admin') )
+		{
+			$GLOBALS['phpgw']->redirect_link('/admin/index.php');
+		}		
+		else
+		{
+			if ( $_POST['save'] )
+			{
+				$listRss = ( $_POST['newsettings_expressoMail_list_rss'] ) ? serialize($_POST['newsettings_expressoMail_list_rss']) : "" ;
+				
+				$this->dao->config_data['expressoMail_list_rss'] = $listRss;
+				
+				foreach($_POST['newsettings'] as $key => $config)
+				{
+					$this->dao->config_data[$key] = $config;
+				}
+
+				$this->dao->save_repository();
+			}
+
+			$GLOBALS['phpgw']->redirect_link('/admin/index.php');
+		}		
+	}
+}
+
+?>
Index: sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/inc/hook_admin.inc.php
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/inc/hook_admin.inc.php	(revision 1040)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/inc/hook_admin.inc.php	(revision 4972)
@@ -26,5 +26,7 @@
 	$file = Array(
 		'Site Configuration' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiconfig.index&appname=' . $appname),
+		'RSS Reader' => $GLOBALS['phpgw']->link('/index.php','menuaction=expressoMail1_2.uiconfigRSS.editRss')
 	);
+	
 //Do not modify below this line
 	display_section($appname,$title,$file);
Index: sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/inc/class.rss.inc.php
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/inc/class.rss.inc.php	(revision 4778)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/inc/class.rss.inc.php	(revision 4972)
@@ -1,12 +1,13 @@
 <?php
+
+include('../header.inc.php');
 
 class rss
 {
-
-	function rss (){
-	}
 	// BEGIN of functions.
-	function getContent($param){
+	function getContent($param)
+	{
 		$daurl=$param['url'];
+		
 		if (preg_match('/http(s)?:\/\//i',$daurl,$matches) == 0)
 			$daurl = 'http://'.$daurl;
@@ -34,70 +35,61 @@
 	}
 
-	private function createTableRSS()
-	{
-		$query = 'CREATE TABLE phpgw_userrss( uid INT NOT NULL,rss_url VARCHAR(1000),name varchar(50), PRIMARY KEY (uid,rss_url) );';
-		
-		$GLOBALS['phpgw']->db->query($query);
-		
-		if ( $GLOBALS['phpgw']->db->Error )
-			return false;
-		else
-			return true;
-	}
-	
 	function getChannels()
 	{
-		include('../header.inc.php');
+		$query 	= "SELECT config_value FROM phpgw_config WHERE config_name = 'expressoMail_enabled_read_rss';";
 		
-		$flag 		= false;
-		$tableQuery = "select relname from pg_stat_user_tables order by relname;";
-		
-		if( $GLOBALS['phpgw']->db->query( $tableQuery ) )
+		if( $GLOBALS['phpgw']->db->query( $query ) )
 		{
 			while( $GLOBALS['phpgw']->db->next_record() )
 			{
-				$tables[] = $GLOBALS['phpgw']->db->row();
-			}
-			
-			foreach( $tables as $tableName )
-			{
-				if( strtolower( $tableName['relname'] ) === 'phpgw_userrss' )
-				{
-					$flag = true;
-				}
+				$result = $GLOBALS['phpgw']->db->row();
 			}
 		}
 		
-		if( !$flag )
+		if( $result['config_value'] === 'true' )
 		{
-			$flag = $this->createTableRSS();
+			$query = "SELECT * FROM phpgw_config WHERE config_name = 'expressoMail_list_rss';";
+			
+			if( $GLOBALS['phpgw']->db->query($query) ) 
+			{
+				while( $GLOBALS['phpgw']->db->next_record() )
+				{
+					$result = $GLOBALS['phpgw']->db->row();
+				}
+			}
+	
+			if( $result['config_value'] )
+			{
+				$i 		= 0;
+				$rss 	= unserialize($result['config_value']);
+				
+				foreach( $rss as $item )
+				{
+					$tmp = explode( "|", $item );
+					$return[$i]['rss_url']	= $tmp[0];
+					$return[$i++]['name'] 	= $tmp[1];
+				}
+	
+				return $return;
+			}
+			else
+				return "";
 		}
-		
-		$query = 'SELECT rss_url,name FROM phpgw_userrss WHERE uid = '.$_SESSION['phpgw_session']['account_id'];		
-		
-		if( $GLOBALS['phpgw']->db->query($query) ) 
-		{
-			while( $GLOBALS['phpgw']->db->next_record() )
-			{
-				$return[] = $GLOBALS['phpgw']->db->row();
-			}
-		}
-
-		if( count($return) > 0 )
-			return $return;
-		else
-			return "";
 	}
 	
-	function addChannel($param)
+	/*function addChannel($param)
 	{
-		include('../header.inc.php');
-		$name = $GLOBALS['phpgw']->db->db_addslashes(htmlentities($param['name']));
-		$url = $GLOBALS['phpgw']->db->db_addslashes($param['url']);
-		$GLOBALS['phpgw']->db->query('INSERT INTO phpgw_userrss values('.$_SESSION['phpgw_session']['account_id'].',\''.$url.'\',\''.$name.'\');',__LINE__,__FILE__);
+
+		$name	= $GLOBALS['phpgw']->db->db_addslashes(htmlentities($param['name']));
+		$url	= $GLOBALS['phpgw']->db->db_addslashes($param['url']);
+		$query	= 'INSERT INTO phpgw_userrss values('.$_SESSION['phpgw_session']['account_id'].',\''.$url.'\',\''.$name.'\');';
+		
+		error_log( print_r( $query, true ), 3, "/tmp/log" );
+		
+		$GLOBALS['phpgw']->db->query( $query ,__LINE__,__FILE__ );
 		if ($GLOBALS['phpgw']->db->Error)
-			    return "Error";
+			return "Error";
 		else
-			    return "Success";
+			return "Success";
 
 	}
@@ -105,5 +97,4 @@
 	function removeChannel($param)
 	{
-		include('../header.inc.php');
 		$url = $GLOBALS['phpgw']->db->db_addslashes($param['url']);
 		$GLOBALS['phpgw']->db->query('DELETE FROM phpgw_userrss where rss_url = \''.$url.'\';',__LINE__,__FILE__);
@@ -112,5 +103,5 @@
 		else
 			    return "Success";
-	}
+	}*/
 
 }
Index: sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/inc/class.ldap_functions.inc.php
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/inc/class.ldap_functions.inc.php	(revision 4778)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/inc/class.ldap_functions.inc.php	(revision 4972)
@@ -129,5 +129,5 @@
 				$justthese = array("cn", "mail", "telephoneNumber", "mobile", "phpgwAccountVisible", "uid", "employeeNumber", "ou");
 				else
-				    $justthese = array("cn", "mail", "telephoneNumber", "mobile", "phpgwAccountVisible", "uid");
+				    $justthese = array("cn", "mail", "telephoneNumber", "phpgwAccountVisible", "uid");
 			}
 			else
@@ -137,5 +137,5 @@
 				$justthese = array("cn", "mail", "telephoneNumber", "mobile", "phpgwAccountVisible","jpegPhoto", "uid", "employeeNumber", "ou");
 				else
-				    $justthese = array("cn", "mail", "telephoneNumber", "mobile", "phpgwAccountVisible","jpegPhoto", "uid");
+				    $justthese = array("cn", "mail", "telephoneNumber", "phpgwAccountVisible","jpegPhoto", "uid");
 			}
 			$sr=@ldap_search($this->ds, $this->ldap_context, $filter, $justthese, 0, $this->max_result + 1);
@@ -191,5 +191,5 @@
 						$justthese = array("cn", "mail", "telephoneNumber", "mobile", "phpgwAccountVisible", "uid","employeeNumber", "ou");
 						else
-						    $justthese = array("cn", "mail", "telephoneNumber", "mobile", "phpgwAccountVisible", "uid");
+						    $justthese = array("cn", "mail", "telephoneNumber", "phpgwAccountVisible", "uid");
 						$sr=@ldap_search($this->ds, $this->ldap_context, $filter, $justthese, 0, $this->max_result+1);
 						if(!$sr)
@@ -834,5 +834,5 @@
 		    $justthese = array("cn","uid","telephoneNumber","jpegPhoto","mobile","ou","employeeNumber");
 		else
-		    $justthese = array("cn","uid","telephoneNumber","jpegPhoto","mobile");
+		    $justthese = array("cn","uid","telephoneNumber","jpegPhoto");
 
 		// Follow the referral
Index: sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/js/abas.js
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/js/abas.js	(revision 4202)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/js/abas.js	(revision 4972)
@@ -34,8 +34,36 @@
 	if (spanD)
 		spanD.style.display = (openTab.type[ID] == 0 ? '' : 'none');
-
+	
+	if( document.getElementById('divScrollMain_0') != null )
+	{
+		var _RSS = document.getElementById('divScrollMain_0');
+	}	
+	
 	var footer_menu = Element("footer_menu");	
 	if (footer_menu) {
-		footer_menu.style.display = (openTab.type[ID] != 4 ? '' : 'none');
+
+		var attrRSS = _RSS.getAttribute("rss");
+		
+		if( attrRSS == "rss" )
+		{
+			footer_menu.style.display = "none";	
+		}
+		else
+		{
+			footer_menu.style.display = (openTab.type[ID] != 4 ? '' : 'none');
+		}
+				
+		var options_search = Element('span_options');
+		if (options_search){
+			var spans_search = options_search.getElementsByTagName("span");
+			var span_search;
+			for (i = 0; i < spans_search.length; i++){
+				span_search = spans_search[i];
+				span_search.className == 'message_options_export'?span_search.style.display = (openTab.type[ID] != 1 ? '' : 'none'):'';
+				span_search.className == 'message_options_import'?span_search.style.display = (openTab.type[ID] == 0 ? '' : 'none'):'';
+				(span_search.title  == get_lang("Archive") || span_search.title == get_lang("Unarchive"))?span_search.style.display = (openTab.type[ID] == 0 ? '' : 'none'):'';
+			}
+		}
+
 	}
 
@@ -122,6 +150,9 @@
 }
 
-function create_border(borderTitle, id_value)
-{
+function create_border(borderTitle, id_value, border_type)
+{
+	if (borderTitle == get_lang("Server Results"))
+		id_value = "search_" + parseInt(BordersArray.length-1) + 1;
+
 	borderTitle = ( ( borderTitle && borderTitle.constructor == String && borderTitle.length > 0 ) ? borderTitle : '&nbsp;' );
 
@@ -195,4 +226,7 @@
 
 	Element("exmail_main_body").insertBefore(div,Element("footer_menu"));
+	
+	if(border_type)
+		openTab.type[ID] = border_type;
 	alternate_border(ID);
 	return ID;
@@ -318,5 +352,22 @@
 		}
 	if(j == 1)
-		Element("footer_menu").style.display = '';
+	{	
+		if( document.getElementById('divScrollMain_0') != null )
+		{
+			var _RSS = document.getElementById('divScrollMain_0');
+		}	
+		
+		var attrRSS = _RSS.getAttribute("rss");
+		
+		if( attrRSS == "rss" )
+		{
+			Element("footer_menu").style.display = 'none';			
+		}
+		else
+		{
+			Element("footer_menu").style.display = '';
+		}		
+	}
+	
 	BordersArray = new_BordersArray;
 
Index: sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/js/news_edit.js
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/js/news_edit.js	(revision 4778)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/js/news_edit.js	(revision 4972)
@@ -9,6 +9,6 @@
 cnews_edit.prototype.read_rss = function(val)
 {
-    Element("border_id_0").innerHTML    = get_lang('News')+'&nbsp;&nbsp;<font face="Verdana" size="1" color="#505050">[ <span id="tot_m"></span> ]</font>';
-    
+    document.getElementById("border_id_0").innerHTML    = get_lang('News')+'&nbsp;&nbsp;<font face="Verdana" size="1" color="#505050">[ <span id="tot_m"></span> ]</font>';
+
     current_folder = "NEWS/"+val;
     openTab.imapBox[0] = "NEWS/"+val;
@@ -23,10 +23,22 @@
         'lang_size'     : get_lang('size')
     };
-    
+
+    // Div
     var _div = document.getElementById("content_id_0");
         _div.innerHTML = this.xtools.parse( this.rssXml, 'stylesheet/news_read.xsl' , langs );
     
+    resizeWindow();    
+
+    var footerMenu = document.getElementById("footer_menu");
+
+    // footer Menu;
+    if( footerMenu )
+    {
+   		footerMenu.style.display = "none";
+    }
+	
     update_menu();
-    var box = Element("tbody_box");
+    
+    var box = document.getElementById("tbody_box");
     
     if(box.childNodes.length > 1)
@@ -41,5 +53,5 @@
     }
     
-    Element("tot_m").innerHTML = box.childNodes.length - 1 ;
+    document.getElementById("tot_m").innerHTML = box.childNodes.length - 1 ;
 }
 
@@ -55,11 +67,14 @@
     }
     
-    var title = this.rssXml.getElementsByTagName('item')[item_number-1].getElementsByTagName('title')[0].firstChild.nodeValue;
-    var pubDate = this.dateString(this.rssXml.getElementsByTagName('item')[item_number-1].getElementsByTagName('pubDate')[0].firstChild.nodeValue);
-    var link = this.rssXml.getElementsByTagName('item')[item_number-1].getElementsByTagName('link')[0].firstChild.nodeValue;
-    var owner = this.rssXml.getElementsByTagName('item')[item_number-1].getElementsByTagName('owner')[0];
-    if (currentTab.toString().indexOf('news_') != -1)
+    var title	= this.rssXml.getElementsByTagName('item')[item_number-1].getElementsByTagName('title')[0].firstChild.nodeValue;
+    var pubDate	= this.dateString(this.rssXml.getElementsByTagName('item')[item_number-1].getElementsByTagName('pubDate')[0].firstChild.nodeValue);
+    var link	= this.rssXml.getElementsByTagName('item')[item_number-1].getElementsByTagName('link')[0].firstChild.nodeValue;
+    var owner	= this.rssXml.getElementsByTagName('item')[item_number-1].getElementsByTagName('owner')[0];
+    
+    if ( currentTab.toString().indexOf('news_') != -1 )
         delete_border(currentTab);
-    var border_id = create_border(title, 'news_'+item_number);
+    
+    var border_id = create_border(title, 'news_'+item_number, "RSS" );
+    
     if(!border_id)
         return false;
@@ -68,19 +83,28 @@
 
     var toolbarCode = "<div style='background-color: #FFF; font-size: larger;'>"+
-                      "<table class='table_message' style='width:100%;'><tr><td>"+(owner != undefined?owner.firstChild.nodeValue:get_lang('nobody'))+", "+pubDate+"</td>"+
-                      '<td width="30%" align="left"></td>'+
-                      '<td nowrap="true" width="30%" align="right"><a target="_blank" href="'+link+'" style class="message_options">'+get_lang('Complete news')+'</a>';
-    if ( owner != undefined )
-        toolbarCode += '<span>&nbsp;|&nbsp;</span><span class="message_options">'+get_lang('forward')+'</span><span>&nbsp;|&nbsp;</span>'+
-        '<span class="message_options">Responder</span></td>';
-    toolbarCode += '<td nowrap="true" width="40px" align="right">'+
-    ( item_number == 1 ?  '<img style="cursor: default;" src="./templates/default/images/up.gray.button.png">' :
-        '<img onclick="news_edit.read_item('+(parseInt(item_number)-1)+')" style="cursor: default;" src="./templates/default/images/up.button.png">')+
-    '<span>&nbsp;</span>'+
+                      "<table class='table_message' style='width:100%;'><tr><td>"+pubDate+"</td>"+
+                      "<td width='30%' align='left'></td>"+
+                      "<td nowrap='true' width='30%' align='right'><a target='_blank' href='"+link+"' style class='message_options'>"+get_lang("Complete news")+"</a>";
+    
+    
+    toolbarCode +=  '<td nowrap="true" width="40px" align="right">'+
+    			    ( item_number == 1 ?  '<img style="cursor: default;" src="./templates/default/images/up.gray.button.png">' :
+    			 	'<img onclick="news_edit.read_item('+(parseInt(item_number)-1)+')" style="cursor: default;" src="./templates/default/images/up.button.png">')+
+    			 	'<span>&nbsp;</span>'+
     (this.rssXml.getElementsByTagName('item')[parseInt(item_number)] == undefined ? '<img style="cursor: default;" src="./templates/default/images/down.gray.button.png">' :
-        '<img onclick="news_edit.read_item('+(parseInt(item_number)+1)+')" style="cursor: pointer;" src="./templates/default/images/down.button.png">')+
+    '<img onclick="news_edit.read_item('+(parseInt(item_number)+1)+')" style="cursor: pointer;" src="./templates/default/images/down.button.png">')+
     "</td></tr></table><h2>"+title+"</h2><br>"+description+"</div>";
-    Element('content_id_'+border_id).innerHTML = toolbarCode;
+    
+    document.getElementById('content_id_'+border_id).innerHTML = toolbarCode;
+    
     resizeWindow();
+    
+    var footerMenu = document.getElementById("footer_menu");
+
+    // footer Menu;
+    if( footerMenu )
+    {
+   		footerMenu.style.display = "none";
+    }
 }
 
@@ -99,161 +123,94 @@
 }
 
-cnews_edit.prototype.makeWindow = function(options)
-{
-    _this = this;
-
-    var params = 
-    {
-        'lang_label1'       :   get_lang('Enter the URL of RSS service'),
-        'lang_label2'       :   get_lang('List of registered RSS'),
-        'lang_subscribe'    :   get_lang('Subscribe') 
-    };
-
-    var el = document.createElement("DIV");
-        el.style.visibility = "hidden";
-        el.style.position = "absolute";
-        el.style.left = "0px";
-        el.style.top = "0px";
-        el.style.width = "0px";
-        el.style.height = "0px";
-        el.id = 'dJSWin_newswin';
-        el.innerHTML = this.xtools.parse( this.xtools.xml('make_window'), 'stylesheet/makeWindow.xsl', params );
-
-    document.body.appendChild(el);
-    
-    var butt = Element('dJSWin_wfolders_bok');
-    
-    if ( !butt )
-    {
-        butt = document.createElement('INPUT');
-        butt.style.margin = "3px";
-        butt.id = 'dJSWin_wfolders_bok';
-        butt.type = 'button';
-        butt.value = get_lang('Close');
-        el.appendChild(butt);
-    }
-    
-    butt.onclick = function ()
-    {
-        news_edit.arrayWin[el.id].close();
-    }
-
-    _this.showWindow(el);
-}
-
-cnews_edit.prototype.showWindow = function (div)
-{
-    if(! this.arrayWin[div.id])
-    {
-        div.style.height = "280px";
-        div.style.width = "340px";
-        var title = "<label style='margin-left:5px;'>:: "+get_lang("News edit")+" ::</label> ";
-        var wHeight = div.offsetHeight + "px";
-        var wWidth =  div.offsetWidth   + "px";
-        div.style.width = div.offsetWidth - 5;
-
-        win = new dJSWin({
-            id: 'win_'+div.id,
-            content_id: div.id,
-            width: wWidth,
-            height: wHeight,
-            title_color: '#3978d6',
-            bg_color: '#eee',
-            title: title,
-            title_text_color: 'white',
-            button_x_img: '../phpgwapi/images/winclose.gif',
-            border: true
-        });
-        this.arrayWin[div.id] = win;
-        win.draw();
-    }
-    else
-    {
-        win = this.arrayWin[div.id];
-    }
-    
-    win.open();
-    
-    var handlerChannel = function( data )
-    {
-        var _listRss =  document.getElementById("listRSS");
-        
-        if( data != null )
-        {
-            for( var i = 0 ; i < data.length; i++)
-            {    
-                _listRss.innerHTML += "<div>" +
-                                        "<img onclick='news_edit.unsubscribe(\""+data[i].rss_url+"\",this);' style='width:16px; height:16px; cursor: pointer;' src='../phpgwapi/templates/default/images/foldertree_trash.png' />" +
-                                        "<label style='margin-right: 2px'>"+data[i].name+"</label>" +                
-                                       "</div>";
-            }
-        }
-    }
-    
-    cExecute('$this.rss.getChannels',handlerChannel);
-}
+cnews_edit.prototype.trim = function(inputString)
+{
+	if (typeof inputString != "string")
+		return inputString;
+	
+	var retValue = inputString;
+	var ch = retValue.substring(0, 1);
+	
+	while (ch == " ")
+	{
+		retValue = retValue.substring(1, retValue.length);
+		ch = retValue.substring(0, 1);
+	}
+		ch = retValue.substring(retValue.length-1, retValue.length);
+	
+	while ( ch == " ")
+	{
+		retValue = retValue.substring(0, retValue.length-1);
+		ch = retValue.substring(retValue.length-1, retValue.length);
+	}
+	
+	while (retValue.indexOf("  ") != -1) 
+	{
+		retValue = retValue.substring(0, retValue.indexOf("  ")) + retValue.substring(retValue.indexOf("  ")+1, retValue.length);
+	}
+	
+	return retValue;
+}
+
+
 cnews_edit.prototype.unsubscribe = function(url,el)
 {
-    var rem_handler = function (data)
-    {
-        if ( data != "Success" )
-        {    
-            if (data == "Error")
-                alert(get_lang("Database Error"));
-            else
-                alert(get_lang("Invalid entry"));
-        }
-        else
-        {
-           el.parentNode.parentNode.removeChild( el.parentNode );
-        }
-    };
-
-    cExecute('$this.rss.removeChannel&url='+escape(url),rem_handler);
-}
+	var _select = document.getElementById("list_rss");
+	
+	for( var i = 0 ; i < _select.options.length; i++ )
+	{
+		if( _select.options[i].selected == true )
+		{
+			_select.removeChild(_select.options[i]);
+			i--;
+		}
+	}
+}
+
 cnews_edit.prototype.subscribe = function()
 {
-    var newTableEl  = document.getElementById("listRSS");
-    var val         = trim( Element('rssEnter').value );
-    
-    if( val != "" )
-    {
-        this.rssXml = this.xtools.load('controller.php?action=$this.rss.getContent&url='+escape(val));
-
-        var params =
-        {
-            'linkURL' : val
-        };
-
-        var _div = document.createElement("div");
-            _div.innerHTML = this.xtools.parse( this.rssXml, 'stylesheet/news_add.xsl', params );
-
-        var add_handler = function (data)
-        {
-            if ( data != "Success" )
-            {
-                if ( data == "Error" )
-                    alert( get_lang("Database Error") );
-                else
-                    alert( get_lang("Invalid entry") );
-            }
-            else
-            {
-                newTableEl.appendChild(_div);
-            }
-        };
-
-        try
-        {
-            if( _div.childNodes[2].getAttribute("titleRss") )
-            {    
-                var name = _div.childNodes[2].getAttribute("titleRss");
-
-                cExecute('$this.rss.addChannel&url='+escape(val)+'&name='+name,add_handler);
-            }
-        }
-        catch(e){ }
-    }
-
+	var _select = document.getElementById("list_rss");
+	
+    var _rssUrl	= this.trim( document.getElementById('rssEnter').value );
+
+    if( _rssUrl != "" )
+    {
+    	var _lang = document.getElementById('lang_can_not_access_this_rss').value
+    	
+    	try
+    	{
+	        this.rssXml = this.xtools.load('expressoMail1_2/controller.php?action=$this.rss.getContent&url='+escape(_rssUrl));
+	        
+	        title = this.rssXml.getElementsByTagName("title");
+	
+	        if( title.length > 0 && this.trim(title[0].childNodes[0].nodeValue) != "" )
+	        {
+	        	var flag = false;
+	        	
+	        	for( var i = 0; i < _select.options.length; i++ )
+	        	{
+	        		if( this.trim( _select.options[i].value ) == this.trim( _rssUrl ) )
+	        		{
+	        			flag = true;
+	        		}
+	        	}
+	        	
+	        	if( !flag )
+	        	{
+	        		var _value = _rssUrl + "|" + title[0].childNodes[0].nodeValue;
+	        		_select.options[_select.length] = new Option( title[0].childNodes[0].nodeValue, _value , false, true );
+	        	}
+	        	
+	        	document.getElementById('rssEnter').value = "";
+	        }
+	        else
+	        {
+	        	alert( _lang + "!!" );
+	        }
+    	}
+    	catch(e)
+    	{
+    		alert( _lang + "!!" );
+    	}
+    }
 };
 
Index: sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/js/search.js
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/js/search.js	(revision 4644)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/js/search.js	(revision 4972)
@@ -375,9 +375,9 @@
 		numBox++;
 
-		if( Data['data'] )
-			var border_id = create_border(get_lang("Server Results"), "search_" + numBox);
+ 		if( Data['data'] )
+			var border_id = create_border(get_lang("Server Results"), "search_" + numBox,1);
 		
 		if( Data['data_gears'])
-			var border_id = create_border(get_lang("Local Results"), "search_local_msg" + numBox);
+			var border_id = create_border(get_lang("Local Results"), "search_local_msg" + numBox,1);
 			
 		if (!border_id)
@@ -387,5 +387,5 @@
         openTab.content_id[currentTab] = Element('content_id_search_' + numBox);
         openTab.type[currentTab] = 1;
-        
+                                   
 		var table = document.createElement("TABLE");
 			table.id    = "table_resultsearch_" + numBox;
Index: sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/js/messages_controller.js
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/js/messages_controller.js	(revision 4971)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/js/messages_controller.js	(revision 4972)
@@ -74,7 +74,11 @@
 		if (folder == 'null')
 			folder = get_current_folder();
-		if (msgs_number == 'selected')
-			msgs_number = get_selected_messages();
-			
+		if (msgs_number == 'selected'){
+			if (openTab.type[currentTab] > 1){
+				msgs_number = currentTab.substring(0,currentTab.length-2,currentTab);
+		    }else{
+				msgs_number = get_selected_messages();
+		    }
+		}	
 		if (!this.is_local_folder(folder)) 
 			delete_msgs(folder, msgs_number, border_ID);
Index: sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/js/draw_api.js
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/js/draw_api.js	(revision 4968)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/js/draw_api.js	(revision 4972)
@@ -165,6 +165,7 @@
 	}
 	else{
-                if (!expresso_offline) {
-			tree_folders = new dFTree({name: 'tree_folders'});
+		if (!expresso_offline)
+		{
+                    tree_folders = new dFTree({name: 'tree_folders'});
 
                     var n_root = new dNode({id:'root', caption: get_lang("My Folders")});
@@ -233,51 +234,56 @@
                 }                
 
-                var handlerChannel = function(data)
+       var handlerChannel = function(data)
+       {
+    	   
+                if ( data == null || typeof(data) == 'string')
+                {    
+                	return false;
+                }
+
+                var nodeParent  = document.getElementById('content_folders');
+                var treeRss     = new dFTree({name: 'treeRss'});
+                var root_rss    = new dNode({id:'news_root', caption: get_lang("News")});
+                    
+                treeRss.add(root_rss,'anything');
+
+                for( i=0; i < data.length; i++ )
                 {
-
-                	if ( data == null || typeof(data) == 'string')
-                    {    
-                		return false;
-                    }
-
-                    var nodeParent  = document.getElementById('content_folders');
-                    var treeRss     = new dFTree({name: 'treeRss'});
-                    var root_rss    = new dNode({id:'news_root', caption: get_lang("News")});
-                    
-                    treeRss.add(root_rss,'anything');
-
-                    for( i=0; i < data.length; i++ )
+                    var nodeNews = new dNode(
                     {
-                        var nodeNews = new dNode(
-                        {
                             id: "NEWS/"+data[i].name,
                             caption: data[i].name,
                             onClick: "open_rss('"+data[i].rss_url+"')",
                             plusSign: 0
-                        });
-                        treeRss.add(nodeNews,"news_root");
-                    }
+                     });
+                     treeRss.add(nodeNews,"news_root");
+                }
                     
-                    treeRss.draw( nodeParent );
+                treeRss.draw( nodeParent );
                     
-                    with ( document.getElementById('lnews_roottreeRss') )
-                    {
-                        style.backgroundImage   = "url(templates/"+template+"/images/menu/rss.png)";
-                        style.marginLeft        = "2px";
-                    }
-
-                    if( nodeParent.firstChild.id != ("dftree_" + treeRss.name ) )
-                    {
-                        var _folder     = Element(nodeParent.firstChild.id);
-                        var _rssNews    = Element("dftree_" + treeRss.name );
+                with ( document.getElementById('lnews_roottreeRss') )
+                {
+                     style.backgroundImage   = "url(templates/"+template+"/images/menu/rss.png)";
+                     style.marginLeft        = "2px";
+                }
+
+                if( nodeParent.firstChild.id != ("dftree_" + treeRss.name ) )
+                {
+                     var _folder     = Element(nodeParent.firstChild.id);
+                     var _rssNews    = Element("dftree_" + treeRss.name );
                         
-                        nodeParent.insertBefore( _rssNews, _folder );
-                    }
+                     nodeParent.insertBefore( _rssNews, _folder );
+                }
                     
-		}
-                
-       if( eval(enabledReadRSS ) == true ) 
-    	   cExecute('$this.rss.getChannels',handlerChannel);
-
+	   }
+       
+       if( eval(enabledReadRSS ) == true )
+       {	
+    	   setTimeout(function()
+    	   {
+    	     cExecute('$this.rss.getChannels',handlerChannel);
+    	   }, 2000);
+       }
+       
 		tree_folders.draw(Element('content_folders'));
 		if (!expresso_offline) {
Index: sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/js/doiMenuData.js
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/js/doiMenuData.js	(revision 4778)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/js/doiMenuData.js	(revision 4972)
@@ -10,24 +10,10 @@
 	if (!expresso_offline)
 	{
-		if( eval(enabledReadRSS ) == true ) 
-		{
-			var itens = new Array(	"preferences_mail()|" + get_lang("Preferences") + "|preferences.png",
-									"search_emails(\"\")|" + get_lang("Search") + "|search.png",
-									"filterbox()|" + get_lang("Edit filters") + "|filters.png",
-									"folderbox()|" + get_lang("Edit folders") + "|editfolders.png",
-									"sharebox()|" + get_lang("Share mailbox") + "|usersfolders.png",
-									"editrss()|" + get_lang("Edit my news") + "|rss.png",
-									"empty_trash_imap()|" + get_lang("Empty trash") + "|trash.png");
-		}
-		else
-		{
-			var itens = new Array(	"preferences_mail()|" + get_lang("Preferences") + "|preferences.png",
-					"search_emails(\"\")|" + get_lang("Search") + "|search.png",
-					"filterbox()|" + get_lang("Edit filters") + "|filters.png",
-					"folderbox()|" + get_lang("Edit folders") + "|editfolders.png",
-					"sharebox()|" + get_lang("Share mailbox") + "|usersfolders.png",
-					"empty_trash_imap()|" + get_lang("Empty trash") + "|trash.png");
-			
-		}
+		var itens = new Array(	"preferences_mail()|" + get_lang("Preferences") + "|preferences.png",
+				"search_emails(\"\")|" + get_lang("Search") + "|search.png",
+				"filterbox()|" + get_lang("Edit filters") + "|filters.png",
+				"folderbox()|" + get_lang("Edit folders") + "|editfolders.png",
+				"sharebox()|" + get_lang("Share mailbox") + "|usersfolders.png",
+				"empty_trash_imap()|" + get_lang("Empty trash") + "|trash.png");
 		
 		if(window.google && google.gears && preferences.use_local_messages==1)
