Index: trunk/expressoAdmin1_2/inc/class.db_functions.inc.php
===================================================================
--- trunk/expressoAdmin1_2/inc/class.db_functions.inc.php	(revision 586)
+++ trunk/expressoAdmin1_2/inc/class.db_functions.inc.php	(revision 597)
@@ -18,4 +18,5 @@
 		$this->db = new db();
 		$this->db->Halt_On_Error = 'no';
+		
 		$this->db->connect(
 				$_SESSION['phpgw_info']['expresso']['server']['db_name'], 
@@ -26,5 +27,5 @@
 				$_SESSION['phpgw_info']['expresso']['server']['db_type']
 		);		
-		$this->user_id = $_SESSION['phpgw_info']['expresso']['user']['account_id'];	
+		$this->user_id = $_SESSION['phpgw_info']['expresso']['user']['account_id'];
 	}
 
@@ -38,11 +39,8 @@
 		return $result;
 	}
-/*
+	/*
 	*	Reativa os usuários desabilitados por tempo inativo modificando o seu ultimo acesso para o dia atual.
 	*/
-	function reativar_usuario_inativo($uidNumber) {
-		
-	/*	$sql = "insert into phpgw_access_log (sessionid,loginid,ip,li,lo,account_id) values ('expirescontrol','teste','10.10.10.10','0','0','1') ";
-			$this->db->query($sql);*/
+	function reactivate_inactive_user($uidNumber) {
 		
 		$sql = "select * from phpgw_access_log where account_id=$uidNumber order by li desc limit 1";
@@ -51,6 +49,4 @@
 		$this->db->next_record();
 		$linha = $this->db->row();
-
-		
 		if(count($linha)>0) {
 			$sql = "insert into phpgw_access_log (sessionid,loginid,ip,li,lo,account_id) values ('expirescontrol','".$linha["loginid"]."','0.0.0.0','".time()."','0','".$linha["account_id"]."')";
@@ -59,7 +55,6 @@
 		}
 	}
-
-	
-	function inserir_usuario_log_controle_inativo($uid,$uidNumber) {
+	
+	function insert_log_inactive_user_control($uid,$uidNumber) {
 			$sql = "insert into phpgw_access_log (sessionid,loginid,ip,li,lo,account_id) values ('expirescontrol','".$uid."','0.0.0.0','".time()."','0','".$uidNumber."')";
 			
@@ -157,5 +152,5 @@
         }
 
-		//RetornO o maior dos ID's incrementado de 1
+		//Retorna o maior dos ID's incrementado de 1
 		if ($accounts_nextid >= $groups_nextid)
 			$id = $accounts_nextid;
@@ -656,5 +651,5 @@
 		$user = $params['user'];
 		$pass = $params['pass'];
-
+		
 		$con_string = "host=$host port=$port dbname=$name user=$user password=$pass";
 		if ($db = pg_connect($con_string))
Index: trunk/expressoAdmin1_2/inc/class.user.inc.php
===================================================================
--- trunk/expressoAdmin1_2/inc/class.user.inc.php	(revision 548)
+++ trunk/expressoAdmin1_2/inc/class.user.inc.php	(revision 597)
@@ -584,8 +584,6 @@
 				{
 					$this->db_functions->write_log("Reativado usuário bloqueado por inatividade",'',$dn,'','');
-					$this->db_functions->reativar_usuario_inativo($old_values['uidnumber']);
-				}
-
-
+					$this->db_functions->reactivate_inactive_user($old_values['uidnumber']);
+				}
 				////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 				// ACCOUNT VISIBLE
Index: trunk/expressoAdmin1_2/inc/class.uisectors.inc.php
===================================================================
--- trunk/expressoAdmin1_2/inc/class.uisectors.inc.php	(revision 548)
+++ trunk/expressoAdmin1_2/inc/class.uisectors.inc.php	(revision 597)
@@ -69,5 +69,5 @@
 				'back_url'				=> $GLOBALS['phpgw']->link('/expressoAdmin1_2/index.php'),
 				'context_display'		=> $context_display,
-				'lang_inatives'			=> lang('list inatives')
+				'lang_inactives'			=> lang('list inactives')
 			);
 			$p->set_var($var);
@@ -99,10 +99,9 @@
 						'sector_name'  => $sector,
 						'add_link' => $this->row_action('add','sector',$context)
-					);
-					
+					);					
 					if(isset($GLOBALS['phpgw_info']['server']['time_to_account_expires']))
-						$var['inatives_link'] = $this->row_action('list_inative','users',$context,'uiaccounts');
+						$var['inactives_link'] = $this->row_action('list_inactive','users',$context,'uiaccounts');
 					else
-						$var['inatives_link'] = lang('disabled');
+						$var['inactives_link'] = lang('disabled');
 
 					$p->set_var($var);
Index: trunk/expressoAdmin1_2/inc/class.functions.inc.php
===================================================================
--- trunk/expressoAdmin1_2/inc/class.functions.inc.php	(revision 548)
+++ trunk/expressoAdmin1_2/inc/class.functions.inc.php	(revision 597)
@@ -352,5 +352,5 @@
 		}
 		
-		function get_inative_users($contexts) {
+		function get_inactive_users($contexts) {
 			$retorno = array();
 			$tempUsers = array();
