Index: trunk/expressoAdmin1_2/inc/class.imap_functions.inc.php
===================================================================
--- trunk/expressoAdmin1_2/inc/class.imap_functions.inc.php	(revision 7551)
+++ trunk/expressoAdmin1_2/inc/class.imap_functions.inc.php	(revision 7552)
@@ -147,8 +147,5 @@
 			$result['msg'] .= $this->functions->lang('Server returns') . ': ' . imap_last_error();
 		}
-		ob_start();
-		print_r($result);
-		$output = ob_get_clean();
-		file_put_contents( "/tmp/angelo.log",  $output , FILE_APPEND);		
+		
 		return $result;
 	}
Index: trunk/prototype/config/PostgreSQL.srv
===================================================================
--- trunk/prototype/config/PostgreSQL.srv	(revision 7551)
+++ trunk/prototype/config/PostgreSQL.srv	(revision 7552)
@@ -7,5 +7,5 @@
 ;host = 127.0.0.1
 port = 5432
-dbname = expresso24angelo
+dbname = expresso
 user = postgres
 ; Caso o usuario tenha senha...
Index: trunk/prototype/request.php
===================================================================
--- trunk/prototype/request.php	(revision 7551)
+++ trunk/prototype/request.php	(revision 7552)
@@ -42,16 +42,10 @@
 }
 ////////////////////////////////////////////////////////////////////////////////////////
+
+
 echo json_encode( toUtf8(Controller::call( $id ? 'read' : 'find',
 				    Controller::URI( $concept, $id, $service ),
 				    $properties,
 				    $criteria )) );
-/*
-ob_start();
-print_r("\n"."-----------"."\n");
-print_r("conceito: ".$concept."\n");
-print_r("tempo: ".(mktime() - $time));
-print_r("\n"."-----------"."\n");
-$output = ob_get_clean();
-file_put_contents( "/tmp/angelo.log",  $output , FILE_APPEND);
-*/
+
 Controller::closeAll();
Index: trunk/calendar/inc/class.socalendar_sql.inc.php
===================================================================
--- trunk/calendar/inc/class.socalendar_sql.inc.php	(revision 7551)
+++ trunk/calendar/inc/class.socalendar_sql.inc.php	(revision 7552)
@@ -963,4 +963,6 @@
 				}else
 					$type = 'E';
+
+
 			$sql = 'UPDATE phpgw_cal SET '
 					. 'owner='.(int)$event['owner'].', '
Index: trunk/expressoMail1_2/inc/class.imap_functions.inc.php
===================================================================
--- trunk/expressoMail1_2/inc/class.imap_functions.inc.php	(revision 7551)
+++ trunk/expressoMail1_2/inc/class.imap_functions.inc.php	(revision 7552)
@@ -194,5 +194,4 @@
 	function get_range_msgs2($params)
 	{ 	
-		$tmp = mktime();
 		include_once dirname(__FILE__).'/../../prototype/api/controller.php';
             // Free others requests
@@ -218,5 +217,5 @@
                     $return['tot_unseen'] = ($search_box_type == 'SEEN') ? 0 : $msgs_info->unseen;
 
-                    $sort_array_msg = $this->get_msgs($folder, $sort_box_type, $search_box_type, $sort_box_reverse,$msg_range_begin,$msg_range_end,$tmp);
+                    $sort_array_msg = $this->get_msgs($folder, $sort_box_type, $search_box_type, $sort_box_reverse,$msg_range_begin,$msg_range_end);
 
                     $num_msgs = ($search_box_type=="UNSEEN") ? $msgs_info->unseen : (($search_box_type=="SEEN") ? ($msgs_info->messages - $msgs_info->unseen) : $msgs_info->messages);
@@ -268,10 +267,13 @@
 							}
                     }
-                    $return['num_msgs'] =  $num_msgs;       			
+                    $return['num_msgs'] =  $num_msgs;   
 		} else {
 			$num_msgs = imap_num_msg($this->mbox);
-			$sort_array_msg = $this-> get_msgs($folder, $sort_box_type, $search_box_type, $sort_box_reverse,$msg_range_begin,$num_msgs,$tmp);
+			$sort_array_msg = $this-> get_msgs($folder, $sort_box_type, $search_box_type, $sort_box_reverse,$msg_range_begin,$num_msgs);
+
+
 			$return['tot_unseen'] = 0;
 			$i = 0;
+
                         if(is_array($sort_array_msg)){
 
@@ -293,12 +295,6 @@
       			$return['num_msgs'] = count($sort_array_msg)+($msg_range_begin-1);
                 }
-				ob_start();
-				print_r("\n");
-				print_r("saindo da get_range_msgs2: "."\n");
-				print_r("tempo estimado: ".(mktime() - $tmp));
-				print_r("\n"."------------------------");
-				$output = ob_get_clean();
-				file_put_contents( "/tmp/angelo.log",  $output , FILE_APPEND);           	
-                return $return;                
+				          	
+                return $return; 
     }
 	
@@ -418,6 +414,7 @@
                 if( $return = $this->cache->get( 'infoHead://'.$this->username.'://'.$this->mboxFolder.'://'.$msg_number ))
                    $cached = true;   
-            }
-            $header = imap_headerinfo($this->mbox,imap_msgno($this->mbox,$msg_number)); //Resgata o objeto Header da mensagem , nescessario mesmo com o cache pois as flags podem ser atualizadas por outro cliente de email
+			}
+
+            $header = imap_headerinfo($this->mbox,imap_msgno( $this->mbox, $msg_number )); //Resgata o objeto Header da mensagem , nescessario mesmo com o cache pois as flags podem ser atualizadas por outro cliente de email
             $return['Recent'] = $header->Recent;
             $return['Unseen'] = $header->Unseen;
@@ -3285,5 +3282,4 @@
 	function messages_sort($sort_box_type,$sort_box_reverse, $search_box_type,$offsetBegin,$offsetEnd,$folder)
 	{
-		$tmp = mktime();
 		$sort = array();
 		if ($sort_box_type != "SORTFROM" && $search_box_type!= "FLAGGED"){
@@ -3295,5 +3291,5 @@
 				$slice_array = false;
 			else
-				$slice_array = true;		
+				$slice_array = true;
 		}
 		else
@@ -3358,10 +3354,4 @@
 		if ($slice_array)
 			$sort = array_slice($sort,$offsetBegin-1,$offsetEnd-($offsetBegin-1),true);
-		ob_start();
-		print_r("------------------------"."\n");
-		print_r("saindo da messages_sort: "."\n");
-		print_r("tempo estimado: ".(mktime() - $tmp));
-		$output = ob_get_clean();
-		file_put_contents( "/tmp/angelo.log",  $output , FILE_APPEND);		
 		return $sort;
 
@@ -3842,5 +3832,5 @@
 	}
 
-	function get_msgs($folder, $sort_box_type, $search_box_type, $sort_box_reverse,$offsetBegin = 0,$offsetEnd = 0,$tmp)
+	function get_msgs($folder, $sort_box_type, $search_box_type, $sort_box_reverse,$offsetBegin = 0,$offsetEnd = 0)
 	{
 		if(!$this->mbox || !is_resource($this->mbox))
@@ -3851,5 +3841,5 @@
 			$offsetBegin = 1;
 		}
-		return $this->messages_sort($sort_box_type,$sort_box_reverse, $search_box_type,$offsetBegin,$offsetEnd,$folder,$tmp);
+		return $this->messages_sort($sort_box_type,$sort_box_reverse, $search_box_type,$offsetBegin,$offsetEnd,$folder);
 	}
 
