Index: trunk/expressoAdmin1_2/inc/class.ldap_functions.inc.php
===================================================================
--- trunk/expressoAdmin1_2/inc/class.ldap_functions.inc.php	(revision 6917)
+++ trunk/expressoAdmin1_2/inc/class.ldap_functions.inc.php	(revision 7655)
@@ -690,5 +690,5 @@
 				$entries = ldap_get_entries($ldap_connection, $search);
 				
-				for ($i=0; $i<$entries['count']; $i++)
+				for ($i=0; $i<$entries['count']; ++$i)
 				{
 					$users .= $entries[$i]['cn'][0] . ' - ' . $entries[$i]['mail'][0] . "\n";
@@ -844,5 +844,5 @@
 						{
 							$result['question'] = $this->functions->lang('Field CPF used by') . ":\n";
-								for ($i=0; $i<$entries['count']; $i++)
+								for ($i=0; $i<$entries['count']; ++$i)
 									{
 										if (strcasecmp($uid, $entries[$i]['uid'][0]) != 0)
@@ -910,5 +910,5 @@
 					else
 						$login.=$i;
-					$i++;
+					++$i;
 				}
 			}
@@ -1260,5 +1260,5 @@
 			
 		$options = '';			
-		for ($i=0; $i<$entries['count']; $i++)
+		for ($i=0; $i<$entries['count']; ++$i)
 			{
 			$options .= "<option value=" . $entries[$i]['uid'][0] . ">" . $entries[$i]['uid'][0] . " (" . $entries[$i]['mail'][0] . ")" . "</option>";
@@ -1283,5 +1283,5 @@
     	    	
 		$options = '';
-		for ($i=0; $i<$entries['count']; $i++)
+		for ($i=0; $i<$entries['count']; ++$i)
 		{
                             $options .= "<option value=" . $entries[$i]['mail'][0] . ">" . $entries[$i]['mail'][0] . "</option>";
@@ -1308,5 +1308,5 @@
     	
 		$options = '';			
-		for ($i=0; $i<$entries['count']; $i++)
+		for ($i=0; $i<$entries['count']; ++$i)
 		{
                             $options .= "<option value=" . $entries[$i]['mail'][0] . ">" . $entries[$i]['mail'][0] . "</option>";
@@ -1541,5 +1541,5 @@
 		$entries = ldap_get_entries($this->ldap, $search);
 		$result['status'] = true;
-		for ($i=0; $i<$entries['count']; $i++)
+		for ($i=0; $i<$entries['count']; ++$i)
 		{
 			$attrs['mailforwardingaddress'] = $old_mail;
@@ -1571,5 +1571,5 @@
 				$entry[0]['dn'] = strtolower($entry[0]['dn']);
 				$sector_dn_array = explode(",", $entry[0]['dn']);
-				for($i=1; $i<count($sector_dn_array); $i++)
+				for($i=1; $i<count($sector_dn_array); ++$i)
 					$sector_dn .= $sector_dn_array[$i] . ',';
 				//Retira ultimo pipe.
@@ -1599,5 +1599,5 @@
 		
 				// Samba
-				for ($i=0; $i<$entry[0]['objectclass']['count']; $i++)
+				for ($i=0; $i<$entry[0]['objectclass']['count']; ++$i)
 				{
 					if ($entry[0]['objectclass'][$i] == 'sambaSamAccount')
@@ -1640,5 +1640,5 @@
     			ldap_sort($this->ldap, $search, "cn");
     			$entries = ldap_get_entries($this->ldap, $search);
-    			for ($i=0; $i<$entries['count']; $i++)
+    			for ($i=0; $i<$entries['count']; ++$i)
 	    		{
     				$result['groups_ldap'][ $entries[$i]['gidnumber'][0] ] = utf8_decode($entries[$i]['cn'][0]);
@@ -1698,5 +1698,5 @@
 				$entry[0]['dn'] = strtolower($entry[0]['dn']);
 				$sector_dn_array = explode(",", $entry[0]['dn']);
-				for($i=1; $i<count($sector_dn_array); $i++)
+				for($i=1; $i<count($sector_dn_array); ++$i)
 					$sector_dn .= $sector_dn_array[$i] . ',';
 				//Retira ultimo pipe.
@@ -1727,5 +1727,5 @@
 		
 				// Samba
-				for ($i=0; $i<$entry[0]['objectclass']['count']; $i++)
+				for ($i=0; $i<$entry[0]['objectclass']['count']; ++$i)
 				{
 					if ($entry[0]['objectclass'][$i] == 'sambaSamAccount')
@@ -1768,5 +1768,5 @@
     			ldap_sort($this->ldap, $search, "cn");
     			$entries = ldap_get_entries($this->ldap, $search);
-    			for ($i=0; $i<$entries['count']; $i++)
+    			for ($i=0; $i<$entries['count']; ++$i)
 	    		{
     				$result['groups_ldap'][ $entries[$i]['gidnumber'][0] ] = utf8_decode($entries[$i]['cn'][0]);
@@ -1796,5 +1796,5 @@
     		$entries = ldap_get_entries($ldapMasterConnect, $search);
     		
-	    	for ($i=0; $i<$entries['count']; $i++)
+	    	for ($i=0; $i<$entries['count']; ++$i)
     		{
 				$result[ $entries[$i]['uid'][0] ]['uid']		= $entries[$i]['uid'][0];
@@ -1831,5 +1831,5 @@
 				$entry[0]['dn'] = strtolower($entry[0]['dn']);
 				$sector_dn_array = explode(",", $entry[0]['dn']);
-				for($i=1; $i<count($sector_dn_array); $i++)
+				for($i=1; $i<count($sector_dn_array); ++$i)
 					$sector_dn .= $sector_dn_array[$i] . ',';
 				//Retira ultimo pipe.
@@ -1844,5 +1844,5 @@
 		
 				//MemberUid
-				for ($i=0; $i<$entry[0]['memberuid']['count']; $i++)
+				for ($i=0; $i<$entry[0]['memberuid']['count']; ++$i)
 				{
 					$justthese = array("cn","uid","uidnumber");
@@ -1850,8 +1850,8 @@
 					// Montagem dinamica do filtro
 					$filter="(&(|(phpgwAccountType=u)(phpgwAccountType=s))(|";
-					for ($k=0; (($k<10) && ($i<$entry[0]['memberuid']['count'])); $k++)
+					for ($k=0; (($k<10) && ($i<$entry[0]['memberuid']['count'])); ++$k)
 					{
 						$filter .= "(uid=".$entry[0]['memberuid'][$i].")";
-						$i++;
+                        ++$i;
 					}
 					$i--;
@@ -1861,5 +1861,5 @@
 					$user_entry = ldap_get_entries($this->ldap, $search);
 
-					for ($j=0; $j<$user_entry['count']; $j++)
+					for ($j=0; $j<$user_entry['count']; ++$j)
 					{
 						$result['memberuid_info'][$user_entry[$j]['uid'][0]]['cn'] = $user_entry[$j]['cn'][0];
@@ -1891,5 +1891,5 @@
 		
 				// Samba
-				for ($i=0; $i<$entry[0]['objectclass']['count']; $i++)
+				for ($i=0; $i<$entry[0]['objectclass']['count']; ++$i)
 				{
 					if ($entry[0]['objectclass'][$i] == 'sambaGroupMapping')
@@ -1929,5 +1929,5 @@
 				$entry[0]['dn'] = strtolower($entry[0]['dn']);
 				$sector_dn_array = explode(",", $entry[0]['dn']);
-				for($i=1; $i<count($sector_dn_array); $i++)
+				for($i=1; $i<count($sector_dn_array); ++$i)
 					$sector_dn .= $sector_dn_array[$i] . ',';
 				//Retira ultimo pipe.
@@ -1944,5 +1944,5 @@
 			
 				//Members
-				for ($i=0; $i<$entry[0]['mailforwardingaddress']['count']; $i++)
+				for ($i=0; $i<$entry[0]['mailforwardingaddress']['count']; ++$i)
 				{
 					$justthese = array("cn", "uidnumber", "uid", "phpgwaccounttype", "mail");
@@ -1950,8 +1950,8 @@
 					// Montagem dinamica do filtro, para nao ter muitas conexoes com o ldap
 					$filter="(&(|(phpgwAccountType=u)(phpgwAccountType=l))(|";
-					for ($k=0; (($k<10) && ($i<$entry[0]['mailforwardingaddress']['count'])); $k++)
+					for ($k=0; (($k<10) && ($i<$entry[0]['mailforwardingaddress']['count'])); ++$k)
 					{
 						$filter .= "(mail=".$entry[0]['mailforwardingaddress'][$i].")";
-						$i++;
+                        ++$i;
 					}
 					$i--;
@@ -1961,5 +1961,5 @@
 					$user_entry = ldap_get_entries($ldap_conn_following_ref, $search);
 									
-					for ($j=0; $j<$user_entry['count']; $j++)
+					for ($j=0; $j<$user_entry['count']; ++$j)
 					{
 						$result['mailForwardingAddress_info'][$user_entry[$j]['mail'][0]]['uid'] = $user_entry[$j]['uid'][0];
@@ -2001,5 +2001,5 @@
 				$entry[0]['dn'] = strtolower($entry[0]['dn']);
 				$sector_dn_array = explode(",", $entry[0]['dn']);
-				for($i=1; $i<count($sector_dn_array); $i++)
+				for($i=1; $i<count($sector_dn_array); ++$i)
 					$sector_dn .= $sector_dn_array[$i] . ',';
 				//Retira ultimo pipe.
@@ -2018,5 +2018,5 @@
 		
 				//Senders
-				for ($i=0; $i<$entry[0]['mailsenderaddress']['count']; $i++)
+				for ($i=0; $i<$entry[0]['mailsenderaddress']['count']; ++$i)
 				{
 					$justthese = array("cn", "uidnumber", "uid", "mail");
@@ -2081,5 +2081,5 @@
 				}
 
-				$i++;
+                ++$i;
 			}
 		}
@@ -2254,5 +2254,5 @@
 	    $entries = ldap_get_entries($this->ldap, $search);
 		
-		for ($i=0; $i<$entries['count']; $i++)
+		for ($i=0; $i<$entries['count']; ++$i)
 		{
 			if ( !@ldap_mod_del($this->ldap, $entries[$i]['dn'], $attrs) )
@@ -2325,5 +2325,5 @@
 		$entry = ldap_get_entries($this->ldap, $search);
 		$attrs['mailForwardingAddress'] = $mail;
-		for ($i=0; $i<=$entry['count']; $i++)
+		for ($i=0; $i<=$entry['count']; ++$i)
 	    {
 			$dn = $entry[$i]['dn'];
@@ -2410,5 +2410,5 @@
 
 		$parent = array();
-		for ($j=1; $j<(count($explode_dn)-1); $j++)
+		for ($j=1; $j<(count($explode_dn)-1); ++$j)
 			$parent[] = $explode_dn[$j];
 		$parent = implode(",", $parent);
@@ -2430,5 +2430,5 @@
     	$array_mod_del['memberUid'] = $uid;
 
-	    for ($i=0; $i<=$entry['count']; $i++)
+	    for ($i=0; $i<=$entry['count']; ++$i)
 	    {
 	    	$dn = $entry[$i]['dn'];
@@ -2453,5 +2453,5 @@
 
 		$parent = array();
-		for ($j=1; $j<(count($explode_dn)-1); $j++)
+		for ($j=1; $j<(count($explode_dn)-1); ++$j)
 			$parent[] = $explode_dn[$j];
 		$parent = implode(",", $parent);
@@ -2516,5 +2516,5 @@
 	    $entry = ldap_get_entries($this->ldap, $search);
 	    
-   	    for ($i=0; $i<$entry['count']; $i++)
+   	    for ($i=0; $i<$entry['count']; ++$i)
 	    {
 			$return['sambaDomains'][$i] = $entry[$i]['sambadomainname'][0];
@@ -2622,5 +2622,5 @@
     		$entries = ldap_get_entries($this->ldap, $institutional_accounts);
     	    	
-			for ($i=0; $i<$entries['count']; $i++)
+			for ($i=0; $i<$entries['count']; ++$i)
 			{
 				$tr = "<tr class='normal' onMouseOver=this.className='selected' onMouseOut=this.className='normal'><td onClick=edit_institutional_account('".$entries[$i]['uid'][0]."')>" . utf8_decode($entries[$i]['cn'][0]) . "</td><td onClick=edit_institutional_account('".$entries[$i]['uid'][0]."')>" . $entries[$i]['mail'][0] . "</td><td align='center' onClick=delete_institutional_accounts('".$entries[$i]['uid'][0]."')><img HEIGHT='16' WIDTH='16' src=./expressoAdmin1_2/templates/default/images/delete.png></td></tr>";
@@ -2681,5 +2681,5 @@
 			{
 				$a_cn = array();
-				for ($i=0; $i<$entrie[0]['mailforwardingaddress']['count']; $i++)
+				for ($i=0; $i<$entrie[0]['mailforwardingaddress']['count']; ++$i)
 				{
 					$tmp = $this->mailforwardingaddress2uidnumber($entrie[0]['mailforwardingaddress'][$i]);
@@ -2716,5 +2716,5 @@
     		$entries = ldap_get_entries($this->ldap, $institutional_accounts);
     	    	
-			for ($i=0; $i<$entries['count']; $i++)
+			for ($i=0; $i<$entries['count']; ++$i)
 			{
 				$tr = "<tr class='normal' onMouseOver=this.className='selected' onMouseOut=this.className='normal'><td onClick=edit_shared_account('".$entries[$i]['uid'][0]."')>" . utf8_decode($entries[$i]['cn'][0]) . "</td><td onClick=edit_shared_account('".$entries[$i]['uid'][0]."')>" . utf8_decode($entries[$i]['cn'][0]). " (" . $entries[$i]['uid'][0] . ")" . "</td><td onClick=edit_shared_account('".$entries[$i]['uid'][0]."')>" . $entries[$i]['mail'][0] . "<td align='center' onClick=delete_shared_accounts('".$entries[$i]['uid'][0]."','".$entries[$i]['mail'][0]."')><img HEIGHT='16' WIDTH='16' src=./expressoAdmin1_2/templates/default/images/delete.png></td></tr>";
@@ -2858,5 +2858,5 @@
 		$entries = ldap_get_entries($this->ldap, $search);
 		$result['status'] = true;
-		for ($i=0; $i<$entries['count']; $i++)
+		for ($i=0; $i<$entries['count']; ++$i)
 		{
 			$attrs['mailforwardingaddress'] = $oldMail;
