Index: trunk/expressoMail1_2/inc/class.db_functions.inc.php
===================================================================
--- trunk/expressoMail1_2/inc/class.db_functions.inc.php	(revision 6532)
+++ trunk/expressoMail1_2/inc/class.db_functions.inc.php	(revision 7655)
@@ -183,5 +183,5 @@
 		$array_addrs_final = array();				
 
-		for($i = 0; $i < count($array_addrs); $i++){
+		for($i = 0; $i < count($array_addrs); ++$i){
 			$j = count($array_addrs_final);
 
@@ -210,5 +210,5 @@
 								$array_addrs_final[$j] = $contact['connection_value'];
 
-							$j++;
+							++$j;
 						}
 					}else{
Index: trunk/expressoMail1_2/inc/class.imap_functions.inc.php
===================================================================
--- trunk/expressoMail1_2/inc/class.imap_functions.inc.php	(revision 7622)
+++ trunk/expressoMail1_2/inc/class.imap_functions.inc.php	(revision 7655)
@@ -46,6 +46,6 @@
 	function imap_functions (){
 		$this->init();
-	} 
-        
+	}
+
 	function init(){
 		$this->foldersLimit    = $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['imap_max_folders'] ?  $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['imap_max_folders'] : 20000; //Limit of folders (mailboxes) user can see
@@ -231,5 +231,5 @@
                                             
                                     $return[$i] = $this->get_info_head_msg( $msg_number , $sample );					
-                                    $i++;
+                                    ++$i;
                             }
 							
@@ -245,10 +245,10 @@
 								array('filter' => $filter, 'criteria' => array('deepness' => '2'))
 							);
-							for($i=0; $i<count($sort_array_msg); $i++){
+							for($i=0; $i<count($sort_array_msg); ++$i){
 								if(!isset($return[$i]['msg_number']))
 									continue;
 									
 								$numFlags = count($followupflagged);
-								for($ii=0; $ii<$numFlags; $ii++){
+								for($ii=0; $ii<$numFlags; ++$ii){
 									if($return[$i]['msg_number'] == $followupflagged[$ii]['messageNumber']){
 										$followupflag = Controller::read( array( 'concept' => 'followupflag', 'id' => $followupflagged[$ii]['followupflagId'] ));
@@ -259,5 +259,5 @@
 								}
 								$numLabels = count($labeleds);
-								for($ii=0; $ii<$numLabels; $ii++){
+								for($ii=0; $ii<$numLabels; ++$ii){
 									if($return[$i]['msg_number'] == $labeleds[$ii]['messageNumber']){
 										$labels = Controller::read( array( 'concept' => 'label', 'id' =>  $labeleds[$ii]['labelId'])); 
@@ -290,5 +290,5 @@
                                 if($i <= ($msg_range_end-$msg_range_begin))
                                     $return[$i] = $temp;
-                                $i++;
+                                ++$i;
                             }
                         }
@@ -518,5 +518,5 @@
 			$elements = imap_mime_header_decode($string);
 
-  			for($i = 0;$i < count($elements);$i++)
+  			for($i = 0;$i < count($elements);++$i)
   			{
    				$charset = strtolower($elements[$i]->charset);
@@ -743,5 +743,5 @@
 			if(!in_array($each_id,$messages_not_to_copy)) {
 				array_push($ids,$each_id);
-				$cont++;
+				++$cont;
 			}
 			if($cont>=100)
@@ -786,5 +786,5 @@
 			$array_names_keys = array_keys($sorted_msgs);
 			
-			for($i = 0; $i < count($sorted_msgs); $i++){
+			for($i = 0; $i < count($sorted_msgs); ++$i){
 			
 				$new_params = array();
@@ -1132,5 +1132,5 @@
 			$return['next_message'] = null;
 		}else{
-			for($i = 0; $i < count($msg_ids); $i++){
+			for($i = 0; $i < count($msg_ids); ++$i){
 				if($msg_ids[$i] == $msg_number){
 					$return['prev_message'] = $msg_ids[$i-1];
@@ -2256,5 +2256,5 @@
 					$return['new_msgs'] += 1;
 				}
-				$aux++;
+				++$aux;
 			}
 		}else if(count($msg_to_insert) > 0 && $msgs_in_the_server && $msgs_in_the_client[0] != "" && $return['new_msgs'] == 0){
@@ -2264,5 +2264,5 @@
 					$return['new_msgs'] += 1;
 				}
-				$aux++;
+				++$aux;
 			}
 		}else if($num_msgs < $msg_range_end && $return['new_msgs'] == 0 && count($msg_to_insert) > 0 && $msg_range_end == $dif){
@@ -2298,5 +2298,5 @@
 
                     $return[$i]['msg_folder'] = $folder;
-                    $i++;
+                    ++$i;
 		}
 		$return['quota'] = $this->get_quota(array('folder_id' => $folder));
@@ -2366,5 +2366,5 @@
 	{
 		$principals = array();
-		for($x = 0; $x < 5 ; $x++)
+		for($x = 0; $x < 5 ; ++$x)
 		{
 			switch ($x) {
@@ -2559,5 +2559,5 @@
 		}else{
 			$child = $base_path.$this->imap_delimiter;
-			for($i =0; $i < count($test); $i++){
+			for($i =0; $i < count($test); ++$i){
 				$child .= ($test[$i] ? $test[$i] : $this->functions->getLang("New Folder"));
 				$namebox =  mb_convert_encoding($child, "UTF7-IMAP", "UTF-8");
@@ -3118,5 +3118,5 @@
             foreach ($size_rule_by_group as $i => $value) {
                 if (is_array($value[0])) {
-                    $n_rule_groups++;
+                    ++$n_rule_groups;
                     if ($value[0]['email_max_recipient'] > $maior_valor_regra_grupo)
                         $maior_valor_regra_grupo = $value[0]['email_max_recipient'];
@@ -3654,5 +3654,5 @@
 			return $returns;
 		}else{
-			for($i = 0; $i < count($array_names_keys); $i++){ 
+			for($i = 0; $i < count($array_names_keys); ++$i){
 				$param['folder'] = $array_names_keys[$i];
 				$param['msgs_to_set'] = $sorted_msgs[$array_names_keys[$i]];
@@ -4088,7 +4088,7 @@
 				$return[$j][$i]['attachment'] = $imap_attachment->get_attachment_headerinfo($mbox_stream, $msg_number);
 
-				$i++;
-			}
-			$j++;
+				++$i;
+			}
+			++$j;
 			if($mbox_stream)
 				imap_close($mbox_stream);
@@ -4142,5 +4142,5 @@
 						$temp['msg_folder'] = $folder['folder_id'];
 						$return["msgs"][$num_msgs] = $temp;
-						$num_msgs++;
+						++$num_msgs;
 					}
 
@@ -4564,5 +4564,5 @@
 				//$array_parts_attachments['names'] .= $array_parts_attachments[$i]['name'] . ', ';
 				$array_parts_attachments[$i]['fsize'] = $msg->fsize[$msgno][$index];
-				$i++;
+				++$i;
 			}
 		}
@@ -5067,5 +5067,5 @@
 				$return['msgs'][$i]['boxname'] = $folder;
 				$return['msgs'][$i]['uid'] = $v;
-				$i++;
+				++$i;
 			} 	
 		}
@@ -5104,5 +5104,5 @@
 		foreach ($return['msgs'] as $v)
 		{		
-			$k++;
+			++$k;
 			if($k < $ini || $k >= $end ) continue;			
 			$nMsgs[] = $v;
@@ -5289,5 +5289,5 @@
 //			foreach ($rrr as $v)
 //			{		
-//				$k++;
+//				++$k;
 //				if( $k < $ini || $k >= $end ) continue;			
 //				$r[] = $v;
@@ -5562,5 +5562,5 @@
         $arr_msg = explode(",", $msg_n);
        
-        for($i=0; $i<count($arr_msg); $i++){
+        for($i=0; $i<count($arr_msg); ++$i){
                         
             if(!$this->mbox || !is_resource($this->mbox))
Index: trunk/expressoMail1_2/inc/class.exporteml.inc.php
===================================================================
--- trunk/expressoMail1_2/inc/class.exporteml.inc.php	(revision 7414)
+++ trunk/expressoMail1_2/inc/class.exporteml.inc.php	(revision 7655)
@@ -123,5 +123,5 @@
                     if (is_array($files))
                     {
-                        for ($i=0; $i < count($files); $i++)
+                        for ($i=0; $i < count($files); ++$i)
                         {
                             $files[$i] = escapeshellarg($files[$i]);
@@ -315,5 +315,5 @@
 			
 			//cria um .zip com as mensagens selecionadas
-			for($i = 0; $i < count($msg_number); $i++) 
+			for($i = 0; $i < count($msg_number); ++$i)
 			{
 				$header         = $this-> getHeader($msg_number[$i]);                                                                                   
@@ -354,5 +354,5 @@
 			$array_names_keys = array_keys($sorted_msgs);
 			
-			for($i = 0; $i < count($array_names_keys); $i++){ 
+			for($i = 0; $i < count($array_names_keys); ++$i){
 				$this->folder = mb_convert_encoding($array_names_keys[$i], "UTF7-IMAP","UTF-8, ISO-8859-1, UTF7-IMAP");
 				$msg_number = explode(',', $sorted_msgs[$array_names_keys[$i]]);
@@ -360,5 +360,5 @@
 				$this->connectImap();
 				
-				for($j = 0; $j < count($msg_number); $j++) 
+				for($j = 0; $j < count($msg_number); ++$j)
 				{
 					$header         = $this-> getHeader($msg_number[$j]);                                                                                   
@@ -474,5 +474,5 @@
 			}
 
-			for($i = 0; $i < count($array_ids); $i++) 
+			for($i = 0; $i < count($array_ids); ++$i)
 			{
 				$header         = $this-> getHeader($array_ids[$i]);                                                                                   
@@ -797,5 +797,5 @@
 		$fileNames = Array();
 			
-		for ($i = 0; $i < count($attachments); $i++)
+		for ($i = 0; $i < count($attachments); ++$i)
                 {
                    $attachments[$i]['name'] = $this->remove_accents($attachments[$i]['name']);
@@ -803,5 +803,5 @@
                 }
 
-                for ($i = 0; $i < count($attachments); $i++)
+                for ($i = 0; $i < count($attachments); ++$i)
                 {
                         $fileName = $attachments[$i]['name'];
@@ -811,5 +811,5 @@
                         if (count($result) > 1)
                         {
-                            for ($j = 1; $j < count($result); $j++)
+                            for ($j = 1; $j < count($result); ++$j)
                             {
                                 $replacement = '('.$j.')$0';
Index: trunk/expressoMail1_2/inc/class.ScriptS.inc.php
===================================================================
--- trunk/expressoMail1_2/inc/class.ScriptS.inc.php	(revision 6057)
+++ trunk/expressoMail1_2/inc/class.ScriptS.inc.php	(revision 7655)
@@ -297,5 +297,5 @@
                 error_log( print_r($rule, true), 3, "/tmp/log" );
 
-                $a++;
+                ++$a;
             }
 
Index: trunk/expressoMail1_2/inc/class.message_components.inc.php
===================================================================
--- trunk/expressoMail1_2/inc/class.message_components.inc.php	(revision 5509)
+++ trunk/expressoMail1_2/inc/class.message_components.inc.php	(revision 7655)
@@ -104,8 +104,8 @@
                 {
                     $parts = $sub_part;
-                    $n++;
-                }
-
-                for($p = 0, $i = 1; $p < count($parts); $n++, $p++, $i++)
+                    ++$n;
+                }
+
+                for($p = 0, $i = 1; $p < count($parts); ++$n, ++$p, ++$i)
                 {
                     // Skip the following...
@@ -255,5 +255,5 @@
 							break;
 						}
-						$n++;
+						++$n;
 					}
 				}
@@ -268,5 +268,5 @@
                         	if($this->charset[$mid][$n] == '')
                             	$this->charset[$mid][$n] = $param->value;
-							$n++;
+							++$n;
                         }
 					}
Index: trunk/expressoMail1_2/inc/class.imap_attachment.inc.php
===================================================================
--- trunk/expressoMail1_2/inc/class.imap_attachment.inc.php	(revision 6037)
+++ trunk/expressoMail1_2/inc/class.imap_attachment.inc.php	(revision 7655)
@@ -21,5 +21,5 @@
 		if($contentParts > 1)
 		{
-	 		for($i=1; $i<$contentParts; $i++)
+	 		for($i=1; $i<$contentParts; ++$i)
 			{
 				$msg_info['attachment'][$i]['part_in_msg']	= ($i+1);
@@ -79,5 +79,5 @@
 				//$array_parts_attachments['names'] .= $array_parts_attachments[$i]['name'] . ', ';
 				$array_parts_attachments[$i]['fsize'] = $msg->fsize[$msgno][$index];
-				$i++;
+				++$i;
 			}
 		}
Index: trunk/expressoMail1_2/inc/gd_functions.php
===================================================================
--- trunk/expressoMail1_2/inc/gd_functions.php	(revision 5509)
+++ trunk/expressoMail1_2/inc/gd_functions.php	(revision 7655)
@@ -53,5 +53,5 @@
   $img=imagecreate($Width,$Height);
   $Colors=pow(2,$biBitCount);
-  for($p=0;$p<$Colors;$p++)
+  for($p=0;$p<$Colors;++$p)
    {
     $B=freadbyte($f);
@@ -72,5 +72,5 @@
     {
      $CurrentBit=0;
-     for($x=0;$x<$Width;$x++)
+     for($x=0;$x<$Width;++$x)
       {
          $C=freadbits($f,$biBitCount);
@@ -78,5 +78,5 @@
       };
     if($CurrentBit!=0) {freadbyte($f);};
-    for($g=0;$g<$Zbytek;$g++)
+    for($g=0;$g<$Zbytek;++$g)
      freadbyte($f);
      };
@@ -112,10 +112,10 @@
    $Data.=fread($f,$pocet);
    $pocetb+=$pocet;
-   if($pocetb%2==1) {freadbyte($f); $pocetb++;};
+   if($pocetb%2==1) {freadbyte($f); ++$pocetb;};
   };
  if($prefix>0)
   {
    $pocet=$prefix;
-   for($r=0;$r<$pocet;$r++)
+   for($r=0;$r<$pocet;++$r)
     $Data.=chr($suffix);
   };
@@ -126,5 +126,5 @@
 };
 
-for($x=0;$x<strlen($Data);$x++)
+for($x=0;$x<strlen($Data);++$x)
  {
   imagesetpixel($img,$x,$y,$Palette[ord($Data[$x])]);
@@ -165,9 +165,9 @@
 
    $CurrentBit=0;
-   for($h=0;$h<$pocet;$h++)
+   for($h=0;$h<$pocet;++$h)
     $Data.=chr(freadbits($f,4));
    if($CurrentBit!=0) freadbits($f,4);
    $pocetb+=ceil(($pocet/2));
-   if($pocetb%2==1) {freadbyte($f); $pocetb++;};
+   if($pocetb%2==1) {freadbyte($f); ++$pocetb;};
   };
  if($prefix>0)
@@ -175,5 +175,5 @@
    $pocet=$prefix;
    $i=0;
-   for($r=0;$r<$pocet;$r++)
+   for($r=0;$r<$pocet;++$r)
     {
     if($i%2==0)
@@ -185,5 +185,5 @@
       $Data.=chr(floor($suffix/16));
      };
-    $i++;
+    ++$i;
     };
   };
@@ -194,5 +194,5 @@
 };
 
-for($x=0;$x<strlen($Data);$x++)
+for($x=0;$x<strlen($Data);++$x)
  {
   imagesetpixel($img,$x,$y,$Palette[ord($Data[$x])]);
@@ -212,5 +212,5 @@
    for($y=$Height-1;$y>=0;$y--)
     {
-     for($x=0;$x<$Width;$x++)
+     for($x=0;$x<$Width;++$x)
       {
        $B=freadbyte($f);
@@ -221,5 +221,5 @@
        imagesetpixel($img,$x,$y,$color);
       }
-    for($z=0;$z<$Zbytek;$z++)
+    for($z=0;$z<$Zbytek;++$z)
      freadbyte($f);
    };
@@ -336,5 +336,5 @@
 $bin=decbin($d);
 $sbin=strlen($bin);
-for($j=0;$j<$n-$sbin;$j++)
+for($j=0;$j<$n-$sbin;++$j)
  $bin="0$bin";
 return $bin;
Index: trunk/expressoMail1_2/inc/class.ldap_functions.inc.php
===================================================================
--- trunk/expressoMail1_2/inc/class.ldap_functions.inc.php	(revision 7225)
+++ trunk/expressoMail1_2/inc/class.ldap_functions.inc.php	(revision 7655)
@@ -164,5 +164,5 @@
 		{
 			$catalogsNum=count($this->external_srcs);
-				for ($i=0; $i<=$catalogsNum; $i++)	{
+				for ($i=0; $i<=$catalogsNum; ++$i)	{
 					if ($this->external_srcs[$i]["quicksearch"]) { 
 						$this->ldapConnect(true,$i);
@@ -177,5 +177,5 @@
 						$count_entries = ldap_count_entries($this->ds,$sr);
 						$search = ldap_get_entries($this->ds, $sr);
-						for ($j=0; $j<$search["count"]; $j++) {
+						for ($j=0; $j<$search["count"]; ++$j) {
 							$info[] = $search[$j];
 						}
@@ -188,5 +188,5 @@
 		$tmp_users_from_user_org = array();
 
-		for ($i=0; $i<$info["count"]; $i++)
+		for ($i=0; $i<$info["count"]; ++$i)
 		{
 			$key = $info[$i]["mail"][0] . '%' . $info[$i]["telephonenumber"][0] . '%'. $info[$i]["mobile"][0] . '%' . $info[$i]["uid"][0] . '%' . $info[$i]["jpegphoto"]['count'] . '%' . $info[$i]["employeenumber"][0] . '%' . 	$info[$i]["ou"][0];
@@ -216,5 +216,5 @@
 					$contacts_result[$i]["cn"] = $cn;
 					list ($contacts_result[$i]["mail"], $contacts_result[$i]["phone"], $contacts_result[$i]["mobile"], $contacts_result[$i]["uid"], $contacts_result[$i]["jpegphoto"], $contacts_result[$i]["employeenumber"], $contacts_result[$i]["ou"]) = preg_split('/%/', $info);
-					$i++;
+					++$i;
 				}
 				$contacts_result['quickSearch_only_in_userSector'] = $quickSearch_only_in_userSector;
@@ -232,5 +232,5 @@
 					$contacts_result[$i] = array();
 					$options_users_from_user_org .= $this->make_quicksearch_card($info, $cn);
-					$i++;
+					++$i;
 				}
 
@@ -240,5 +240,5 @@
 					$contacts_result[$i] = array();
 					$options .= $this->make_quicksearch_card($info, $cn);
-					$i++;
+					++$i;
 				}
 
@@ -470,5 +470,5 @@
 			//Busca em Catalagos externos
 			$catalogsNum=count($this->external_srcs);
-			for ($i=0; $i<=$catalogsNum; $i++)	{
+			for ($i=0; $i<=$catalogsNum; ++$i)	{
 				if ($this->external_srcs[$i]["quicksearch"]) 
 				{
@@ -481,5 +481,5 @@
 					$count_entries = ldap_count_entries($this->ds,$sr);
 					$search = ldap_get_entries($this->ds, $sr);
-					for ($j=0; $j<$search["count"]; $j++) {
+					for ($j=0; $j<$search["count"]; ++$j) {
 						$search[$j]['isExternal'] = true;
                         $info_return[] = $search[$j];
@@ -617,5 +617,5 @@
 			}
 
-			for ($i=0; $i<$info["count"]; $i++)
+			for ($i=0; $i<$info["count"]; ++$i)
 				$organizations[$i] = $info[$i]["ou"][0];
 
@@ -644,5 +644,5 @@
 			}
 			else{
-			    for ($i=0; $i<$info["count"]; $i++)
+			    for ($i=0; $i<$info["count"]; ++$i)
 			    {
 				    $organizations[$i]['ou'] = $info[$i]["ou"][0];
@@ -732,5 +732,5 @@
 			$g_tmp = array();
 
-			for ($i=0; $i<$info["count"]; $i++){
+			for ($i=0; $i<$info["count"]; ++$i){
 				if((!$catalog==0)||(strtoupper($info[$i]["phpgwaccounttype"][0]) == 'U') && ($info[$i]["phpgwaccountvisible"][0] != '-1'))
 					//aqui eh feita a concatenacao do departamento ao cn;
@@ -751,5 +751,5 @@
 				$name = $tmp[0]; //pega o primeiro item (cn) do vetor resultante do explode acima;
 				$department = $tmp[1]; //pega o segundo item (ou) do vetor resultanto do explode acima;
-				$users[$i++] = array("name" => $name, "email" => $mail, "department" => $department);
+				$users[++$i] = array("name" => $name, "email" => $mail, "department" => $department);
 
 			}
@@ -760,5 +760,5 @@
 
 			foreach ($g_tmp as $mail => $cn){
-				$groups[$i++] = array("name" => $cn, "email" => $mail);
+				$groups[++$i] = array("name" => $cn, "email" => $mail);
 			}
 			unset($g_tmp);
@@ -782,5 +782,5 @@
 			ldap_close($this->ds);
 
-			for ($i=0; $i<$ent["count"]; $i++){
+			for ($i=0; $i<$ent["count"]; ++$i){
 				$result['mail'][] = $ent[$i]["mail"][0];
 				$result['mailalter'][] = $ent[$i]["mailalternateaddress"][0];
@@ -808,5 +808,5 @@
                 $sr=ldap_list($this->ds, $user_context, ("(&(cn=*)(phpgwaccounttype=g)(!(phpgwaccountvisible=-1)))"),$justthese);
             $info = ldap_get_entries($this->ds, $sr);
-            for ($i=0; $i<$info["count"]; $i++)
+            for ($i=0; $i<$info["count"]; ++$i)
                 $groups[$uids=$info[$i]["gidnumber"][0]] = Array('name'    =>    $uids=$info[$i]["cn"][0], 'type'    =>    g);
             $justthese = array("phpgwaccountvisible","uidNumber","cn");
@@ -817,5 +817,5 @@
 
             $info = ldap_get_entries($this->ds, $sr);
-            for ($i=0; $i<$info["count"]; $i++)
+            for ($i=0; $i<$info["count"]; ++$i)
             {
                 if ($info[$i]["phpgwaccountvisible"][0] == '-1')
@@ -914,5 +914,5 @@
                             $filter .= "(uid=$uid)";                                                    
                             $acl_save_sent_in_shared[ $i ] =$uid;
-                            $i++;
+                            ++$i;
                                                                        
                         }                                                       
@@ -929,5 +929,5 @@
 				$info 	= 	ldap_get_entries($this->ds, $sr);
 				$var = print_r($acl_save_sent_in_shared, true);				
-				for ($i = 0;$i < $info["count"]; $i++){
+				for ($i = 0;$i < $info["count"]; ++$i){
 					$info[$i]['cn'][0] = utf8_decode($info[$i]['cn'][0]);
 					//verify if user has permission to save sent messages in a shared folder
@@ -952,5 +952,5 @@
 				ldap_sort($this->ds,$sr,"cn");
 				$result = ldap_get_entries($this->ds, $sr);
-				for ($j = 0;$j < $result["count"]; $j++){
+				for ($j = 0;$j < $result["count"]; ++$j){
 					$result[$j]['cn'][0] = utf8_decode($result[$j]['cn'][0]);
 					$result[$j]['mail'][0] = $result[$j]['mail'][0];
@@ -1048,5 +1048,5 @@
 
 
-                for ($i=0; $i<$entries['count']; $i++)
+                for ($i=0; $i<$entries['count']; ++$i)
                 {
                         $result[ $entries[$i]['gidnumber'][0] ] = $entries[$i]['cn'][0];
Index: trunk/expressoMail1_2/inc/class.functions.inc.php
===================================================================
--- trunk/expressoMail1_2/inc/class.functions.inc.php	(revision 7500)
+++ trunk/expressoMail1_2/inc/class.functions.inc.php	(revision 7655)
@@ -127,5 +127,5 @@
 				// End Bug fixed.
 			}														
-			for($i = 0; $i < count($files); $i++) {				
+			for($i = 0; $i < count($files); ++$i) {
 				if(count(explode('.js',$files[$i])) > 1) {
 					if($includeFiles  && array_search(trim($files[$i]),$includeFiles)){	
Index: trunk/expressoMail1_2/inc/class.phpmailer.php
===================================================================
--- trunk/expressoMail1_2/inc/class.phpmailer.php	(revision 5509)
+++ trunk/expressoMail1_2/inc/class.phpmailer.php	(revision 7655)
@@ -472,5 +472,5 @@
     function MailSend($header, $body) {
         $to = "";
-        for($i = 0; $i < count($this->to); $i++)
+        for($i = 0; $i < count($this->to); ++$i)
         {
             if($i != 0) { $to .= ", "; }
@@ -533,15 +533,15 @@
 
         // Attempt to send attach all recipients
-        for($i = 0; $i < count($this->to); $i++)
+        for($i = 0; $i < count($this->to); ++$i)
         {
 		if(!$this->smtp->Recipient($this->to[$i][0]))
 			$bad_rcpt[] = $this->to[$i][0];
         }
-        for($i = 0; $i < count($this->cc); $i++)
+        for($i = 0; $i < count($this->cc); ++$i)
         {
 		if(!$this->smtp->Recipient($this->cc[$i][0]))
 			$bad_rcpt[] = $this->cc[$i][0];
         }
-        for($i = 0; $i < count($this->bcc); $i++)
+        for($i = 0; $i < count($this->bcc); ++$i)
         {
                 if(!$this->smtp->Recipient($this->bcc[$i][0]))
@@ -564,5 +564,5 @@
             $array_error = explode(":", $this->smtp->error['smtp_msg']);
             
-            for($i = 0; $i < count($bad_rcpt); $i++)
+            for($i = 0; $i < count($bad_rcpt); ++$i)
             {
                 if($i != 0) { $error .= ", "; }
@@ -765,5 +765,5 @@
                 $connection = true;
             }
-            $index++;
+            ++$index;
         }
         if(!$connection)
@@ -826,5 +826,5 @@
         if(count($addr) > 1)
         {
-            for($i = 1; $i < count($addr); $i++)
+            for($i = 1; $i < count($addr); ++$i)
                 $addr_str .= ", " . $this->AddrFormat($addr[$i]);
         }
@@ -867,5 +867,5 @@
         $line = explode($this->LE, $message);
         $message = "";
-        for ($i=0 ;$i < count($line); $i++)
+        for ($i=0 ;$i < count($line); ++$i)
         {
           $line_part = explode(" ", $line[$i]);
@@ -1031,5 +1031,5 @@
 
         // Add custom headers
-        for($index = 0; $index < count($this->CustomHeader); $index++)
+        for($index = 0; $index < count($this->CustomHeader); ++$index)
         {
             $result .= $this->HeaderLine(trim($this->CustomHeader[$index][0]), 
@@ -1265,5 +1265,5 @@
 
         // Add all attachments
-        for($i = 0; $i < count($this->attachment); $i++)
+        for($i = 0; $i < count($this->attachment); ++$i)
         {
             // Check for string attachment
@@ -1540,5 +1540,5 @@
     function InlineImageExists() {
         $result = false;
-        for($i = 0; $i < count($this->attachment); $i++)
+        for($i = 0; $i < count($this->attachment); ++$i)
         {
             if($this->attachment[$i][6] == "inline")
Index: trunk/expressoMail1_2/inc/class.imapfp.inc.php
===================================================================
--- trunk/expressoMail1_2/inc/class.imapfp.inc.php	(revision 5773)
+++ trunk/expressoMail1_2/inc/class.imapfp.inc.php	(revision 7655)
@@ -150,5 +150,5 @@
 			while(1)
 			{
-				$i++;
+				++$i;
 				$response.="\r\n".$this->get_line();
 				if(substr($response,strpos($response,$this->tag),strlen($this->tag))==$this->tag)
Index: trunk/expressoMail1_2/inc/hook_settings.inc.php
===================================================================
--- trunk/expressoMail1_2/inc/hook_settings.inc.php	(revision 7420)
+++ trunk/expressoMail1_2/inc/hook_settings.inc.php	(revision 7655)
@@ -408,5 +408,5 @@
 			$level = count($folder_id);
 			$ident = '';
-			for($i = 2; $level > 2 && $i < $level;$i++)
+			for($i = 2; $level > 2 && $i < $level;++$i)
 				$ident .= ' - ';
 			
