Index: /trunk/jabberit_messenger/templates/celepar/module.tpl
===================================================================
--- /trunk/jabberit_messenger/templates/celepar/module.tpl	(revision 417)
+++ /trunk/jabberit_messenger/templates/celepar/module.tpl	(revision 423)
@@ -3,5 +3,8 @@
 <table align="center" width="60%" cellspacing="2" style="border: 1px solid #000000;">
 	<tr class="th">
-		<td colspan="2">&nbsp;<b>{lang_Settings_Use_Module_Expresso_Messenger}</b></td>
+		<td colspan="2">&nbsp;<b>{lang_Enable_the_Expresso_Messenger_module}</b></td>
+	</tr>
+	<tr class="row_on">
+		<td style="height:30px;">&nbsp;{lang_Select_the_modules_where_the_Expresso_Messenger_will_be_loaded}</td>
 	</tr>
 	<tr class="row_off">
@@ -10,5 +13,5 @@
 				<tr>
 					<td class="row_off">	
-						{lang_Applications_List} :
+						{lang_Modules_List} :
 						<br/>
 						<select id="apps_list" size="10" style="width: 300px" multiple>{apps_list}</select>
@@ -21,5 +24,5 @@
 					</td>
 					<td class="row_off">
-						{lang_Applications_habilitadas} :
+						{lang_Modules_Enabled} :
 						<br/>
 						<select id="apps_enabled" size="10" style="width: 300px" multiple name="apps_enabled[]">{apps_enabled}</select>
Index: /trunk/jabberit_messenger/setup/phpgw_pt-br.lang
===================================================================
--- /trunk/jabberit_messenger/setup/phpgw_pt-br.lang	(revision 417)
+++ /trunk/jabberit_messenger/setup/phpgw_pt-br.lang	(revision 423)
@@ -7,4 +7,5 @@
 allow	jabberit_messenger	pt-br	Adicionar
 Added information!	jabberit_messenger	pt-br	Informações Adicionadas!
+Applications List	jabberit_messenger	pt-br	Lista de Módulos
 Authorization	jabberit_messenger	pt-br	Autorização
 Ativar aviso de mensagem recebida	jabberit_messenger	pt-br	Ativar aviso de mensagem recebida
@@ -29,4 +30,6 @@
 Error in the message!	jabberit_messenger	pt-br	Erro na mensagem!
 Error saving your preferences!	jabberit_messenger	pt-br	Erro salvando suas preferências! 
+Enable the Expresso Messenger inside of the modules	common	pt-br	Habilitar o Expresso Messenger dentro dos módulos
+Enable the Expresso Messenger module	jabberit_messenger	pt-br	Habilitar o módulo Expresso Messenger 
 E-mail	jabberit_messenger	pt-br	E-mail
 Ficar ausente depois de	jabberit_messenger	pt-br	Ficar ausente depois de
@@ -48,4 +51,6 @@
 Minutes	jabberit_messenger	pt-br	Minutos
 My Settings	jabberit_messenger	pt-br	Minhas Configurações
+Modules Enabled	jabberit_messenger	pt-br	Módulos Habilitados
+Modules List	jabberit_messenger	pt-br	Lista de Módulos
 More than 50 results. Please, try to refine your search.	jabberit_messenger	pt-br	Mais que 50 resultados foram encontrados. Tente refinar sua pesquisa.
 Name	jabberit_messenger	pt-br	Nome
@@ -77,4 +82,5 @@
 says	jabberit_messenger	pt-br	diz
 Sector	jabberit_messenger	pt-br	Setor
+Select the modules where the Expresso Messenger will be loaded.	jabberit_messenger	pt-br	Selecione os módulos onde o Expresso Messenger será carregado.
 Search	jabberit_messenger	pt-br	Pesquisar
 Search, add, or invite	jabberit_messenger	pt-br	Procure, adicione ou convide
Index: /trunk/jabberit_messenger/inc/jabberit_acl.inc.php
===================================================================
--- /trunk/jabberit_messenger/inc/jabberit_acl.inc.php	(revision 417)
+++ /trunk/jabberit_messenger/inc/jabberit_acl.inc.php	(revision 423)
@@ -17,12 +17,14 @@
 	$apps = unserialize($GLOBALS['phpgw_info']['server']['apps_jabberit']);
 	$flag = false;
-	
-	foreach($apps as $tmp)
+
+	if( is_array($apps) )
 	{
-		$app_enabled = substr($tmp,0,strpos($tmp,";"));
- 
-		if( $GLOBALS['phpgw_info']['flags']['currentapp'] == $app_enabled )
-			$flag = true;
-	}	
+		foreach($apps as $tmp)
+		{
+			$app_enabled = substr($tmp,0,strpos($tmp,";"));
+			if( $GLOBALS['phpgw_info']['flags']['currentapp'] == $app_enabled )
+				$flag = true;
+		}	
+	}
 	
 	if ( $GLOBALS['phpgw_info']['user']['acl'][$i]['appname'] == 'jabberit_messenger' && ( $flag || $GLOBALS['phpgw_info']['flags']['currentapp'] == 'jabberit_messenger' ))
Index: /trunk/jabberit_messenger/inc/class.uimodule.inc.php
===================================================================
--- /trunk/jabberit_messenger/inc/class.uimodule.inc.php	(revision 417)
+++ /trunk/jabberit_messenger/inc/class.uimodule.inc.php	(revision 423)
@@ -54,15 +54,20 @@
 		{
 			$apps_list = unserialize($apps_list);
-			foreach($apps_list as $tmp)
-				$apps_en .= "<option value='".$tmp."'>".substr($tmp,strpos($tmp, ";")+1)."</option>";
+			if(is_array($apps_list))
+			{
+				foreach($apps_list as $tmp)
+					$apps_en .= "<option value='".$tmp."'>".substr($tmp,strpos($tmp, ";")+1)."</option>";
+			}
 		}
 
 		if( $apps_enabled = $this->bo->getApplicationsList() )
 		{
-			foreach($apps_enabled as $tmp )
-				$apps .= "<option value='".$tmp['name'].";".$tmp['title']."'>".$tmp['title']."</option>";
+			if(is_array($apps_enabled))
+			{
+				foreach($apps_enabled as $tmp )
+					$apps .= "<option value='".$tmp['name'].";".$tmp['title']."'>".$tmp['title']."</option>";
+			}
 		}
 
-		
 		$GLOBALS['phpgw']->template->set_file(array('jabberit_messenger'=>'module.tpl'));
 		$GLOBALS['phpgw']->template->set_block('jabberit_messenger','module');	
@@ -71,7 +76,8 @@
 										'apps_enabled' => $apps_en,
 										'apps_list' => $apps,
-										'lang_Settings_Use_Module_Expresso_Messenger' => 'Configurar o uso do módulo Expresso Messenger',
-										'lang_Applications_List' => 'Lista de Aplicativos',
-										'lang_Applications_habilitadas' => 'Aplicativos Habilitados',
+										'lang_Select_the_modules_where_the_Expresso_Messenger_will_be_loaded' => lang('Select the modules where the Expresso Messenger will be loaded.'),										
+										'lang_Enable_the_Expresso_Messenger_module' => lang('Enable the Expresso Messenger module'),
+										'lang_Modules_List' => lang('Modules List'),
+										'lang_Modules_Enabled' => lang('Modules Enabled'),
 										'lang_save' => lang('Save'),
 										'lang_cancel' => lang('Cancel')
@@ -97,4 +103,6 @@
 			if(is_array($_POST['apps_enabled']))
 				$this->bo->setApplications($_POST['apps_enabled']);
+			else
+				$this->bo->setApplications("");
 		}
 
Index: /trunk/jabberit_messenger/inc/hook_admin.inc.php
===================================================================
--- /trunk/jabberit_messenger/inc/hook_admin.inc.php	(revision 417)
+++ /trunk/jabberit_messenger/inc/hook_admin.inc.php	(revision 423)
@@ -15,5 +15,5 @@
 	$file = array(
 		'Site Configuration'	=> $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiconfig.index&appname=' . $appname),
-		'Configurar o Uso do Módulo' => $GLOBALS['phpgw']->link('/index.php','menuaction=jabberit_messenger.uimodule.edit_conf')
+		'Enable the Expresso Messenger inside of the modules' => $GLOBALS['phpgw']->link('/index.php','menuaction=jabberit_messenger.uimodule.edit_conf')
 	);
 	
