Index: /trunk/phpgwapi/setup/manageheader.php
===================================================================
--- /trunk/phpgwapi/setup/manageheader.php	(revision 5913)
+++ /trunk/phpgwapi/setup/manageheader.php	(revision 7655)
@@ -505,5 +505,5 @@
 				);
 
-				for($i=0; $i<30; $i++)
+				for($i=0; $i<30; ++$i)
 				{
 					$GLOBALS['phpgw_info']['server']['mcrypt_iv'] .= $random_char[rand(1,count($random_char))];
Index: /trunk/phpgwapi/inc/class.net_http_client.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.net_http_client.inc.php	(revision 6057)
+++ /trunk/phpgwapi/inc/class.net_http_client.inc.php	(revision 7655)
@@ -816,5 +816,5 @@
 
 					sleep(0.1);
-					$failureCount++;
+					++$failureCount;
 					//print "elapsed ".(time()-$ts)."<br>";
 				}
Index: /trunk/phpgwapi/inc/class.listbox.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.listbox.inc.php	(revision 2)
+++ /trunk/phpgwapi/inc/class.listbox.inc.php	(revision 7655)
@@ -72,5 +72,5 @@
 				$this->p->parse('row','portal_listbox_header',True);
 
-				for ($x = 0; $x < count($this->data); $x++)
+				for ($x = 0; $x < count($this->data); ++$x)
 				{
 					$var = Array(
Index: /trunk/phpgwapi/inc/class.resultbox.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.resultbox.inc.php	(revision 2)
+++ /trunk/phpgwapi/inc/class.resultbox.inc.php	(revision 7655)
@@ -54,5 +54,5 @@
 			echo '<table border="0" cellpadding="0" cellspacing="0" width="'.$this->getvar('innerwidth')
 				. '" bgcolor="' . $this->getvar('innerbgcolor') . '">';
-			for ($x = 0; $x < count($this->data); $x++)
+			for ($x = 0; $x < count($this->data); ++$x)
 			{
 				echo '<tr>';
Index: /trunk/phpgwapi/inc/class.date_time.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.date_time.inc.php	(revision 2)
+++ /trunk/phpgwapi/inc/class.date_time.inc.php	(revision 7655)
@@ -383,5 +383,5 @@
 			if($month > 2 && $this->is_leap_year($year))
 			{
-				$julian++;
+				++$julian;
 			}
 			return($julian);
Index: /trunk/phpgwapi/inc/class.setup_detection.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.setup_detection.inc.php	(revision 5781)
+++ /trunk/phpgwapi/inc/class.setup_detection.inc.php	(revision 7655)
@@ -427,5 +427,5 @@
 						else
 						{
-							$none++;
+							++$none;
 						}
 					}
Index: /trunk/phpgwapi/inc/class.xmlrpc_server_php.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.xmlrpc_server_php.inc.php	(revision 5912)
+++ /trunk/phpgwapi/inc/class.xmlrpc_server_php.inc.php	(revision 7655)
@@ -144,5 +144,5 @@
 		function verifySignature($in, $sig)
 		{
-			for($i=0; $i<sizeof($sig); $i++)
+			for($i=0; $i<sizeof($sig); ++$i)
 			{
 				// check each possible signature in turn
@@ -151,5 +151,5 @@
 				{
 					$itsOK = 1;
-					for($n=0; $n<$in->getNumParams(); $n++)
+					for($n=0; $n<$in->getNumParams(); ++$n)
 					{
 						$p = $in->getParam($n);
@@ -301,5 +301,5 @@
 				// now add parameters in
 				$plist = '';
-				for($i=0; $i<sizeof($GLOBALS['_xh'][$parser]['params']); $i++)
+				for($i=0; $i<sizeof($GLOBALS['_xh'][$parser]['params']); ++$i)
 				{
 					//print "<!-- " . $GLOBALS['_xh'][$parser]['params'][$i]. "-->\n";
Index: /trunk/phpgwapi/inc/class.jscalendar.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.jscalendar.inc.php	(revision 6063)
+++ /trunk/phpgwapi/inc/class.jscalendar.inc.php	(revision 7655)
@@ -162,5 +162,5 @@
 					{
 						$partcial_match = 0;
-						for($i = 1; $i <= 12; $i++)
+						for($i = 1; $i <= 12; ++$i)
 						{
 							$long_name  = lang(adodb_date('F',mktime(12,0,0,$i,1,2000)));
Index: /trunk/phpgwapi/inc/class.sessions.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.sessions.inc.php	(revision 6435)
+++ /trunk/phpgwapi/inc/class.sessions.inc.php	(revision 7655)
@@ -388,5 +388,5 @@
 				$ip_exploded = explode(",",$ip);
 				$ip = "";
-				for($i=0;$i<2;$i++)
+				for($i=0;$i<2;++$i)
 					$ip .= isset($ip_exploded[$i])?(($i==1?",":"").trim($ip_exploded[$i])):("");
 				if(strlen($ip)>30)
@@ -1190,5 +1190,5 @@
 
 					$new_extravars[$b[0]] = $b[1];
-					$i++;
+					++$i;
 				}
 				$extravars = $new_extravars;
Index: /trunk/phpgwapi/inc/class.gdgraph.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.gdgraph.inc.php	(revision 2)
+++ /trunk/phpgwapi/inc/class.gdgraph.inc.php	(revision 7655)
@@ -119,5 +119,5 @@
 			// Draw dashed lines for x axis
 			$linespace = ($this->graph_width - $this->margin_left - $this->margin_right) / ($this->num_lines_x - 1);
-			for ($i = 1; $i < $this->num_lines_x; $i++)
+			for ($i = 1; $i < $this->num_lines_x; ++$i)
 			{
 				$x = $i * $linespace + $this->margin_left;
@@ -130,5 +130,5 @@
 			// Draw dashed lines for y axis
 			$linespace = ($this->graph_height - $this->margin_top - $this->margin_bottom) / ($this->num_lines_y - 1);
-			for ($i = 1; $i < $this->num_lines_y; $i++)
+			for ($i = 1; $i < $this->num_lines_y; ++$i)
 			{
 				$y = $this->graph_height - $this->margin_bottom - ($i * $linespace);
@@ -174,5 +174,5 @@
 				$this->img->MoveTo($i * $linespace + $this->margin_left, $this->graph_height - $this->margin_bottom + 8);
 				$this->img->DrawText(array('text' => $text['date_formatted']));
-				$i++;
+				++$i;
 			}
 
@@ -223,5 +223,5 @@
 					}
 
-					for($y=0;$y<$largest;$y++)
+					for($y=0;$y<$largest;++$y)
 					{
 						if($line['sdate'] == $this->line_captions_x[$y]['date'])
@@ -249,5 +249,5 @@
 				elseif($line['edate'] <= $this->line_captions_x[$largest]['date'] && $line['edate'] >= $this->line_captions_x[0]['date'])
 				{
-					for($y=0;$y<$largest;$y++)
+					for($y=0;$y<$largest;++$y)
 					{
 						if($line['edate'] == $this->line_captions_x[$y]['date'])
@@ -262,10 +262,10 @@
 				}
 
-				for ($w = -3; $w < 4; $w++)
+				for ($w = -3; $w < 4; ++$w)
 				{
 					$this->img->Line(1+$x1,$y1+$w,$x2,$y2+$w);
 				}
-				$color_index++;
-				$i++;
+				++$color_index;
+				++$i;
 			}
 			// Draw the y axis text
@@ -274,10 +274,10 @@
 			$linespace = ($this->graph_height - $this->margin_top - $this->margin_bottom) / ($this->num_lines_y - 1);
 			$space = 1;
-			for ($i = 0;$i<count($this->data);$i++)
+			for ($i = 0;$i<count($this->data);++$i)
 			{
 				$y = $this->graph_height - $this->margin_bottom - ($space * $linespace) - 7;
 				$this->img->MoveTo($this->margin_left - 6, $y);
 				$this->img->DrawText(array('text' => $this->data[$i]['title'],'justification' => 'right','margin_left' => $this->margin_left));
-				$space++;
+				++$space;
 			}
 
Index: /trunk/phpgwapi/inc/class.contacts.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.contacts.inc.php	(revision 2)
+++ /trunk/phpgwapi/inc/class.contacts.inc.php	(revision 7655)
@@ -262,5 +262,5 @@
 			}
 
-			for ($index = 0; $index < strlen ($s1); $index++)
+			for ($index = 0; $index < strlen ($s1); ++$index)
 			{
 				/* $s1 comes after $s2 */
@@ -286,8 +286,8 @@
 		{
 			$lastindex = count($sortarray) - 2;
-			for ($subindex = 0; $subindex < $lastindex; $subindex++)
+			for ($subindex = 0; $subindex < $lastindex; ++$subindex)
 			{
 				$lastiteration = $lastindex - $subindex;
-				for ($iteration = 0; $iteration < $lastiteration; $iteration++)
+				for ($iteration = 0; $iteration < $lastiteration; ++$iteration)
 				{
 					$nextchar = 0;
Index: /trunk/phpgwapi/inc/class.contacts_ldap.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.contacts_ldap.inc.php	(revision 6065)
+++ /trunk/phpgwapi/inc/class.contacts_ldap.inc.php	(revision 7655)
@@ -328,5 +328,5 @@
 				{
 					$i=0;
-					for($i=0;$i<count($filterarray);$i++)
+					for($i=0;$i<count($filterarray);++$i)
 					{
 						list($name,$value) = preg_split('/=/',$filterarray[$i]);
@@ -482,5 +482,5 @@
 			@reset($ldap_fields);
 			$j = 0;
-			for($i=$start;$i<$limit;$i++)
+			for($i=$start;$i<$limit;++$i)
 			{
 				if($i<$this->total_records && $ldap_fields[$i]['uid'][0])
@@ -510,5 +510,5 @@
 						}
 					}
-					$j++;
+					++$j;
 				}
 			}
Index: /trunk/phpgwapi/inc/class.log.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.log.inc.php	(revision 2)
+++ /trunk/phpgwapi/inc/class.log.inc.php	(revision 7655)
@@ -92,5 +92,5 @@
 
 			$errorstack = $this->errorstack;
-			for ($i = 0; $i < count($errorstack); $i++)
+			for ($i = 0; $i < count($errorstack); ++$i)
 			{
 				$err = $errorstack[$i];
@@ -115,5 +115,5 @@
 			$new = array();
 			reset($this->errorstack);
-			for ($i = 0; $i < count($this->errorstack); $i++)
+			for ($i = 0; $i < count($this->errorstack); ++$i)
 			{
 				$err = $this->errorstack[$i];
@@ -141,5 +141,5 @@
 
 			$errorstack = $this->errorstack;
-			for ($i = 0; $i < count($errorstack); $i++)
+			for ($i = 0; $i < count($errorstack); ++$i)
 			{
 				$err = $errorstack[$i];
Index: /trunk/phpgwapi/inc/class.vfs_shared.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.vfs_shared.inc.php	(revision 6057)
+++ /trunk/phpgwapi/inc/class.vfs_shared.inc.php	(revision 7655)
@@ -793,5 +793,5 @@
 			$ext=$parts[(sizeof($parts)-1)];
 
-			for($i=0;$i<sizeof($contents);$i++)
+			for($i=0;$i<sizeof($contents);++$i)
 			{
 				if (!preg_match('/^#/',$contents[$i]))
@@ -800,5 +800,5 @@
 					if (sizeof($line) >= 2)
 					{
-						for($j=1;$j<sizeof($line);$j++)
+						for($j=1;$j<sizeof($line);++$j)
 						{
 							if($line[$j] == $ext)
@@ -1053,5 +1053,5 @@
 			$count = count ($rarray);
 			reset ($rarray);
-			for ($i = 0; (list ($key, $value) = each ($rarray)) && $i != $count; $i++)
+			for ($i = 0; (list ($key, $value) = each ($rarray)) && $i != $count; ++$i)
 			{
 				$rarray[$key . '_clean'] = $this->clean_string (array ('string' => $value));
@@ -1324,5 +1324,5 @@
 			}
 
-			for ($i = 1; $i != ($arg_info['params'] + 1); $i++)
+			for ($i = 1; $i != ($arg_info['params'] + 1); ++$i)
 			{
 				if (substr ($argv[$i], 0, 1) == "/")
@@ -1363,5 +1363,5 @@
 		function default_values ($data, $default_values)
 		{
-			for ($i = 0; list ($key, $value) = each ($default_values); $i++)
+			for ($i = 0; list ($key, $value) = each ($default_values); ++$i)
 			{
 				if (!isset ($data[$key]))
Index: /trunk/phpgwapi/inc/class.schema_proc_pgsql.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.schema_proc_pgsql.inc.php	(revision 5934)
+++ /trunk/phpgwapi/inc/class.schema_proc_pgsql.inc.php	(revision 7655)
@@ -385,5 +385,5 @@
 			{
 				$aIx[$i] = trim($ix);
-				$i++;
+				++$i;
 			}
 			/* Restore original value */
@@ -409,5 +409,5 @@
 
 					$sSQL .= $name;
-					$i++;
+					++$i;
 				}
 
@@ -444,5 +444,5 @@
 						}
 					}
-					$i++;
+					++$i;
 				}
 				$sSQL .= ')';
Index: /trunk/phpgwapi/inc/class.errorlog.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.errorlog.inc.php	(revision 370)
+++ /trunk/phpgwapi/inc/class.errorlog.inc.php	(revision 7655)
@@ -124,5 +124,5 @@
 
 			$errorstack = $this->errorstack;
-			for ($i = 0; $i < count($errorstack); $i++)
+			for ($i = 0; $i < count($errorstack); ++$i)
 			{
 				$err = $errorstack[$i];
@@ -153,5 +153,5 @@
 			$new = array();
 			reset($this->errorstack);
-			for ($i = 0; $i < count($this->errorstack); $i++)
+			for ($i = 0; $i < count($this->errorstack); ++$i)
 			{
 				$err = $this->errorstack[$i];
@@ -182,5 +182,5 @@
 
 			$errorstack = $this->errorstack;
-			for ($i = 0; $i < count($errorstack); $i++)
+			for ($i = 0; $i < count($errorstack); ++$i)
 			{
 				$err = $errorstack[$i];
Index: /trunk/phpgwapi/inc/class.setup_process.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.setup_process.inc.php	(revision 6737)
+++ /trunk/phpgwapi/inc/class.setup_process.inc.php	(revision 7655)
@@ -160,5 +160,5 @@
 				}
 
-				$i++;
+				++$i;
 				if($i == 20) /* Then oops it broke */
 				{
Index: /trunk/phpgwapi/inc/class.vcard.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.vcard.inc.php	(revision 6057)
+++ /trunk/phpgwapi/inc/class.vcard.inc.php	(revision 7655)
@@ -560,5 +560,5 @@
 								$namel = 'n_' . $myname;
 								$entry[$namel] = $values[$j];
-								$j++;
+								++$j;
 							}
 							break;
@@ -624,5 +624,5 @@
 		// Takes an array of contacts class fields/values, turns it into a vcard string:
 		//
-		// for($i=0;$i<count($buffer);$i++)
+		// for($i=0;$i<count($buffer);++$i)
 		// {
 		//     $vcards .= $this->vcard->out($buffer[$i]);
Index: /trunk/phpgwapi/inc/class.matrixview.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.matrixview.inc.php	(revision 2)
+++ /trunk/phpgwapi/inc/class.matrixview.inc.php	(revision 7655)
@@ -61,5 +61,5 @@
 		function matrixview ($month_int = 0, $year_int = 0)
 		{
-			for($i;$i<32;$i++)
+			for($i;$i<32;++$i)
 			{
 				if(checkdate($month_int,$i,$year_int)) $days++;
@@ -131,5 +131,5 @@
 					$go = 0;
 				}
-				$i++;
+				++$i;
 			}
 		
@@ -211,5 +211,5 @@
 
 			// loop through number of items
-			for($z=0;$z<$this->items_count;$z++)
+			for($z=0;$z<$this->items_count;++$z)
 			{
 				// seperate color and name from first array element
@@ -222,5 +222,5 @@
 
 				// loop through days of desired month
-				for($r=1;$r<$this->sumdays+1;$r++)
+				for($r=1;$r<$this->sumdays+1;++$r)
 				{
 					if($this->items_content[$z][$r] == 'x')
@@ -258,5 +258,5 @@
 			echo '<td>' . lang('Title') . '</td>' . "\n";
 
-			for($i=1;$i<$this->sumdays+1;$i++)
+			for($i=1;$i<$this->sumdays+1;++$i)
 			{
 				echo '<td bgcolor="'; echo $this->color_headerfield; echo '">' . sprintf("%02d",$i) . '</td>' . "\n";
@@ -302,5 +302,5 @@
 				echo '<select name="month"'; 
 
-				for($i=0;$i<13;$i++)
+				for($i=0;$i<13;++$i)
 				{
 					if ($this->month == $i)
@@ -318,5 +318,5 @@
 				echo '<select name="year"';
 
-				for($i = date('Y') -2;$i<date('Y')+5;$i++)
+				for($i = date('Y') -2;$i<date('Y')+5;++$i)
 				{
 					if($this->year == $i)
Index: /trunk/phpgwapi/inc/class.setup.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.setup.inc.php	(revision 3626)
+++ /trunk/phpgwapi/inc/class.setup.inc.php	(revision 7655)
@@ -710,5 +710,5 @@
 			$less = 0;
 
-			for($i=0;$i<count($testa);$i++)
+			for($i=0;$i<count($testa);++$i)
 			{
 				if($DEBUG) { echo'<br>Checking if '. (int)$testa[$i] . ' is less than ' . (int)$testb[$i] . ' ...'; }
@@ -716,5 +716,5 @@
 				{
 					if ($DEBUG) { echo ' yes.'; }
-					$less++;
+					++$less;
 					if($i<3)
 					{
@@ -792,5 +792,5 @@
 			$less = 0;
 
-			for($i=0;$i<count($testa);$i++)
+			for($i=0;$i<count($testa);++$i)
 			{
 				if($DEBUG) { echo'<br>Checking if '. (int)$testa[$i] . ' is more than ' . (int)$testb[$i] . ' ...'; }
@@ -798,5 +798,5 @@
 				{
 					if($DEBUG) { echo ' yes.'; }
-					$less++;
+					++$less;
 					if($i<3)
 					{
Index: /trunk/phpgwapi/inc/class.preferences.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.preferences.inc.php	(revision 3043)
+++ /trunk/phpgwapi/inc/class.preferences.inc.php	(revision 7655)
@@ -953,5 +953,5 @@
 			#$avail_pref_array = $bo_mail_prefs->std_prefs;
 			#$c_cust_prefs = count($bo_mail_prefs->cust_prefs);
-			#for($i=0;$i<$c_cust_prefs;$i++)
+			#for($i=0;$i<$c_cust_prefs;++$i)
 			#{
 			#	// add each custom prefs to the std prefs array
@@ -989,5 +989,5 @@
 			// --- loop thru $avail_pref_array and process each pref item ---
 			$c_prefs = count($avail_pref_array);
-			for($i=0;$i<$c_prefs;$i++)
+			for($i=0;$i<$c_prefs;++$i)
 			{
 				$this_avail_pref = $avail_pref_array[$i];
Index: /trunk/phpgwapi/inc/class.xmlrpcval.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.xmlrpcval.inc.php	(revision 5509)
+++ /trunk/phpgwapi/inc/class.xmlrpcval.inc.php	(revision 7655)
@@ -184,5 +184,5 @@
 						// array
 						$rs .= '<array>'."\n".'<data>'."\n";
-						for($i=0; $i<sizeof($val); $i++)
+						for($i=0; $i<sizeof($val); ++$i)
 						{
 							$rs .= $this->serializeval($val[$i]);
Index: /trunk/phpgwapi/inc/class.sbox.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.sbox.inc.php	(revision 5912)
+++ /trunk/phpgwapi/inc/class.sbox.inc.php	(revision 7655)
@@ -75,5 +75,5 @@
 			$t_s[$selected] = ' selected';
 
-			for ($i=0; $i<24; $i++)
+			for ($i=0; $i<24; ++$i)
 			{
 				$s .= '<option value="' . $i . '"' . $t_s[$i] . '>'
@@ -89,5 +89,5 @@
 			$s = '<select name="' . $name . '">';
 			$t_s[$selected] = " selected";
-			for ($i=1; $i<13; $i++)
+			for ($i=1; $i<13; ++$i)
 			{
 				$s .= '<option value="' . $i . '"' . $t_s[$i] . '>'
@@ -106,5 +106,5 @@
 			$t_s[$selected] = " selected";
 
-			for ($i=0; $i<60; $i++)
+			for ($i=0; $i<60; ++$i)
 			{
 				$s .= '<option value="' . $i . '"' . $t_s[sprintf("%02d",$i)] . '>' . sprintf("%02d",$i) . '</option>';
@@ -139,5 +139,5 @@
 		{
 			$out = '';
-			for($i=0;$i<count($this->weekdays);$i++)
+			for($i=0;$i<count($this->weekdays);++$i)
 			{
 				$out .= '<option value="'.$i.'"'.($selected!=$i?'':' selected').'>'.($this->weekdays[$i]!=''?lang($this->weekdays[$i]):'').'</option>'."\n";
@@ -148,5 +148,5 @@
 		function nr2weekday($selected = 0)
 		{
-			for($i=0;$i<count($this->weekdays);$i++)
+			for($i=0;$i<count($this->weekdays);++$i)
 			{
 				if ($selected > 0 && $selected == $i)
@@ -161,5 +161,5 @@
 			$out = '';
 			$c_monthnames = count($this->monthnames);
-			for($i=0;$i<$c_monthnames;$i++)
+			for($i=0;$i<$c_monthnames;++$i)
 			{
 				$out .= '<option value="'.$i.'"'.($selected!=$i?'':' selected').'>'.($this->monthnames[$i]!=''?lang($this->monthnames[$i]):'').'</option>'."\n";
@@ -171,5 +171,5 @@
 		{
 			$out = '';
-			for($i=0;$i<=12;$i++)
+			for($i=0;$i<=12;++$i)
 			{
 				$out .= '<option value="'.$i.'"'.($selected!=$i?'':' selected').'>'.($i?$i:'').'</option>'."\n";
@@ -183,5 +183,5 @@
 			$out = '';
 
-			for($i=0;$i<32;$i++)
+			for($i=0;$i<32;++$i)
 			{
 				$out .= '<option value="'.($i?$i:'').'"'.($selected!=$i?'':' selected').'>'.($i?$i:'').'</option>'."\n";
@@ -214,5 +214,5 @@
 
 			// We need to add some good error checking here.
-			for ($i=$startYear;$i<$endyear; $i++)
+			for ($i=$startYear;$i<$endyear; ++$i)
 			{
 				$out .= '<option value="'.$i.'"';
@@ -251,5 +251,5 @@
 			$out = '<select name="' . $name . '">';
 
-			for($i=1;$i<count($arr);$i++)
+			for($i=1;$i<count($arr);++$i)
 			{
 				$out .= "<option value=\"";
@@ -304,5 +304,5 @@
 				if(@is_array($selected))
 				{
-					for($i=0;$i<count($selected);$i++)
+					for($i=0;$i<count($selected);++$i)
 					{
 						if ($group['account_id'] == $selected[$i])
Index: /trunk/phpgwapi/inc/common_functions.inc.php
===================================================================
--- /trunk/phpgwapi/inc/common_functions.inc.php	(revision 6057)
+++ /trunk/phpgwapi/inc/common_functions.inc.php	(revision 7655)
@@ -208,5 +208,5 @@
 		/* the default values                                          */
 		$num = count($expected);
-		for ($i = 0; $i < $num; $i++)
+		for ($i = 0; $i < $num; ++$i)
 		{
 			$args[$expected[$i]['name']] = $expected[$i]['default'];
@@ -224,5 +224,5 @@
 			if(!is_array($recieved[0]))
 			{
-			for ($i = 0; $i < $num; $i++)
+			for ($i = 0; $i < $num; ++$i)
 				{
 					if(isset($recieved[$i]) && $recieved[$i] !== '##DEFAULT##')
@@ -244,5 +244,5 @@
 			else
 			{
-				for ($i = 0; $i < $num; $i++)
+				for ($i = 0; $i < $num; ++$i)
 				{
 					$types[$expected[$i]['name']] = $expected[$i]['type']; 
@@ -342,5 +342,5 @@
 				{
 					$octets = preg_split('/\./',$string);
-					for ($i=0; $i != count($octets); $i++)
+					for ($i=0; $i != count($octets); ++$i)
 					{
 						if ($octets[$i] < 0 || $octets[$i] > 255)
@@ -408,5 +408,5 @@
 				if ($password_length >= $min_length)
 				{
-					for ($i=0; $i != $password_length; $i++)
+					for ($i=0; $i != $password_length; ++$i)
 					{
 						$cur_test_string = substr($string, $i, 1);
@@ -475,5 +475,5 @@
 		}
 		$cnt = count($method);
-		for($i=0;$i<$cnt;$i++)
+		for($i=0;$i<$cnt;++$i)
 		{
 			switch(strtoupper($method[$i]))
@@ -730,14 +730,14 @@
             $kl=strlen($ky)<32?strlen($ky):32;
             $k=array();
-            for($i=0;$i<$kl;$i++)
+            for($i=0;$i<$kl;++$i)
                 {
                     $k[$i]=ord($ky{$i})&0x1F;
                 }
             $j=0;
-            for($i=0;$i<strlen($str);$i++)
+            for($i=0;$i<strlen($str);++$i)
                 {
                     $e=ord($str{$i});
                     $str{$i}=$e&0xE0?chr($e^$k[$j]):chr($e);
-                    $j++;$j=$j==$kl?0:$j;
+                    ++$j;$j=$j==$kl?0:$j;
                 }
             return $str;
@@ -814,5 +814,5 @@
 						$code .= '$p' . $i . ',';
 					}
-					$i++;
+					++$i;
 				}
 				$code = substr($code,0,-1) . ');';
@@ -1083,5 +1083,5 @@
 		$less = 0;
 
-		for ($i=0;$i<count($testa);$i++)
+		for ($i=0;$i<count($testa);++$i)
 		{
 			if ($DEBUG) { echo'<br>Checking if '. (int)$testa[$i] . ' is less than ' . (int)$testb[$i] . ' ...'; }
@@ -1089,5 +1089,5 @@
 			{
 				if ($DEBUG) { echo ' yes.'; }
-				$less++;
+				++$less;
 				if ($i<3)
 				{
@@ -1163,5 +1163,5 @@
 		$less = 0;
 
-		for ($i=0;$i<count($testa);$i++)
+		for ($i=0;$i<count($testa);++$i)
 		{
 			if ($DEBUG) { echo'<br>Checking if '. (int)$testa[$i] . ' is more than ' . (int)$testb[$i] . ' ...'; }
@@ -1169,5 +1169,5 @@
 			{
 				if ($DEBUG) { echo ' yes.'; }
-				$less++;
+				++$less;
 				if ($i<3)
 				{
Index: /trunk/phpgwapi/inc/class.xmlrpcmsg.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.xmlrpcmsg.inc.php	(revision 6057)
+++ /trunk/phpgwapi/inc/class.xmlrpcmsg.inc.php	(revision 7655)
@@ -42,5 +42,5 @@
 			if (is_array($pars) && sizeof($pars)>0)
 			{
-				for($i=0; $i<sizeof($pars); $i++) 
+				for($i=0; $i<sizeof($pars); ++$i)
 				{
 					$this->addParam($pars[$i]);
@@ -66,5 +66,5 @@
 			{
 				$this->payload .= '<params>' . "\n";
-				for($i=0; $i<sizeof($this->params); $i++)
+				for($i=0; $i<sizeof($this->params); ++$i)
 				{
 					$p = $this->params[$i];
@@ -174,5 +174,5 @@
 				$newdata = '';
 				$hdrfnd  = 0;
-				for ($i=0; $i<sizeof($ar); $i++)
+				for ($i=0; $i<sizeof($ar); ++$i)
 				{
 					if (!$hdrfnd)
Index: /trunk/phpgwapi/inc/class.accounts_contacts.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.accounts_contacts.inc.php	(revision 547)
+++ /trunk/phpgwapi/inc/class.accounts_contacts.inc.php	(revision 7655)
@@ -172,5 +172,5 @@
 
 			/* get user information for each user/group */
-			for($i=0;$i<count($allValues);$i++)
+			for($i=0;$i<count($allValues);++$i)
 			{
 				$accounts[] = Array(
Index: /trunk/phpgwapi/inc/class.translation_sql.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.translation_sql.inc.php	(revision 3442)
+++ /trunk/phpgwapi/inc/class.translation_sql.inc.php	(revision 7655)
@@ -48,5 +48,5 @@
 		function translation($warnings = False)
 		{
-			for ($i = 1; $i <= 9; $i++)
+			for ($i = 1; $i <= 9; ++$i)
 			{
 				$this->placeholders[] = '%'.$i;
Index: /trunk/phpgwapi/inc/class.vfs_sql.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.vfs_sql.inc.php	(revision 6057)
+++ /trunk/phpgwapi/inc/class.vfs_sql.inc.php	(revision 7655)
@@ -242,5 +242,5 @@
 			$sql2 .= ' VALUES (';
 
-			for ($i = 0; list ($attribute, $value) = each ($file_array); $i++)
+			for ($i = 0; list ($attribute, $value) = each ($file_array); ++$i)
 			{
 				if ($attribute == 'file_id' || $attribute == 'content')
@@ -357,5 +357,5 @@
 					}
 
-					for ($i = 0; $i < $newnumofparts; $i++)
+					for ($i = 0; $i < $newnumofparts; ++$i)
 					{
 						if (!isset ($version_parts[$i]))
@@ -2222,5 +2222,5 @@
 					$sql .= $attribute.'=' .$GLOBALS['phpgw']->db->quote($data['attributes'][$attribute],$this->column_defs[$attribute]['type']);
 
-					$change_attributes++;
+					++$change_attributes;
 				}
 			}
@@ -2863,5 +2863,5 @@
 
 			$rarray = array ();
-			for ($i = 0; $GLOBALS['phpgw']->db->next_record (); $i++)
+			for ($i = 0; $GLOBALS['phpgw']->db->next_record (); ++$i)
 			{
 				$record = $GLOBALS['phpgw']->db->Record;
Index: /trunk/phpgwapi/inc/class.accounts.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.accounts.inc.php	(revision 5141)
+++ /trunk/phpgwapi/inc/class.accounts.inc.php	(revision 7655)
@@ -283,5 +283,5 @@
 							$account_search[$serial]['data'][$id] = $data;
 						}
-						$n++;
+						++$n;
 					}
 					$account_search[$serial]['total'] = $this->total;
@@ -436,5 +436,5 @@
 			$this->memberships = Array();
 
-			for ($idx=0; $idx<count($security_equals); $idx++)
+			for ($idx=0; $idx<count($security_equals); ++$idx)
 			{
 				$groups = (int)$security_equals[$idx];
@@ -463,5 +463,5 @@
 			}
 
-			for ($idx=0; $idx<count($security_equals); $idx++)
+			for ($idx=0; $idx<count($security_equals); ++$idx)
 			{
 				$name = $this->id2name((int)$security_equals[$idx]);
Index: /trunk/phpgwapi/inc/xml_functions.inc.php
===================================================================
--- /trunk/phpgwapi/inc/xml_functions.inc.php	(revision 6057)
+++ /trunk/phpgwapi/inc/xml_functions.inc.php	(revision 7655)
@@ -167,5 +167,5 @@
 				}
 			}
-			$i++;
+			++$i;
 		}
 		return $op;
@@ -493,5 +493,5 @@
 			$arr = array();
 
-			for($i = 0; $i < $size; $i++)
+			for($i = 0; $i < $size; ++$i)
 			{
 				$arr[]=phpgw_xmlrpc_decode($xmlrpc_val->arraymem($i));
@@ -607,9 +607,9 @@
 				$sigs = array();
 				$thesigs=$dmap[$methName]['signature'];
-				for($i=0; $i<sizeof($thesigs); $i++)
+				for($i=0; $i<sizeof($thesigs); ++$i)
 				{
 					$cursig = array();
 					$inSig  = $thesigs[$i];
-					for($j=0; $j<sizeof($inSig); $j++)
+					for($j=0; $j<sizeof($inSig); ++$j)
 					{
 						$cursig[] = CreateObject('phpgwapi.xmlrpcval',$inSig[$j], 'string');
Index: /trunk/phpgwapi/inc/class.categories.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.categories.inc.php	(revision 4786)
+++ /trunk/phpgwapi/inc/class.categories.inc.php	(revision 7655)
@@ -289,9 +289,9 @@
 				$cats[$i]['data']        = $this->db->f('cat_data');
 					
-				$i++;
+				++$i;
 			}
 
 			$num_cats = count($cats);
-			for ($i=0;$i < $num_cats;$i++)
+			for ($i=0;$i < $num_cats;++$i)
 			{
 				$sub_select = ' AND cat_parent=' . $cats[$i]['id'] . ' AND cat_level=' . ($cats[$i]['level']+1);
@@ -313,5 +313,5 @@
 					$subcats[$j]['description'] = $this->db->f('cat_description');
 					$subcats[$j]['data']        = $this->db->f('cat_data');
-					$j++;
+					++$j;
 				}
 
@@ -320,13 +320,13 @@
 				{
 					$newcats = array();
-					for ($k = 0; $k <= $i; $k++)
+					for ($k = 0; $k <= $i; ++$k)
 					{
 						$newcats[$k] = $cats[$k];
 					}
-					for ($k = 0; $k < $num_subcats; $k++)
+					for ($k = 0; $k < $num_subcats; ++$k)
 					{
 						$newcats[$k+$i+1] = $subcats[$k];
 					}
-					for ($k = $i+1; $k < $num_cats; $k++)
+					for ($k = $i+1; $k < $num_cats; ++$k)
 					{
 						$newcats[$k+$num_subcats] = $cats[$k];
@@ -422,5 +422,5 @@
 			if($self)
 			{
-				for ($i=0;$i<count($cats);$i++)
+				for ($i=0;$i<count($cats);++$i)
 				{
 					if ($cats[$i]['id'] == $self)
@@ -441,5 +441,5 @@
 					}
 					$s .= '>';
-					for ($j=0;$j<$cat['level'];$j++)
+					for ($j=0;$j<$cat['level'];++$j)
 					{
 						$s .= '&nbsp;';
@@ -467,5 +467,5 @@
 				if ($this->total_records > 0)
 				{
-					for ($i=0;$i<count($cats);$i++)
+					for ($i=0;$i<count($cats);++$i)
 					{
 						$image_set = '&nbsp;';
@@ -576,5 +576,5 @@
 				$new_parent = $this->id2name($cat_id,'parent');
 
-				for ($i=0;$i<count($cats);$i++)
+				for ($i=0;$i<count($cats);++$i)
 				{
 					if ($cats[$i]['level'] == 1)
Index: /trunk/phpgwapi/inc/class.soap_server.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.soap_server.inc.php	(revision 5934)
+++ /trunk/phpgwapi/inc/class.soap_server.inc.php	(revision 7655)
@@ -359,5 +359,5 @@
 						}
 						// validate each param's type
-						for($i=0; $i < count($p); $i++)
+						for($i=0; $i < count($p); ++$i)
 						{
 							// type not match
Index: /trunk/phpgwapi/inc/class.xmlrpc_server_epi.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.xmlrpc_server_epi.inc.php	(revision 5912)
+++ /trunk/phpgwapi/inc/class.xmlrpc_server_epi.inc.php	(revision 7655)
@@ -109,5 +109,5 @@
 			return array(1);
 
-			for($i=0; $i<sizeof($sig); $i++)
+			for($i=0; $i<sizeof($sig); ++$i)
 			{
 				// check each possible signature in turn
@@ -116,5 +116,5 @@
 				{
 					$itsOK = 1;
-					for($n=0; $n<$in->getNumParams(); $n++)
+					for($n=0; $n<$in->getNumParams(); ++$n)
 					{
 						$p = $in->getParam($n);
Index: /trunk/phpgwapi/inc/class.network.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.network.inc.php	(revision 5915)
+++ /trunk/phpgwapi/inc/class.network.inc.php	(revision 7655)
@@ -221,5 +221,5 @@
 						}
 						$lines[] = $line;
-						$i++;
+						++$i;
 					}
 					$this->close_port();
Index: /trunk/phpgwapi/inc/class.error.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.error.inc.php	(revision 5281)
+++ /trunk/phpgwapi/inc/class.error.inc.php	(revision 7655)
@@ -43,5 +43,5 @@
 			$etext = $parms['text'];
 			$parray = Array();
-			for($counter=1;$counter<=10;$counter++)
+			for($counter=1;$counter<=10;++$counter)
 			{
 				$str = 'p_'.$counter;
Index: /trunk/phpgwapi/inc/class.contacts_sql.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.contacts_sql.inc.php	(revision 2)
+++ /trunk/phpgwapi/inc/class.contacts_sql.inc.php	(revision 7655)
@@ -614,5 +614,5 @@
 					}
 				}
-				$i++;
+				++$i;
 			}
 			return $return_fields;
Index: /trunk/phpgwapi/inc/class.auth.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.auth.inc.php	(revision 2)
+++ /trunk/phpgwapi/inc/class.auth.inc.php	(revision 7655)
@@ -55,5 +55,5 @@
 			}
 
-			for ($i=0; $i<$size; $i++)
+			for ($i=0; $i<$size; ++$i)
 			{
 				$s .= $random_char[mt_rand(1,61)];
Index: /trunk/phpgwapi/inc/fpdf/tutorial/tuto2.php
===================================================================
--- /trunk/phpgwapi/inc/fpdf/tutorial/tuto2.php	(revision 2)
+++ /trunk/phpgwapi/inc/fpdf/tutorial/tuto2.php	(revision 7655)
@@ -37,5 +37,5 @@
 $pdf->AddPage();
 $pdf->SetFont('Times','',12);
-for($i=1;$i<=40;$i++)
+for($i=1;$i<=40;++$i)
 	$pdf->Cell(0,10,'Printing line number '.$i,0,1);
 $pdf->Output();
Index: /trunk/phpgwapi/inc/fpdf/tutorial/tuto5.php
===================================================================
--- /trunk/phpgwapi/inc/fpdf/tutorial/tuto5.php	(revision 2)
+++ /trunk/phpgwapi/inc/fpdf/tutorial/tuto5.php	(revision 7655)
@@ -38,5 +38,5 @@
 	$w=array(40,35,40,45);
 	//Header
-	for($i=0;$i<count($header);$i++)
+	for($i=0;$i<count($header);++$i)
 		$this->Cell($w[$i],7,$header[$i],1,0,'C');
 	$this->Ln();
@@ -65,5 +65,5 @@
 	//Header
 	$w=array(40,35,40,45);
-	for($i=0;$i<count($header);$i++)
+	for($i=0;$i<count($header);++$i)
 		$this->Cell($w[$i],7,$header[$i],1,0,'C',1);
 	$this->Ln();
Index: /trunk/phpgwapi/inc/fpdf/fpdf.php
===================================================================
--- /trunk/phpgwapi/inc/fpdf/fpdf.php	(revision 2)
+++ /trunk/phpgwapi/inc/fpdf/fpdf.php	(revision 7655)
@@ -427,5 +427,5 @@
 	$w=0;
 	$l=strlen($s);
-	for($i=0;$i<$l;$i++)
+	for($i=0;$i<$l;++$i)
 		$w+=$cw[$s{$i}];
 	return $w*$this->FontSize/1000;
@@ -483,5 +483,5 @@
 		$d=0;
 		$nb=count($this->diffs);
-		for($i=1;$i<=$nb;$i++)
+		for($i=1;$i<=$nb;++$i)
 			if($this->diffs[$i]==$diff)
 			{
@@ -748,10 +748,10 @@
 			}
 			$this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill);
-			$i++;
+			++$i;
 			$sep=-1;
 			$j=$i;
 			$l=0;
 			$ns=0;
-			$nl++;
+			++$nl;
 			if($border and $nl==2)
 				$b=$b2;
@@ -762,5 +762,5 @@
 			$sep=$i;
 			$ls=$l;
-			$ns++;
+			++$ns;
 		}
 		$l+=$cw[$c];
@@ -771,5 +771,5 @@
 			{
 				if($i==$j)
-					$i++;
+					++$i;
 				if($this->ws>0)
 				{
@@ -793,10 +793,10 @@
 			$l=0;
 			$ns=0;
-			$nl++;
+			++$nl;
 			if($border and $nl==2)
 				$b=$b2;
 		}
 		else
-			$i++;
+			++$i;
 	}
 	//Last chunk
@@ -837,5 +837,5 @@
 			//Explicit line break
 			$this->Cell($w,$h,substr($s,$j,$i-$j),0,2,'',0,$link);
-			$i++;
+			++$i;
 			$sep=-1;
 			$j=$i;
@@ -847,5 +847,5 @@
 				$wmax=($w-2*$this->cMargin)*1000/$this->FontSize;
 			}
-			$nl++;
+			++$nl;
 			continue;
 		}
@@ -865,10 +865,10 @@
 					$w=$this->w-$this->rMargin-$this->x;
 					$wmax=($w-2*$this->cMargin)*1000/$this->FontSize;
-					$i++;
-					$nl++;
+					++$i;
+					++$nl;
 					continue;
 				}
 				if($i==$j)
-					$i++;
+					++$i;
 				$this->Cell($w,$h,substr($s,$j,$i-$j),0,2,'',0,$link);
 			}
@@ -887,8 +887,8 @@
 				$wmax=($w-2*$this->cMargin)*1000/$this->FontSize;
 			}
-			$nl++;
+			++$nl;
 		}
 		else
-			$i++;
+			++$i;
 	}
 	//Last chunk
@@ -1089,5 +1089,5 @@
 	{
 		//Replace number of pages
-		for($n=1;$n<=$nb;$n++)
+		for($n=1;$n<=$nb;++$n)
 			$this->pages[$n]=str_replace($this->AliasNbPages,$nb,$this->pages[$n]);
 	}
@@ -1103,5 +1103,5 @@
 	}
 	$filter=($this->compress) ? '/Filter /FlateDecode ' : '';
-	for($n=1;$n<=$nb;$n++)
+	for($n=1;$n<=$nb;++$n)
 	{
 		//Page
@@ -1145,5 +1145,5 @@
 	$this->_out('<</Type /Pages');
 	$kids='/Kids [';
-	for($i=0;$i<$nb;$i++)
+	for($i=0;$i<$nb;++$i)
 		$kids.=(3+2*$i).' 0 R ';
 	$this->_out($kids.']');
@@ -1230,5 +1230,5 @@
 			$cw=&$font['cw'];
 			$s='[';
-			for($i=32;$i<=255;$i++)
+			for($i=32;$i<=255;++$i)
 				$s.=$cw[chr($i)].' ';
 			$this->_out($s.']');
@@ -1283,5 +1283,5 @@
 		{
 			$trns='';
-			for($i=0;$i<count($info['trns']);$i++)
+			for($i=0;$i<count($info['trns']);++$i)
 				$trns.=$info['trns'][$i].' '.$info['trns'][$i].' ';
 			$this->_out('/Mask ['.$trns.']');
@@ -1390,5 +1390,5 @@
 	$this->_out('0 '.($this->n+1));
 	$this->_out('0000000000 65535 f ');
-	for($i=1;$i<=$this->n;$i++)
+	for($i=1;$i<=$this->n;++$i)
 		$this->_out(sprintf('%010d 00000 n ',$this->offsets[$i]));
 	//Trailer
Index: /trunk/phpgwapi/inc/fpdf/font/makefont/makefont.php
===================================================================
--- /trunk/phpgwapi/inc/fpdf/font/makefont/makefont.php	(revision 5928)
+++ /trunk/phpgwapi/inc/fpdf/font/makefont/makefont.php	(revision 7655)
@@ -24,5 +24,5 @@
 		}
 	}
-	for($i=0;$i<=255;$i++)
+	for($i=0;$i<=255;++$i)
 		if(!isset($cc2gn[$i]))
 			$cc2gn[$i]='.notdef';
@@ -114,5 +114,5 @@
 			$widths['Delta']=$widths['increment'];
 		//Order widths according to map
-		for($i=0;$i<=255;$i++)
+		for($i=0;$i<=255;++$i)
 		{
 			if(!isset($widths[$map[$i]]))
@@ -185,5 +185,5 @@
 	$s="array(\n\t";
 	$cw=$fm['Widths'];
-	for($i=0;$i<=255;$i++)
+	for($i=0;$i<=255;++$i)
 	{
 		if(chr($i)=="'")
@@ -211,5 +211,5 @@
 	$s='';
 	$last=0;
-	for($i=32;$i<=255;$i++)
+	for($i=32;$i<=255;++$i)
 	{
 		if($map[$i]!=$ref[$i])
@@ -257,5 +257,5 @@
 	//Seek OS/2 table
 	$found=false;
-	for($i=0;$i<$nb;$i++)
+	for($i=0;$i<$nb;++$i)
 	{
 		if(fread($f,4)=='OS/2')
Index: /trunk/phpgwapi/inc/fpdf/font/courier.php
===================================================================
--- /trunk/phpgwapi/inc/fpdf/font/courier.php	(revision 2)
+++ /trunk/phpgwapi/inc/fpdf/font/courier.php	(revision 7655)
@@ -1,4 +1,4 @@
 <?php
-for($i=0;$i<=255;$i++)
+for($i=0;$i<=255;++$i)
 	$fpdf_charwidths['courier'][chr($i)]=600;
 $fpdf_charwidths['courierB']=$fpdf_charwidths['courier'];
Index: /trunk/phpgwapi/inc/class.nextmatchs.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.nextmatchs.inc.php	(revision 3893)
+++ /trunk/phpgwapi/inc/class.nextmatchs.inc.php	(revision 7655)
@@ -434,5 +434,5 @@
 			while($GLOBALS['phpgw']->db->next_record())
 			{
-				$index++;
+				++$index;
 				$filter_obj[$index][0] = $GLOBALS['phpgw']->db->f($idxfieldname);
 				$filter_obj[$index][1] = $GLOBALS['phpgw']->db->f($strfieldname);
@@ -453,5 +453,5 @@
 			{
 				$indexlimit = count($search_obj);
-				for ($index=0; $index<$indexlimit; $index++)
+				for ($index=0; $index<$indexlimit; ++$index)
 				{
 					if ($this->_qfield == '')
@@ -510,5 +510,5 @@
 					}
 
-					for ($index=0; $index<$indexlimit; $index++)
+					for ($index=0; $index<$indexlimit; ++$index)
 					{
 						$filter_obj[2+$index][0] = $user_groups[$index]['account_id'];
@@ -523,5 +523,5 @@
 				$indexlimit = count($filter_obj);
 
-				for ($index=0; $index<$indexlimit; $index++)
+				for ($index=0; $index<$indexlimit; ++$index)
 				{
 					if ($this->_filter == '')
@@ -583,5 +583,5 @@
 			$indexlimit = count($filter_obj);
 
-			for($index=0; $index<$indexlimit; $index++)
+			for($index=0; $index<$indexlimit; ++$index)
 			{
 				if($filter == '')
Index: /trunk/phpgwapi/inc/class.accounts_ldap.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.accounts_ldap.inc.php	(revision 5141)
+++ /trunk/phpgwapi/inc/class.accounts_ldap.inc.php	(revision 7655)
@@ -277,5 +277,5 @@
 					$members = $this->member($this->account_id);
 					$newData['memberuid'] = array();
-					for($i=0;$i<count($members);$i++)
+					for($i=0;$i<count($members);++$i)
 					{
 						$currname = $this->id2name($members[$i]['account_id']);
@@ -308,5 +308,5 @@
 					#_debug_array($members);
 					$newData['memberuid'] = array();
-					for($i=0;$i<count($members);$i++)
+					for($i=0;$i<count($members);++$i)
 					{
 						$currname = $this->id2name($members[$i]['account_id']);
Index: /trunk/phpgwapi/inc/class.crypto.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.crypto.inc.php	(revision 2)
+++ /trunk/phpgwapi/inc/class.crypto.inc.php	(revision 7655)
@@ -101,5 +101,5 @@
 				$x = strlen($iv);
 					$this->iv = '';
-				for($i = 0; $i < $ivsize; $i++)
+				for($i = 0; $i < $ivsize; ++$i)
 				{
 					$this->iv .= $iv[$i % $x];
@@ -109,5 +109,5 @@
 				$x = strlen($key);
 					$this->key = '';
-				for($i = 0; $i < $keysize; $i++)
+				for($i = 0; $i < $keysize; ++$i)
 				{
 					$this->key .= $key[$i % $x];
Index: /trunk/phpgwapi/inc/csstidy/class.csstidy_optimise.php
===================================================================
--- /trunk/phpgwapi/inc/csstidy/class.csstidy_optimise.php	(revision 3052)
+++ /trunk/phpgwapi/inc/csstidy/class.csstidy_optimise.php	(revision 7655)
@@ -302,5 +302,5 @@
             $color_tmp = substr($color,4,strlen($color)-5);
             $color_tmp = explode(',',$color_tmp);
-            for ( $i = 0; $i < count($color_tmp); $i++ )
+            for ( $i = 0; $i < count($color_tmp); ++$i )
             {
                 $color_tmp[$i] = trim ($color_tmp[$i]);
@@ -312,5 +312,5 @@
             }
             $color = '#';
-            for ($i = 0; $i < 3; $i++ )
+            for ($i = 0; $i < 3; ++$i )
             {
                 if($color_tmp[$i]<16) {
@@ -383,5 +383,5 @@
             $temp = array($subvalue);
         }
-        for ($l = 0; $l < count($temp); $l++)
+        for ($l = 0; $l < count($temp);++$l)
         {
             // continue if no numeric value
@@ -404,5 +404,5 @@
             {
                 $unit_found = FALSE;
-                for ($m = 0, $size_4 = count($units); $m < $size_4; $m++)
+                for ($m = 0, $size_4 = count($units); $m < $size_4; ++$m)
                 {
                     if (strpos(strtolower($temp[$l]),$units[$m]) !== FALSE)
@@ -514,5 +514,5 @@
         if(count($values) == 4)
         {
-            for($i=0;$i<4;$i++)
+            for($i=0;$i<4;++$i)
             {
                 $return[$shorthands[$property][$i]] = $values[$i].$important;
@@ -528,5 +528,5 @@
         elseif(count($values) == 2)
         {
-            for($i=0;$i<4;$i++)
+            for($i=0;$i<4;++$i)
             {
                 $return[$shorthands[$property][$i]] = (($i % 2 != 0)) ? $values[1].$important : $values[0].$important;
@@ -535,5 +535,5 @@
         else
         {
-            for($i=0;$i<4;$i++)
+            for($i=0;$i<4;++$i)
             {
                 $return[$shorthands[$property][$i]] = $values[0].$important;
@@ -558,5 +558,5 @@
         $output = array();
         $num = 0;
-        for($i = 0, $len = strlen($string);$i < $len; $i++)
+        for($i = 0, $len = strlen($string);$i < $len; ++$i)
         {
             switch($status)
@@ -619,5 +619,5 @@
 
                 $important = '';
-                for($i = 0; $i < 4; $i++)
+                for($i = 0; $i < 4; ++$i)
                 {
                     $val = $array[$value[$i]];
@@ -665,5 +665,5 @@
 
         $str_value = csstidy_optimise::explode_ws(',',$str_value);
-        for($i = 0; $i < count($str_value); $i++)
+        for($i = 0; $i < count($str_value); ++$i)
         {
             $have['clip'] = FALSE; $have['pos'] = FALSE;
@@ -672,5 +672,5 @@
             $str_value[$i] = csstidy_optimise::explode_ws(' ',trim($str_value[$i]));
 
-            for($j = 0; $j < count($str_value[$i]); $j++)
+            for($j = 0; $j < count($str_value[$i]); ++$j)
             {
                 if($have['bg'] === FALSE && (substr($str_value[$i][$j],0,4) == 'url(' || $str_value[$i][$j] === 'none'))
@@ -743,5 +743,5 @@
         $important = '';
 
-        for($i = 0; $i < $number_of_values; $i++)
+        for($i = 0; $i < $number_of_values; ++$i)
         {
             foreach($background_prop_default as $bg_property => $default_value)
Index: /trunk/phpgwapi/inc/csstidy/class.csstidy.php
===================================================================
--- /trunk/phpgwapi/inc/csstidy/class.csstidy.php	(revision 5141)
+++ /trunk/phpgwapi/inc/csstidy/class.csstidy.php	(revision 7655)
@@ -367,5 +367,5 @@
 			break;
 		}
-		$i++;
+		++$i;
 	}
 
@@ -419,5 +419,5 @@
 	$template = explode('|',$content);
 
-	for ($i = 0; $i < count($template); $i++ )
+	for ($i = 0; $i < count($template); ++$i )
 	{
 		$this->template[$i] = $template[$i];
@@ -470,5 +470,5 @@
     $cur_comment = '';
 
-    for ($i = 0, $size = strlen($string); $i < $size; $i++ )
+    for ($i = 0, $size = strlen($string); $i < $size; ++$i )
     {
         if($string{$i} == "\n" || $string{$i} == "\r")
@@ -812,5 +812,5 @@
             {
                 $this->status = $this->from;
-                $i++;
+                ++$i;
                 $this->_add_token(COMMENT, $cur_comment);
                 $cur_comment = '';
Index: /trunk/phpgwapi/inc/class.phpmailer.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.phpmailer.inc.php	(revision 5509)
+++ /trunk/phpgwapi/inc/class.phpmailer.inc.php	(revision 7655)
@@ -443,5 +443,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 .= ", "; }
@@ -497,15 +497,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]))
@@ -515,5 +515,5 @@
         if(count($bad_rcpt) > 0) // Create error message
         {
-            for($i = 0; $i < count($bad_rcpt); $i++)
+            for($i = 0; $i < count($bad_rcpt); ++$i)
             {
                 if($i != 0) { $error .= ", "; }
@@ -584,5 +584,5 @@
                 $connection = true;
             }
-            $index++;
+            ++$index;
         }
         if(!$connection)
@@ -645,5 +645,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]);
         }
@@ -686,9 +686,9 @@
         $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]);
           $buf = "";
-          for ($e = 0; $e<count($line_part); $e++)
+          for ($e = 0; $e<count($line_part); ++$e)
           {
               $word = $line_part[$e];
@@ -830,5 +830,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]), 
@@ -1053,5 +1053,5 @@
 
         // Add all attachments
-        for($i = 0; $i < count($this->attachment); $i++)
+        for($i = 0; $i < count($this->attachment); ++$i)
         {
             // Check for string attachment
@@ -1326,5 +1326,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/phpgwapi/inc/class.sector_search_ldap.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.sector_search_ldap.inc.php	(revision 5773)
+++ /trunk/phpgwapi/inc/class.sector_search_ldap.inc.php	(revision 7655)
@@ -65,6 +65,6 @@
 	$info = ldap_get_entries($this->ldap_connection, $sr);
 
-	for ($i = 0; $i < $info["count"]; $i++) {
-	    $level++;
+	for ($i = 0; $i < $info["count"]; ++$i) {
+	    ++$level;
 	    $next_ldap_context[$i] = $info[$i]["dn"];
 
@@ -90,5 +90,5 @@
 	} else {
 
-	    for ($i = 0; $i < $info["count"]; $i++) {
+	    for ($i = 0; $i < $info["count"]; ++$i) {
 		$sectors_list[$i] = $info[$i]["ou"][0];
 	    }
@@ -138,5 +138,5 @@
 	}
 
-	for ($i = 0; $i < $info["count"]; $i++) {
+	for ($i = 0; $i < $info["count"]; ++$i) {
 	    $dn = $info[$i]["dn"];
 
@@ -172,5 +172,5 @@
 		    $display .= '+';
 		else {
-		    for ($i = 0; $i < $level; $i++)
+		    for ($i = 0; $i < $level; ++$i)
 			$display .= '---';
 		}
@@ -230,5 +230,5 @@
 	}
 
-	for ($i = 0; $i < $info["count"]; $i++) {
+	for ($i = 0; $i < $info["count"]; ++$i) {
 	    $dn = trim(strtolower($info[$i]['dn']));
 	    if ($dn == $selected)
Index: /trunk/phpgwapi/inc/class.common.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.common.inc.php	(revision 5928)
+++ /trunk/phpgwapi/inc/class.common.inc.php	(revision 7655)
@@ -62,5 +62,5 @@
 			if($debug) { echo "<br>$regs[0] - $regs2[0]"; }
 
-			for($i=1;$i<5;$i++)
+			for($i=1;$i<5;++$i)
 			{
 				if($debug) { echo "<br>$i: $regs[$i] - $regs2[$i]"; }
@@ -93,5 +93,5 @@
 			if($debug) { echo "<br>$regs[0] - $regs2[0]"; }
 
-			for($i=1;$i<6;$i++)
+			for($i=1;$i<6;++$i)
 			{
 				if($debug) { echo "<br>$i: $regs[$i] - $regs2[$i]"; }
@@ -408,5 +408,5 @@
 			);
 
-			for ($i=0; $i<$size; $i++)
+			for ($i=0; $i<$size; ++$i)
 			{
 				$s .= $random_char[rand(1,61)];
@@ -435,5 +435,5 @@
 			$html_error = '<table border="0" width="100%"><tr><td align="right"><b>' . lang($text)
 				. '</b>: </td><td align="left">' . $errors[0] . '</td></tr>';
-			for ($i=1; $i<count($errors); $i++)
+			for ($i=1; $i<count($errors); ++$i)
 			{
 				$html_error .= '<tr><td>&nbsp;</td><td align="left">' . $errors[$i] . '</td></tr>';
@@ -624,5 +624,5 @@
 					}
 				}
-				$i++;
+				++$i;
 				$output_text .= "\n";
 			}
Index: /trunk/phpgwapi/inc/class.vfs_dav.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.vfs_dav.inc.php	(revision 6057)
+++ /trunk/phpgwapi/inc/class.vfs_dav.inc.php	(revision 7655)
@@ -626,5 +626,5 @@
 			$count = count ($rarray);
 			reset ($rarray);
-			for ($i = 0; (list ($key, $value) = each ($rarray)) && $i != $count; $i++)
+			for ($i = 0; (list ($key, $value) = each ($rarray)) && $i != $count; ++$i)
 			{
 				$rarray[$key . '_clean'] = $this->db_clean (array ('string' => $value));
@@ -2370,5 +2370,5 @@
 			$ext=$parts[(sizeof($parts)-1)];
 
-			for($i=0;$i<sizeof($contents);$i++)
+			for($i=0;$i<sizeof($contents);++$i)
 			{
 				if (!preg_match('/^#/',$contents[$i]))
@@ -2377,5 +2377,5 @@
 					if (sizeof($line) >= 2)
 					{
-						for($j=1;$j<sizeof($line);$j++)
+						for($j=1;$j<sizeof($line);++$j)
 						{
 							if($line[$j] == $ext)
@@ -2618,5 +2618,5 @@
 				foreach ( $prop as $key=>$value)
 				{
-					$id++;
+					++$id;
 					$new_key =  substr($value[$data['orderby']].'        ',0, 8);
 					$tmp_prop[strtolower($new_key).'_'.$id] = $value;
@@ -2693,5 +2693,5 @@
 				foreach ( $prop as $key=>$value)
 				{
-					$id++;
+					++$id;
 					$new_key =  substr($value[$data['orderby']].'        ',0, 8);
 					$tmp_prop[strtolower($new_key).'_'.$id] = $value;
@@ -2804,5 +2804,5 @@
 			}
 
-			for ($i = 1; $i != ($arg_info['params'] + 1); $i++)
+			for ($i = 1; $i != ($arg_info['params'] + 1); ++$i)
 			{
 				if (substr ($argv[$i], 0, 1) == '/')
@@ -2844,5 +2844,5 @@
 		{
 		  if(!is_array($data)) $data=array();
-			for ($i = 0; list ($key, $value) = each ($default_values); $i++)
+			for ($i = 0; list ($key, $value) = each ($default_values); ++$i)
 			{
 				if (!isset ($data[$key]))
Index: /trunk/phpgwapi/inc/class.xml.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.xml.inc.php	(revision 6037)
+++ /trunk/phpgwapi/inc/class.xml.inc.php	(revision 7655)
@@ -291,5 +291,5 @@
         
         // Calculate the amount of whitespaces to display.
-        for ( $i = 0; $i < ( $level * 2 ); $i++ )
+        for ( $i = 0; $i < ( $level * 2 ); ++$i )
         {
             // Add a whitespaces to the string.
@@ -377,5 +377,5 @@
             {
                 // Run through all children with the same name.
-                for ( $i = 1; $i <= $pos; $i++ )
+                for ( $i = 1; $i <= $pos; ++$i )
                 {
                     // Generate the full path of the child.
@@ -552,5 +552,5 @@
             
             // Now run through the siblings.
-            for ( $i = 1; $i <= $siblings; $i++ )
+            for ( $i = 1; $i <= $siblings; ++$i )
             {
                 // Create the name of the sibling.
@@ -564,5 +564,5 @@
                     
                     // Increase the counter.
-                    $counter++;
+                    ++$counter;
                     
                     // Add the old and the new name to the list of nodes
@@ -1215,5 +1215,5 @@
         
         // Run through the string.
-        for ( $i = 0; $i < strlen($term); $i++ )
+        for ( $i = 0; $i < strlen($term); ++$i )
         {
             // Get the character at the position of the string.
@@ -1224,5 +1224,5 @@
             {
                 // Increase the number of brackets.
-                $brackets++;
+                ++$brackets;
             }
             elseif ( ( $character == ")" ) || ( $character == "]" ) )
@@ -1922,5 +1922,5 @@
             {
                 // Run through all childs with this name.
-                for ( $i = 1; $i <= $child_position; $i++ )
+                for ( $i = 1; $i <= $child_position; ++$i )
                 {
                     // Create the path of the child.
@@ -2076,5 +2076,5 @@
             {
                 // Run through all children of this name.
-                for ( $i = 1; $i <= $child_position; $i++ )
+                for ( $i = 1; $i <= $child_position; ++$i )
                 {
                     // Create the full path for the children.
@@ -2669,5 +2669,5 @@
             
         // Run through each argument and evaluate it.
-        for ( $i = 0; $i < sizeof($arguments); $i++ )
+        for ( $i = 0; $i < sizeof($arguments); ++$i )
         {
             // Trim each argument.
@@ -2840,5 +2840,5 @@
             
         // Run through all arguments.
-        for ( $i = 0; $i < sizeof($arguments); $i++ )
+        for ( $i = 0; $i < sizeof($arguments); ++$i )
         {
             // Trim the string.
@@ -2911,5 +2911,5 @@
         
         // Run through all arguments.
-        for ( $i = 0; $i < sizeof($arguments); $i++ )
+        for ( $i = 0; $i < sizeof($arguments); ++$i )
         {
             // Trim the argument.
@@ -3371,5 +3371,5 @@
 			
 			// Run through the array of arguments.
-			for ( $i = 1; $i < sizeof($arguments); $i++ )
+			for ( $i = 1; $i < sizeof($arguments); ++$i )
 			{
 				// Add the number of the argument to the command.
Index: /trunk/phpgwapi/inc/xmlrpc.interop.php
===================================================================
--- /trunk/phpgwapi/inc/xmlrpc.interop.php	(revision 2)
+++ /trunk/phpgwapi/inc/xmlrpc.interop.php	(revision 7655)
@@ -139,5 +139,5 @@
 		$rv = CreateObject('phpgwapi.xmlrpcval',array(), xmlrpcArray);
 
-		for($j=0; $j<$sz; $j++)
+		for($j=0; $j<$sz; ++$j)
 		{
 			$b = $v->arraymem($j);
@@ -208,5 +208,5 @@
 			// TODO: create debug method to print can work once more
 			// print "<!-- found $max array elements -->\n";
-			for($i=0; $i<$max; $i++)
+			for($i=0; $i<$max; ++$i)
 			{
 				$rec = $sno->arraymem($i);
@@ -342,5 +342,5 @@
 		$sno = $m->getParam(0);
 		$numcurly = 0;
-		for($i=0; $i<$sno->arraysize(); $i++)
+		for($i=0; $i<$sno->arraysize(); ++$i)
 		{
 			$str = $sno->arraymem($i);
@@ -457,5 +457,5 @@
 		$str=$sno->scalarval();
 		$gt=0; $lt=0; $ap=0; $qu=0; $amp=0;
-		for($i=0; $i<strlen($str); $i++)
+		for($i=0; $i<strlen($str); ++$i)
 		{
 			$c=substr($str, $i, 1);
@@ -463,17 +463,17 @@
 			{
 				case '>':
-					$gt++;
+					++$gt;
 					break;
 				case '<':
-					$lt++;
+					++$lt;
 					break;
 				case '"':
-					$qu++;
+					++$qu;
 					break;
 				case "'":
-					$ap++;
+					++$ap;
 					break;
 				case '&':
-					$amp++;
+					++$amp;
 					break;
 				default:
Index: /trunk/phpgwapi/templates/classic/listUsers.php
===================================================================
--- /trunk/phpgwapi/templates/classic/listUsers.php	(revision 3404)
+++ /trunk/phpgwapi/templates/classic/listUsers.php	(revision 7655)
@@ -130,5 +130,5 @@
 			$info = ldap_get_entries($ds, $sr);
 			
-			for ($i=0; $i<$info["count"]; $i++)
+			for ($i=0; $i<$info["count"]; ++$i)
 				{
 					if ($info[$i]["phpgwaccountvisible"][0] == '-1')
@@ -144,5 +144,5 @@
     		$info = ldap_get_entries($ds, $sr);
 			if($typeAccount == 'u'){ 
-				for ($i=0; $i<$info["count"]; $i++)
+				for ($i=0; $i<$info["count"]; ++$i)
 				{
 					if ($info[$i]["phpgwaccountvisible"][0] == '-1')
@@ -152,5 +152,5 @@
 			}
 			else {
-				for ($i=0; $i<$info["count"]; $i++)	
+				for ($i=0; $i<$info["count"]; ++$i)
 					$users[$uids=$info[$i]["gidnumber"][0]] = Array('name'	=>	$uids=$info[$i]["cn"][0], 'type'	=>	g);		
 			
Index: /trunk/phpgwapi/templates/classic/login_classic.php
===================================================================
--- /trunk/phpgwapi/templates/classic/login_classic.php	(revision 5912)
+++ /trunk/phpgwapi/templates/classic/login_classic.php	(revision 7655)
@@ -239,5 +239,5 @@
 		$organizations = $obj_organization->organization_search($GLOBALS['phpgw_info']['server']['ldap_context']);
 		
-		for ($i=0; $i<count($organizations); $i++)
+		for ($i=0; $i<count($organizations); ++$i)
 		{
 			$tmp_array[strtolower($organizations[$i])] = $organizations[$i];	
Index: /trunk/phpgwapi/templates/classic/navbar.inc.php
===================================================================
--- /trunk/phpgwapi/templates/classic/navbar.inc.php	(revision 1705)
+++ /trunk/phpgwapi/templates/classic/navbar.inc.php	(revision 7655)
@@ -142,5 +142,5 @@
 					unset($icon);
 					unset($title);
-					$i++;				
+					++$i;
 				}
 			}
Index: /trunk/phpgwapi/templates/default/listUsers.php
===================================================================
--- /trunk/phpgwapi/templates/default/listUsers.php	(revision 3404)
+++ /trunk/phpgwapi/templates/default/listUsers.php	(revision 7655)
@@ -130,5 +130,5 @@
 			$info = ldap_get_entries($ds, $sr);
 			
-			for ($i=0; $i<$info["count"]; $i++)
+			for ($i=0; $i<$info["count"]; ++$i)
 				{
 					if ($info[$i]["phpgwaccountvisible"][0] == '-1')
@@ -144,5 +144,5 @@
     		$info = ldap_get_entries($ds, $sr);
 			if($typeAccount == 'u'){ 
-				for ($i=0; $i<$info["count"]; $i++)
+				for ($i=0; $i<$info["count"]; ++$i)
 				{
 					if ($info[$i]["phpgwaccountvisible"][0] == '-1')
@@ -152,5 +152,5 @@
 			}
 			else {
-				for ($i=0; $i<$info["count"]; $i++)	
+				for ($i=0; $i<$info["count"]; ++$i)
 					$users[$uids=$info[$i]["gidnumber"][0]] = Array('name'	=>	$uids=$info[$i]["cn"][0], 'type'	=>	g);		
 			
Index: /trunk/phpgwapi/templates/default/login_default.php
===================================================================
--- /trunk/phpgwapi/templates/default/login_default.php	(revision 7109)
+++ /trunk/phpgwapi/templates/default/login_default.php	(revision 7655)
@@ -351,5 +351,5 @@
 		$organizations = $obj_organization->organization_search($GLOBALS['phpgw_info']['server']['ldap_context']);
 		
-		for ($i=0; $i<count($organizations); $i++)
+		for ($i=0; $i<count($organizations); ++$i)
 		{
 			$tmp_array[strtolower($organizations[$i])] = $organizations[$i];	
@@ -546,5 +546,5 @@
 		// gera parametro com tokens suportados ....
 		$var_tokens = '';
-		for($ii = 1; $ii < 11; $ii++)
+		for($ii = 1; $ii < 11; ++$ii)
 		{
 			if($GLOBALS['phpgw_info']['server']['test_token' . $ii . '1'])
Index: /trunk/phpgwapi/templates/default/navbar.inc.php
===================================================================
--- /trunk/phpgwapi/templates/default/navbar.inc.php	(revision 5486)
+++ /trunk/phpgwapi/templates/default/navbar.inc.php	(revision 7655)
@@ -146,5 +146,5 @@
 					unset($icon);
 					unset($title);
-					$i++;				
+					++$i;
 				}
 			}
Index: /trunk/phpgwapi/templates/news/login_news.php
===================================================================
--- /trunk/phpgwapi/templates/news/login_news.php	(revision 5921)
+++ /trunk/phpgwapi/templates/news/login_news.php	(revision 7655)
@@ -287,5 +287,5 @@
 		$organizations = $obj_organization->organization_search($GLOBALS['phpgw_info']['server']['ldap_context']);
 		
-		for ($i=0; $i<count($organizations); $i++)
+		for ($i=0; $i<count($organizations); ++$i)
 		{
 			$tmp_array[strtolower($organizations[$i])] = $organizations[$i];	
@@ -481,5 +481,5 @@
 		// gera parametro com tokens suportados ....
 		$var_tokens = '';
-		for($ii = 1; $ii < 11; $ii++)
+		for($ii = 1; $ii < 11; ++$ii)
 		{
 			if($GLOBALS['phpgw_info']['server']['test_token' . $ii . '1'])
Index: /trunk/services/class.ldap.php
===================================================================
--- /trunk/services/class.ldap.php	(revision 5928)
+++ /trunk/services/class.ldap.php	(revision 7655)
@@ -231,5 +231,5 @@
         $return = array();
 
-        for ($i = 0; $i < $pEntries["count"]; $i++) {
+        for ($i = 0; $i < $pEntries["count"]; ++$i) {
             $entrieTmp = array();
             foreach ($pEntries[$i] as $index => $value) {
Index: /trunk/reports/inc/class.uireports_maillists.inc.php
===================================================================
--- /trunk/reports/inc/class.uireports_maillists.inc.php	(revision 6920)
+++ /trunk/reports/inc/class.uireports_maillists.inc.php	(revision 7655)
@@ -511,5 +511,5 @@
 				if ($fimgpg > 1)
 				{
-					for($x = $iniciogpg; $x <= $fimgpg; $x++)
+					for($x = $iniciogpg; $x <= $fimgpg; ++$x)
 					{
 						$varp = Array(
Index: /trunk/reports/inc/class.uireports_users.inc.php
===================================================================
--- /trunk/reports/inc/class.uireports_users.inc.php	(revision 6920)
+++ /trunk/reports/inc/class.uireports_users.inc.php	(revision 7655)
@@ -533,5 +533,5 @@
 				if ($fimgpg > 1)
 				{
-					for($x = $iniciogpg; $x <= $fimgpg; $x++)
+					for($x = $iniciogpg; $x <= $fimgpg; ++$x)
 					{
 						$varp = Array(
Index: /trunk/reports/inc/class.uireports_usersgroups.inc.php
===================================================================
--- /trunk/reports/inc/class.uireports_usersgroups.inc.php	(revision 6920)
+++ /trunk/reports/inc/class.uireports_usersgroups.inc.php	(revision 7655)
@@ -507,5 +507,5 @@
 				if ($fimgpg > 1)
 				{
-					for($x = $iniciogpg; $x <= $fimgpg; $x++)
+					for($x = $iniciogpg; $x <= $fimgpg; ++$x)
 					{
 						$varp = Array(
Index: /trunk/reports/inc/class.imap_functions.inc.php
===================================================================
--- /trunk/reports/inc/class.imap_functions.inc.php	(revision 6920)
+++ /trunk/reports/inc/class.imap_functions.inc.php	(revision 7655)
@@ -52,5 +52,5 @@
 				$return[$i] = $key;
 			}
-			$i++;
+			++$i;
 		}
 
Index: /trunk/reports/inc/class.uireports_shareAccounts.inc.php
===================================================================
--- /trunk/reports/inc/class.uireports_shareAccounts.inc.php	(revision 6920)
+++ /trunk/reports/inc/class.uireports_shareAccounts.inc.php	(revision 7655)
@@ -153,5 +153,5 @@
 						//Imprimir os participantes da conta compartilhada no PDF
 		                                $max = count($owner_user_share);
-        	                                for ($i=0; $i <= $max; $i++)
+        	                                for ($i=0; $i <= $max; ++$i)
                 	                        {
 							if ($max == $i)
@@ -500,5 +500,5 @@
                                         $max = count($owner_user_share);
                                         $row_participants = array();
-					for ($i=0; $i <= $max; $i++)
+					for ($i=0; $i <= $max; ++$i)
 	                                {
                                                 if (0 == $i)
@@ -571,5 +571,5 @@
 				if ($fimgpg > 1)
 				{
-					for($x = $iniciogpg; $x <= $fimgpg; $x++)
+					for($x = $iniciogpg; $x <= $fimgpg; ++$x)
 					{
 						$varp = Array(
Index: /trunk/reports/inc/class.fpdf.inc.php
===================================================================
--- /trunk/reports/inc/class.fpdf.inc.php	(revision 5291)
+++ /trunk/reports/inc/class.fpdf.inc.php	(revision 7655)
@@ -421,5 +421,5 @@
 	$w=0;
 	$l=strlen($s);
-	for($i=0;$i<$l;$i++)
+	for($i=0;$i<$l;++$i)
 		$w+=$cw[$s[$i]];
 	return $w*$this->FontSize/1000;
@@ -476,5 +476,5 @@
 		$d=0;
 		$nb=count($this->diffs);
-		for($i=1;$i<=$nb;$i++)
+		for($i=1;$i<=$nb;++$i)
 		{
 			if($this->diffs[$i]==$diff)
@@ -743,10 +743,10 @@
 			}
 			$this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill);
-			$i++;
+			++$i;
 			$sep=-1;
 			$j=$i;
 			$l=0;
 			$ns=0;
-			$nl++;
+			++$nl;
 			if($border && $nl==2)
 				$b=$b2;
@@ -757,5 +757,5 @@
 			$sep=$i;
 			$ls=$l;
-			$ns++;
+			++$ns;
 		}
 		$l+=$cw[$c];
@@ -766,5 +766,5 @@
 			{
 				if($i==$j)
-					$i++;
+					++$i;
 				if($this->ws>0)
 				{
@@ -788,10 +788,10 @@
 			$l=0;
 			$ns=0;
-			$nl++;
+			++$nl;
 			if($border && $nl==2)
 				$b=$b2;
 		}
 		else
-			$i++;
+			++$i;
 	}
 	//Last chunk
@@ -828,5 +828,5 @@
 			//Explicit line break
 			$this->Cell($w,$h,substr($s,$j,$i-$j),0,2,'',0,$link);
-			$i++;
+			++$i;
 			$sep=-1;
 			$j=$i;
@@ -838,5 +838,5 @@
 				$wmax=($w-2*$this->cMargin)*1000/$this->FontSize;
 			}
-			$nl++;
+			++$nl;
 			continue;
 		}
@@ -856,10 +856,10 @@
 					$w=$this->w-$this->rMargin-$this->x;
 					$wmax=($w-2*$this->cMargin)*1000/$this->FontSize;
-					$i++;
-					$nl++;
+					++$i;
+					++$nl;
 					continue;
 				}
 				if($i==$j)
-					$i++;
+					++$i;
 				$this->Cell($w,$h,substr($s,$j,$i-$j),0,2,'',0,$link);
 			}
@@ -878,8 +878,8 @@
 				$wmax=($w-2*$this->cMargin)*1000/$this->FontSize;
 			}
-			$nl++;
+			++$nl;
 		}
 		else
-			$i++;
+			++$i;
 	}
 	//Last chunk
@@ -1382,5 +1382,5 @@
 	{
 		//Replace number of pages
-		for($n=1;$n<=$nb;$n++)
+		for($n=1;$n<=$nb;++$n)
 			$this->pages[$n]=str_replace($this->AliasNbPages,$nb,$this->pages[$n]);
 	}
@@ -1396,5 +1396,5 @@
 	}
 	$filter=($this->compress) ? '/Filter /FlateDecode ' : '';
-	for($n=1;$n<=$nb;$n++)
+	for($n=1;$n<=$nb;++$n)
 	{
 		//Page
@@ -1438,5 +1438,5 @@
 	$this->_out('<</Type /Pages');
 	$kids='/Kids [';
-	for($i=0;$i<$nb;$i++)
+	for($i=0;$i<$nb;++$i)
 		$kids.=(3+2*$i).' 0 R ';
 	$this->_out($kids.']');
@@ -1535,5 +1535,5 @@
 			$cw=&$font['cw'];
 			$s='[';
-			for($i=32;$i<=255;$i++)
+			for($i=32;$i<=255;++$i)
 				$s.=$cw[chr($i)].' ';
 			$this->_out($s.']');
@@ -1589,5 +1589,5 @@
 		{
 			$trns='';
-			for($i=0;$i<count($info['trns']);$i++)
+			for($i=0;$i<count($info['trns']);++$i)
 				$trns.=$info['trns'][$i].' '.$info['trns'][$i].' ';
 			$this->_out('/Mask ['.$trns.']');
@@ -1710,5 +1710,5 @@
 	$this->_out('0 '.($this->n+1));
 	$this->_out('0000000000 65535 f ');
-	for($i=1;$i<=$this->n;$i++)
+	for($i=1;$i<=$this->n;++$i)
 		$this->_out(sprintf('%010d 00000 n ',$this->offsets[$i]));
 	//Trailer
Index: /trunk/reports/inc/class.uireports_institutionalAccounts.inc.php
===================================================================
--- /trunk/reports/inc/class.uireports_institutionalAccounts.inc.php	(revision 6920)
+++ /trunk/reports/inc/class.uireports_institutionalAccounts.inc.php	(revision 7655)
@@ -147,5 +147,5 @@
 					// Lista os participantes da conta institucional
 					$max = count($row_mailforwardingaddress);
-					for ($i=0; $i <= $max; $i++)
+					for ($i=0; $i <= $max; ++$i)
 					{
 						if ($max == $i)
@@ -502,5 +502,5 @@
                                         $max = count($accountr['account_mailForwardingAddress']);
 					$row_participants = '';
-                                        for ($i=0; $i <= $max; $i++)
+                                        for ($i=0; $i <= $max; ++$i)
                                        {
                                                 if (0 == $i)
@@ -555,5 +555,5 @@
 				if ($fimgpg > 1)
 				{
-					for($x = $iniciogpg; $x <= $fimgpg; $x++)
+					for($x = $iniciogpg; $x <= $fimgpg; ++$x)
 					{
 						$varp = Array(
Index: /trunk/reports/inc/class.uireports_logon.inc.php
===================================================================
--- /trunk/reports/inc/class.uireports_logon.inc.php	(revision 6920)
+++ /trunk/reports/inc/class.uireports_logon.inc.php	(revision 7655)
@@ -641,5 +641,5 @@
 					if ($fimgpg > 1)
 					{
-						for($x = $iniciogpg; $x <= $fimgpg; $x++)
+						for($x = $iniciogpg; $x <= $fimgpg; ++$x)
 						{
 							$varp = Array(
Index: /trunk/reports/inc/class.uireports_fpdf.inc.php
===================================================================
--- /trunk/reports/inc/class.uireports_fpdf.inc.php	(revision 6920)
+++ /trunk/reports/inc/class.uireports_fpdf.inc.php	(revision 7655)
@@ -38,5 +38,5 @@
 		//Calculate the height of the row
 		$nb=0;
-		for($i=0;$i< count($data);$i++)
+		for($i=0;$i< count($data);++$i)
 		$nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));
 		$h=5*$nb;
@@ -44,5 +44,5 @@
 		$this->CheckPageBreak($h);
 		//Draw the cells of the row
-		for($i=0;$i< count($data);$i++)
+		for($i=0;$i< count($data);++$i)
 		{
 			$w=$this->widths[$i];
@@ -90,9 +90,9 @@
 			if($c=="\n")
 			{
-				$i++;
+				++$i;
 				$sep=-1;
 				$j=$i;
 				$l=0;
-				$nl++;
+				++$nl;
 				continue;
 			}
@@ -105,5 +105,5 @@
 				{
 					if($i==$j)
-					$i++;
+					++$i;
 				}
 				else
@@ -112,8 +112,8 @@
 				$j=$i;
 				$l=0;
-				$nl++;
+				++$nl;
 			}
 			else
-			$i++;
+			++$i;
 		}
 		return $nl;
Index: /trunk/reports/inc/class.uireports.inc.php
===================================================================
--- /trunk/reports/inc/class.uireports.inc.php	(revision 6920)
+++ /trunk/reports/inc/class.uireports.inc.php	(revision 7655)
@@ -111,5 +111,5 @@
 						$newvals = explode(' ',$newval);
 						$setting = end($newvals);
-						for ($i=0;$i<(count($newvals) - 1); $i++)
+						for ($i=0;$i<(count($newvals) - 1); ++$i)
 						{
 							$configs[] = $newvals[$i];
Index: /trunk/reports/inc/class.uireports_cota.inc.php
===================================================================
--- /trunk/reports/inc/class.uireports_cota.inc.php	(revision 6920)
+++ /trunk/reports/inc/class.uireports_cota.inc.php	(revision 7655)
@@ -451,5 +451,5 @@
 				if ($fimgpg > 1)
 				{
-					for($x = $iniciogpg; $x <= $fimgpg; $x++)
+					for($x = $iniciogpg; $x <= $fimgpg; ++$x)
 					{
 						$varp = Array(
Index: /trunk/reports/inc/font/makefont/makefont.php
===================================================================
--- /trunk/reports/inc/font/makefont/makefont.php	(revision 5291)
+++ /trunk/reports/inc/font/makefont/makefont.php	(revision 7655)
@@ -26,5 +26,5 @@
 		}
 	}
-	for($i=0;$i<=255;$i++)
+	for($i=0;$i<=255;++$i)
 	{
 		if(!isset($cc2gn[$i]))
@@ -120,5 +120,5 @@
 			$widths['Delta']=$widths['increment'];
 		//Order widths according to map
-		for($i=0;$i<=255;$i++)
+		for($i=0;$i<=255;++$i)
 		{
 			if(!isset($widths[$map[$i]]))
@@ -191,5 +191,5 @@
 	$s="array(\n\t";
 	$cw=$fm['Widths'];
-	for($i=0;$i<=255;$i++)
+	for($i=0;$i<=255;++$i)
 	{
 		if(chr($i)=="'")
@@ -217,5 +217,5 @@
 	$s='';
 	$last=0;
-	for($i=32;$i<=255;$i++)
+	for($i=32;$i<=255;++$i)
 	{
 		if($map[$i]!=$ref[$i])
@@ -263,5 +263,5 @@
 	//Seek OS/2 table
 	$found=false;
-	for($i=0;$i<$nb;$i++)
+	for($i=0;$i<$nb;++$i)
 	{
 		if(fread($f,4)=='OS/2')
Index: /trunk/reports/inc/font/courier.php
===================================================================
--- /trunk/reports/inc/font/courier.php	(revision 5291)
+++ /trunk/reports/inc/font/courier.php	(revision 7655)
@@ -1,4 +1,4 @@
 <?php
-for($i=0;$i<=255;$i++)
+for($i=0;$i<=255;++$i)
 	$fpdf_charwidths['courier'][chr($i)]=600;
 $fpdf_charwidths['courierB']=$fpdf_charwidths['courier'];
Index: /trunk/reports/inc/class.functions.inc.php
===================================================================
--- /trunk/reports/inc/class.functions.inc.php	(revision 6920)
+++ /trunk/reports/inc/class.functions.inc.php	(revision 7655)
@@ -175,5 +175,5 @@
 			{
 				$bin = '';
-				for ($i=0; $i<$index; $i++)
+				for ($i=0; $i<$index; ++$i)
 				{
 					$bin .= '0';
@@ -251,5 +251,5 @@
 					$info = ldap_get_entries($ldap_conn, $search);
 					
-					for ($i=0; $i < $info['count']; $i++)
+					for ($i=0; $i < $info['count']; ++$i)
 					{
 						$tmp[$info[$i]['uid'][0]]['account_id']	 = $info[$i]['uidnumber'][0]; 
@@ -281,5 +281,5 @@
 					$search=ldap_search($ldap_conn, $context, $filter, $justthese);
 					$info = ldap_get_entries($ldap_conn, $search);
-					for ($i=0; $i < $info['count']; $i++)
+					for ($i=0; $i < $info['count']; ++$i)
 					{
 						$tmp[$info[$i]['cn'][0]]['cn']= $info[$i]['cn'][0];
@@ -308,5 +308,5 @@
 					$info = ldap_get_entries($ldap_conn, $search);
 					
-					for ($i=0; $i < $info['count']; $i++)
+					for ($i=0; $i < $info['count']; ++$i)
 					{
 						$tmp[$info[$i]['uid'][0]]['uid']		= $info[$i]['uid'][0];
@@ -335,5 +335,5 @@
 					$search=ldap_search($ldap_conn, $context, $filter, $justthese);
 					$info = ldap_get_entries($ldap_conn, $search);
-					for ($i=0; $i < $info['count']; $i++)
+					for ($i=0; $i < $info['count']; ++$i)
 					{
 						$tmp[$info[$i]['cn'][0]]['cn']			= $info[$i]['cn'][0];
@@ -377,5 +377,5 @@
 					$info = ldap_get_entries($ldap_conn, $search);
 					
-					for ($i=0; $i < $info['count']; $i++)
+					for ($i=0; $i < $info['count']; ++$i)
 					{
 						$tmp[$info[$i]['uid'][0]]['account_id']	 = $info[$i]['uidnumber'][0]; 
@@ -407,5 +407,5 @@
 					$search=ldap_search($ldap_conn, $context, $filter, $justthese);
 					$info = ldap_get_entries($ldap_conn, $search);
-					for ($i=0; $i < $info['count']; $i++)
+					for ($i=0; $i < $info['count']; ++$i)
 					{
 						$tmp[$info[$i]['cn'][0]]['cn']= $info[$i]['cn'][0];
@@ -434,5 +434,5 @@
 					$info = ldap_get_entries($ldap_conn, $search);
 					
-					for ($i=0; $i < $info['count']; $i++)
+					for ($i=0; $i < $info['count']; ++$i)
 					{
 						$tmp[$info[$i]['uid'][0]]['uid']		= $info[$i]['uid'][0];
@@ -461,5 +461,5 @@
 					$search=ldap_search($ldap_conn, $context, $filter, $justthese);
 					$info = ldap_get_entries($ldap_conn, $search);
-					for ($i=0; $i < $info['count']; $i++)
+					for ($i=0; $i < $info['count']; ++$i)
 					{
 						$tmp[$info[$i]['cn'][0]]['cn']			= $info[$i]['cn'][0];
@@ -523,5 +523,5 @@
         		$info = ldap_get_entries($ldap_conn, $search);
 
-		        for ($i=0; $i<$info["count"]; $i++)
+		        for ($i=0; $i<$info["count"]; ++$i)
     		    {
     		    	$a_sectors[] = $info[$i]['dn'];	
@@ -594,5 +594,5 @@
 				$search=ldap_search($ldap_conn, $context, $filter, $justthese);
         		$info = ldap_get_entries($ldap_conn, $search);
-		        for ($i=0; $i<$info["count"]; $i++)
+		        for ($i=0; $i<$info["count"]; ++$i)
     		    {
     		    	$a_sectors[] = $info[$i]['dn'];	
@@ -660,5 +660,5 @@
 				$search=ldap_search($ldap_conn, $contextdn, $filter, $justthese);
         		$info = ldap_get_entries($ldap_conn, $search);
-		        for ($i=0; $i<$info["count"]; $i++)
+		        for ($i=0; $i<$info["count"]; ++$i)
     		    {
     		    	$a_sectors[] = trim(strtoupper($info[$i]['dn']));
@@ -706,5 +706,5 @@
 				if ($level > 0)
 				{
-					for ($i=0; $i<$level; $i++)
+					for ($i=0; $i<$level; ++$i)
 					{
 						$ii = $ii +1;
@@ -753,5 +753,5 @@
 				$info = ldap_get_entries($ldap_conn, $search);				
 				
-				for ($i=0; $i < $info['count']; $i++)
+				for ($i=0; $i < $info['count']; ++$i)
 				{
 					$tmp[$info[$i]['cn'][0]]['id']				= $info[$i]['gidnumber'][0];
@@ -791,5 +791,5 @@
 				$info = ldap_get_entries($ldap_conn, $search);				
 				
-				for ($i=0; $i < $info['count']; $i++)
+				for ($i=0; $i < $info['count']; ++$i)
 				{
 					$tmp[$info[$i]['uid'][0]]['uid']		= $info[$i]['uid'][0];
@@ -832,5 +832,5 @@
 				$info = ldap_get_entries($ldap_conn, $search);
 
-				for ($i=0; $i < $info['count']; $i++)
+				for ($i=0; $i < $info['count']; ++$i)
 				{
 					$tmp[$info[$i]['uid'][0]]['account_id']	 = $info[$i]['uidnumber'][0]; 
@@ -877,5 +877,5 @@
                                 $info = ldap_get_entries($ldap_conn, $search);
 
-                                for ($i=0; $i < $info['count']; $i++)
+                                for ($i=0; $i < $info['count']; ++$i)
                                 {
                                         $tmp[$info[$i]['uid'][0]]['account_id']  = $info[$i]['uidnumber'][0];
@@ -924,5 +924,5 @@
                                 $info = ldap_get_entries($ldap_conn, $search);
 
-                                for ($i=0; $i < $info['count']; $i++)
+                                for ($i=0; $i < $info['count']; ++$i)
                                 {
                                         $tmp[$info[$i]['uid'][0]]['account_lid'] = $info[$i]['uid'][0];
@@ -966,5 +966,5 @@
                                 $info = ldap_get_entries($ldap_conn, $search);
 
-                                for ($i=0; $i < $info['count']; $i++)
+                                for ($i=0; $i < $info['count']; ++$i)
                                 {
                                         $tmp[$info[$i]['uid'][0]]['account_cn']  = $info[$i]['cn'][0];
@@ -1151,5 +1151,5 @@
 				$info = ldap_get_entries($ldap_conn, $search);
 
-				for ($i=0; $i < $info['count']; $i++)
+				for ($i=0; $i < $info['count']; ++$i)
 				{
 					$access_log =  $this->show_access_log($info[$i]['uidnumber'][0]);
@@ -1285,5 +1285,5 @@
 					$applications_list .= sprintf('<tr bgcolor="%s">%s%s%s</tr>','#DDDDDD', $app_col1, $app_col2, $app_col3);					
 				}
-				$i++;
+				++$i;
 			}
 			return $applications_list;
@@ -1396,5 +1396,5 @@
 					$iCurrent = 0, $rEntry = ldap_first_entry( $rConnection, $rSearch );
 					$iCurrent <= $iEnd && is_resource( $rEntry );
-					$iCurrent++, $rEntry = ldap_next_entry( $rConnection, $rEntry )
+					++$iCurrent, $rEntry = ldap_next_entry( $rConnection, $rEntry )
 					)
 				{
@@ -1470,5 +1470,5 @@
 					$iCurrent = 0, $rEntry = ldap_first_entry( $rConnection, $rSearch );
 					$iCurrent <= $iEnd && is_resource( $rEntry );
-					$iCurrent++, $rEntry = ldap_next_entry( $rConnection, $rEntry )
+					++$iCurrent, $rEntry = ldap_next_entry( $rConnection, $rEntry )
 					)
 				{
@@ -1545,5 +1545,5 @@
 					$iCurrent = 0, $rEntry = ldap_first_entry( $rConnection, $rSearch );
 					$iCurrent <= $iEnd && is_resource( $rEntry );
-					$iCurrent++, $rEntry = ldap_next_entry( $rConnection, $rEntry )
+					++$iCurrent, $rEntry = ldap_next_entry( $rConnection, $rEntry )
 					)
 				{
@@ -1620,5 +1620,5 @@
                                         $iCurrent = 0, $rEntry = ldap_first_entry( $rConnection, $rSearch );
                                         $iCurrent <= $iEnd && is_resource( $rEntry );
-                                        $iCurrent++, $rEntry = ldap_next_entry( $rConnection, $rEntry )
+                                        ++$iCurrent, $rEntry = ldap_next_entry( $rConnection, $rEntry )
                                         )
                                 {
@@ -1691,5 +1691,5 @@
                                         $iCurrent = 0, $rEntry = ldap_first_entry( $rConnection, $rSearch );
                                         $iCurrent <= $iEnd && is_resource( $rEntry );
-                                        $iCurrent++, $rEntry = ldap_next_entry( $rConnection, $rEntry )
+                                        ++$iCurrent, $rEntry = ldap_next_entry( $rConnection, $rEntry )
                                         )
                                 {
@@ -1761,5 +1761,5 @@
                                         $iCurrent = 0, $rEntry = ldap_first_entry( $rConnection, $rSearch );
                                         $iCurrent <= $iEnd && is_resource( $rEntry );
-                                        $iCurrent++, $rEntry = ldap_next_entry( $rConnection, $rEntry )
+                                        ++$iCurrent, $rEntry = ldap_next_entry( $rConnection, $rEntry )
                                         )
                                 {
@@ -1798,5 +1798,5 @@
 				$info = ldap_get_entries($ldap_conn, $search);
 
-				for ($i=0; $i < $info['count']; $i++)
+				for ($i=0; $i < $info['count']; ++$i)
 				{
 					$a_sectors[] = $info[$i]['dn'];
@@ -2063,5 +2063,5 @@
 					$iCurrent = 0, $rEntry = ldap_first_entry( $rConnection, $rSearch );
 					$iCurrent <= $iEnd && is_resource( $rEntry );
-					$iCurrent++, $rEntry = ldap_next_entry( $rConnection, $rEntry )
+					++$iCurrent, $rEntry = ldap_next_entry( $rConnection, $rEntry )
 					)
 				{
Index: /trunk/reports/inc/class.ldap_functions.inc.php
===================================================================
--- /trunk/reports/inc/class.ldap_functions.inc.php	(revision 5291)
+++ /trunk/reports/inc/class.ldap_functions.inc.php	(revision 7655)
@@ -61,5 +61,5 @@
     	$entries = ldap_get_entries($this->ldap, $groups_list);
     	
-		for ($i=0; $i<$entries["count"]; $i++){
+		for ($i=0; $i<$entries["count"]; ++$i){
 			$u_tmp[$entries[$i]["uidnumber"][0]] = $entries[$i]["cn"][0];
 		}
@@ -93,5 +93,5 @@
     	    	
 		$options = '';
-		for ($i=0; $i<$entries['count']; $i++)
+		for ($i=0; $i<$entries['count']; ++$i)
 		{
 			$options .= "<option value=" . $entries[$i]['gidnumber'][0] . ">" . $entries[$i]['cn'][0] . "</option>";
@@ -114,5 +114,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>";
@@ -136,5 +136,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.
@@ -164,5 +164,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')
@@ -205,5 +205,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] ] = $entries[$i]['cn'][0];
@@ -233,5 +233,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];
@@ -268,5 +268,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.
@@ -281,5 +281,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");
@@ -287,8 +287,8 @@
 					// Montagem dinamica do filtro
 					$filter="(&(phpgwAccountType=u)(|";
-					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--;
@@ -298,5 +298,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];
@@ -328,5 +328,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')
@@ -366,5 +366,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.
@@ -381,5 +381,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");
@@ -387,8 +387,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--;
@@ -398,5 +398,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];
@@ -471,5 +471,5 @@
 				}
 
-				$i++;
+				++$i;
 			}
 		}
@@ -513,5 +513,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]['cn'][0] . " (".$entries[$i]['mail'][0].")" . "</option>";
Index: /trunk/library/Mail/Mail/RFC822.php
===================================================================
--- /trunk/library/Mail/Mail/RFC822.php	(revision 6118)
+++ /trunk/library/Mail/Mail/RFC822.php	(revision 7655)
@@ -332,5 +332,5 @@
         $string = $parts[0];
 
-        for ($i = 0; $i < count($parts); $i++) {
+        for ($i = 0; $i < count($parts); ++$i) {
             if ($this->_hasUnclosedQuotes($string)
                 || $this->_hasUnclosedBrackets($string, '<>')
@@ -426,5 +426,5 @@
     {
         $parts = explode($char, $string);
-        for ($i = 0; $i < count($parts); $i++){
+        for ($i = 0; $i < count($parts); ++$i){
             if (substr($parts[$i], -1) == '\\' || $this->_hasUnclosedQuotes($parts[$i]))
                 $num--;
@@ -500,5 +500,5 @@
         //                         geezer
         // ... or any other format valid by RFC 822.
-        for ($i = 0; $i < count($addresses); $i++) {
+        for ($i = 0; $i < count($addresses); ++$i) {
             if (!$this->validateMailbox($addresses[$i])) {
                 if (empty($this->error)) {
@@ -544,5 +544,5 @@
         while (count($parts) > 0){
             $phrase_parts[] = $this->_splitCheck($parts, ' ');
-            for ($i = 0; $i < $this->index + 1; $i++)
+            for ($i = 0; $i < $this->index + 1; ++$i)
                 array_shift($parts);
         }
@@ -797,5 +797,5 @@
         while (count($subdomains) > 0) {
             $sub_domains[] = $this->_splitCheck($subdomains, '.');
-            for ($i = 0; $i < $this->index + 1; $i++)
+            for ($i = 0; $i < $this->index + 1; ++$i)
                 array_shift($subdomains);
         }
@@ -891,5 +891,5 @@
         while (count($parts) > 0){
             $words[] = $this->_splitCheck($parts, '.');
-            for ($i = 0; $i < $this->index + 1; $i++) {
+            for ($i = 0; $i < $this->index + 1; ++$i) {
                 array_shift($parts);
             }
Index: /trunk/library/csstidy/class.csstidy_optimise.php
===================================================================
--- /trunk/library/csstidy/class.csstidy_optimise.php	(revision 4414)
+++ /trunk/library/csstidy/class.csstidy_optimise.php	(revision 7655)
@@ -302,5 +302,5 @@
             $color_tmp = substr($color,4,strlen($color)-5);
             $color_tmp = explode(',',$color_tmp);
-            for ( $i = 0; $i < count($color_tmp); $i++ )
+            for ( $i = 0; $i < count($color_tmp); ++$i )
             {
                 $color_tmp[$i] = trim ($color_tmp[$i]);
@@ -312,5 +312,5 @@
             }
             $color = '#';
-            for ($i = 0; $i < 3; $i++ )
+            for ($i = 0; $i < 3; ++$i )
             {
                 if($color_tmp[$i]<16) {
@@ -383,5 +383,5 @@
             $temp = array($subvalue);
         }
-        for ($l = 0; $l < count($temp); $l++)
+        for ($l = 0; $l < count($temp); ++$l)
         {
             // continue if no numeric value
@@ -404,5 +404,5 @@
             {
                 $unit_found = FALSE;
-                for ($m = 0, $size_4 = count($units); $m < $size_4; $m++)
+                for ($m = 0, $size_4 = count($units); $m < $size_4; ++$m)
                 {
                     if (strpos(strtolower($temp[$l]),$units[$m]) !== FALSE)
@@ -514,5 +514,5 @@
         if(count($values) == 4)
         {
-            for($i=0;$i<4;$i++)
+            for($i=0;$i<4;++$i)
             {
                 $return[$shorthands[$property][$i]] = $values[$i].$important;
@@ -528,5 +528,5 @@
         elseif(count($values) == 2)
         {
-            for($i=0;$i<4;$i++)
+            for($i=0;$i<4;++$i)
             {
                 $return[$shorthands[$property][$i]] = (($i % 2 != 0)) ? $values[1].$important : $values[0].$important;
@@ -535,5 +535,5 @@
         else
         {
-            for($i=0;$i<4;$i++)
+            for($i=0;$i<4;++$i)
             {
                 $return[$shorthands[$property][$i]] = $values[0].$important;
@@ -558,5 +558,5 @@
         $output = array();
         $num = 0;
-        for($i = 0, $len = strlen($string);$i < $len; $i++)
+        for($i = 0, $len = strlen($string);$i < $len; ++$i)
         {
             switch($status)
@@ -619,5 +619,5 @@
 
                 $important = '';
-                for($i = 0; $i < 4; $i++)
+                for($i = 0; $i < 4; ++$i)
                 {
                     $val = $array[$value[$i]];
@@ -665,5 +665,5 @@
 
         $str_value = csstidy_optimise::explode_ws(',',$str_value);
-        for($i = 0; $i < count($str_value); $i++)
+        for($i = 0; $i < count($str_value); ++$i)
         {
             $have['clip'] = FALSE; $have['pos'] = FALSE;
@@ -672,5 +672,5 @@
             $str_value[$i] = csstidy_optimise::explode_ws(' ',trim($str_value[$i]));
 
-            for($j = 0; $j < count($str_value[$i]); $j++)
+            for($j = 0; $j < count($str_value[$i]); ++$j)
             {
                 if($have['bg'] === FALSE && (substr($str_value[$i][$j],0,4) == 'url(' || $str_value[$i][$j] === 'none'))
@@ -743,5 +743,5 @@
         $important = '';
 
-        for($i = 0; $i < $number_of_values; $i++)
+        for($i = 0; $i < $number_of_values; ++$i)
         {
             foreach($background_prop_default as $bg_property => $default_value)
Index: /trunk/library/csstidy/css_optimiser.php
===================================================================
--- /trunk/library/csstidy/css_optimiser.php	(revision 4414)
+++ /trunk/library/csstidy/css_optimiser.php	(revision 7655)
@@ -322,5 +322,5 @@
 			{
 				echo '<dt>'.$line.'</dt>';
-				for($i = 0; $i < count($array); $i++)
+				for($i = 0; $i < count($array); ++$i)
 				{
 					echo '<dd class="'.$array[$i]['t'].'">'.$array[$i]['m'].'</dd>';
Index: /trunk/library/csstidy/class.csstidy.php
===================================================================
--- /trunk/library/csstidy/class.csstidy.php	(revision 5135)
+++ /trunk/library/csstidy/class.csstidy.php	(revision 7655)
@@ -367,5 +367,5 @@
 			break;
 		}
-		$i++;
+		++$i;
 	}
 
@@ -419,5 +419,5 @@
 	$template = explode('|',$content);
 
-	for ($i = 0; $i < count($template); $i++ )
+	for ($i = 0; $i < count($template); ++$i )
 	{
 		$this->template[$i] = $template[$i];
@@ -470,5 +470,5 @@
     $cur_comment = '';
 
-    for ($i = 0, $size = strlen($string); $i < $size; $i++ )
+    for ($i = 0, $size = strlen($string); $i < $size; ++$i )
     {
         if($string{$i} == "\n" || $string{$i} == "\r")
@@ -812,5 +812,5 @@
             {
                 $this->status = $this->from;
-                $i++;
+                ++$i;
                 $this->_add_token(COMMENT, $cur_comment);
                 $cur_comment = '';
Index: /trunk/library/ckeditor/plugins/aspell/spellerpages/server-scripts/spellchecker.php
===================================================================
--- /trunk/library/ckeditor/plugins/aspell/spellerpages/server-scripts/spellchecker.php	(revision 5081)
+++ /trunk/library/ckeditor/plugins/aspell/spellerpages/server-scripts/spellchecker.php	(revision 7655)
@@ -82,5 +82,5 @@
 	# open temp file, add the submitted text.
 	if( $fh = fopen( $tempfile, 'w' )) {
-		for( $i = 0; $i < count( $textinputs ); $i++ ) {
+		for( $i = 0; $i < count( $textinputs ); ++$i ) {
 			$text = urldecode( $textinputs[$i] );
                         $text = html_entity_decode ($text , ENT_QUOTES , 'UTF-8'  );
@@ -122,7 +122,7 @@
 					}
 					print_suggs_elem( $suggs, $index, $text_input_index );
-					$index++;
+					++$index;
 				} elseif( $chardesc == '*' ) {
-					$text_input_index++;
+					++$text_input_index;
 					print_textindex_decl( $text_input_index );
 					$index = 0;
Index: /trunk/library/Net/Sieve.php
===================================================================
--- /trunk/library/Net/Sieve.php	(revision 6118)
+++ /trunk/library/Net/Sieve.php	(revision 7655)
@@ -929,5 +929,5 @@
         $data = preg_split('/\r?\n/', $this->_toUpper($data), -1, PREG_SPLIT_NO_EMPTY);
 
-        for ($i = 0; $i < count($data); $i++) {
+        for ($i = 0; $i < count($data); ++$i) {
             if (!preg_match('/^"([A-Z]+)"( "(.*)")?$/', $data[$i], $matches)) {
                 continue;
@@ -1120,5 +1120,5 @@
 
                 $response .= $line . "\r\n";
-                $referralCount++;
+                ++$referralCount;
             }
         }
Index: /trunk/library/Net/SMTP.php
===================================================================
--- /trunk/library/Net/SMTP.php	(revision 5316)
+++ /trunk/library/Net/SMTP.php	(revision 7655)
@@ -332,5 +332,5 @@
         }
 
-        for ($i = 0; $i <= $this->_pipelined_commands; $i++) {
+        for ($i = 0; $i <= $this->_pipelined_commands; ++$i) {
             while ($line = $this->_socket->readLine()) {
                 $this->_debug("Recv: $line");
@@ -1112,5 +1112,5 @@
                     $end = $size;
                 } else {
-                    for (; $end < $size; $end++) {
+                    for (; $end < $size; ++$end) {
                         if ($data[$end] != "\n") {
                             break;
Index: /trunk/library/PEAR/PEAR/Frontend/CLI.php
===================================================================
--- /trunk/library/PEAR/PEAR/Frontend/CLI.php	(revision 5146)
+++ /trunk/library/PEAR/PEAR/Frontend/CLI.php	(revision 7655)
@@ -271,5 +271,5 @@
                         echo $this->bold("* Enter an answer for #" . $i . ": ({$prompts[$var]})\n");
                     }
-                    $i++;
+                    ++$i;
                 }
             }
@@ -579,5 +579,5 @@
     {
         $highest = 1;
-        for ($i = 0; $i < count($columns); $i++) {
+        for ($i = 0; $i < count($columns); ++$i) {
             $col = &$columns[$i];
             if (isset($colparams[$i]) && !empty($colparams[$i]['wrap'])) {
@@ -642,5 +642,5 @@
             $width = $widest;
         } else {
-            for ($i = 0; $i < $ncols; $i++) {
+            for ($i = 0; $i < $ncols; ++$i) {
                 if (!isset($width[$i])) {
                     $width[$i] = $widest[$i];
@@ -672,5 +672,5 @@
         }
 
-        for ($i = 0; $i < count($table_data); $i++) {
+        for ($i = 0; $i < count($table_data); ++$i) {
             extract($table_data[$i]);
             if (!is_array($rowparams)) {
@@ -691,12 +691,12 @@
                 }
             } else {
-                for ($c = 0; $c < count($data); $c++) {
+                for ($c = 0; $c < count($data); ++$c) {
                     $rowlines[$c] = array($data[$c]);
                 }
             }
 
-            for ($r = 0; $r < $height; $r++) {
+            for ($r = 0; $r < $height; ++$r) {
                 $rowtext = '';
-                for ($c = 0; $c < count($data); $c++) {
+                for ($c = 0; $c < count($data); ++$c) {
                     if (isset($colparams[$c])) {
                         $attribs = array_merge($rowparams, $colparams);
Index: /trunk/library/PEAR/PEAR/Downloader.php
===================================================================
--- /trunk/library/PEAR/PEAR/Downloader.php	(revision 5146)
+++ /trunk/library/PEAR/PEAR/Downloader.php	(revision 7655)
@@ -1330,5 +1330,5 @@
         $installOrder = Structures_Graph_Manipulator_TopologicalSorter::sort($depgraph);
         $ret = array();
-        for ($i = 0, $count = count($installOrder); $i < $count; $i++) {
+        for ($i = 0, $count = count($installOrder); $i < $count; ++$i) {
             foreach ($installOrder[$i] as $index => $sortedpackage) {
                 $data = &$installOrder[$i][$index]->getData();
Index: /trunk/library/PEAR/PEAR/RunTest.php
===================================================================
--- /trunk/library/PEAR/PEAR/RunTest.php	(revision 6057)
+++ /trunk/library/PEAR/PEAR/RunTest.php	(revision 7655)
@@ -397,5 +397,5 @@
 
 
-            for ($i = 0; $i < $numLines; $i++) {
+            for ($i = 0; $i < $numLines; ++$i) {
                 if (isset($lines[$i]) && substr($lines[$i], 0, 9) == 'namespace') {
                     $namespace         = substr($lines[$i], 10, -1);
Index: /trunk/library/PEAR/PEAR/PackageFile/v2/Validator.php
===================================================================
--- /trunk/library/PEAR/PEAR/PackageFile/v2/Validator.php	(revision 5146)
+++ /trunk/library/PEAR/PEAR/PackageFile/v2/Validator.php	(revision 7655)
@@ -1881,5 +1881,5 @@
         }
 /*
-        for ($i = 0; $i < sizeof($tokens); $i++) {
+        for ($i = 0; $i < sizeof($tokens); ++$i) {
             @list($token, $data) = $tokens[$i];
             if (is_string($token)) {
@@ -1912,5 +1912,5 @@
         $inquote = false;
         $interface = false;
-        for ($i = 0; $i < sizeof($tokens); $i++) {
+        for ($i = 0; $i < sizeof($tokens); ++$i) {
             if (is_array($tokens[$i])) {
                 list($token, $data) = $tokens[$i];
Index: /trunk/library/PEAR/PEAR/PackageFile/v1.php
===================================================================
--- /trunk/library/PEAR/PEAR/PackageFile/v1.php	(revision 5146)
+++ /trunk/library/PEAR/PEAR/PackageFile/v1.php	(revision 7655)
@@ -1118,5 +1118,5 @@
                         array('index' => $i));
                 }
-                $i++;
+                ++$i;
             }
             if (!$haslead) {
@@ -1165,5 +1165,5 @@
                         array('index' => $i));
                 }
-                $i++;
+                ++$i;
             }
         }
@@ -1179,5 +1179,5 @@
                         array('index' => $i));
                 }
-                $i++;
+                ++$i;
             }
         }
@@ -1375,5 +1375,5 @@
         $tokens = token_get_all($contents);
 /*
-        for ($i = 0; $i < sizeof($tokens); $i++) {
+        for ($i = 0; $i < sizeof($tokens); ++$i) {
             @list($token, $data) = $tokens[$i];
             if (is_string($token)) {
@@ -1406,5 +1406,5 @@
         $inquote = false;
         $interface = false;
-        for ($i = 0; $i < sizeof($tokens); $i++) {
+        for ($i = 0; $i < sizeof($tokens); ++$i) {
             if (is_array($tokens[$i])) {
                 list($token, $data) = $tokens[$i];
Index: /trunk/library/PEAR/PEAR/PackageFile/v2.php
===================================================================
--- /trunk/library/PEAR/PEAR/PackageFile/v2.php	(revision 5146)
+++ /trunk/library/PEAR/PEAR/PackageFile/v2.php	(revision 7655)
@@ -329,7 +329,7 @@
         $mymaintainers = $this->getMaintainers();
         $yourmaintainers = $pf1->getMaintainers();
-        for ($i1 = 0; $i1 < count($yourmaintainers); $i1++) {
+        for ($i1 = 0; $i1 < count($yourmaintainers); ++$i1) {
             $reset = false;
-            for ($i2 = 0; $i2 < count($mymaintainers); $i2++) {
+            for ($i2 = 0; $i2 < count($mymaintainers); ++$i2) {
                 if ($mymaintainers[$i2]['handle'] == $yourmaintainers[$i1]['handle']) {
                     if ($mymaintainers[$i2]['role'] != $yourmaintainers[$i1]['role']) {
@@ -1213,5 +1213,5 @@
             }
 
-            for ($i = 0; $i < count($releases['configureoption']); $i++) {
+            for ($i = 0; $i < count($releases['configureoption']); ++$i) {
                 $releases['configureoption'][$i] = $releases['configureoption'][$i]['attribs'];
             }
Index: /trunk/library/PEAR/PEAR/ErrorStack.php
===================================================================
--- /trunk/library/PEAR/PEAR/ErrorStack.php	(revision 5146)
+++ /trunk/library/PEAR/PEAR/ErrorStack.php	(revision 7655)
@@ -845,10 +845,10 @@
                   $backtrace[$functionframe]['function'] == 'eval' &&
                   isset($backtrace[$functionframe + 1])) {
-                $functionframe++;
+                ++$functionframe;
             }
         }
         if (isset($backtrace[$frame])) {
             if (!isset($backtrace[$frame]['file'])) {
-                $frame++;
+                ++$frame;
             }
             $funcbacktrace = $backtrace[$functionframe];
Index: /trunk/library/PEAR/PEAR/Command/Remote.php
===================================================================
--- /trunk/library/PEAR/PEAR/Command/Remote.php	(revision 5146)
+++ /trunk/library/PEAR/PEAR/Command/Remote.php	(revision 7655)
@@ -793,5 +793,5 @@
                         $output .= "deleted $path\n";
                     }
-                    $num++;
+                    ++$num;
                 } elseif ($verbose >= 1) {
                     $output .= "failed to delete $path $php_errormsg\n";
Index: /trunk/library/PEAR/PEAR/Command/Test.php
===================================================================
--- /trunk/library/PEAR/PEAR/Command/Test.php	(revision 5146)
+++ /trunk/library/PEAR/PEAR/Command/Test.php	(revision 7655)
@@ -289,5 +289,5 @@
             }
 
-            $j++;
+            ++$j;
         }
 
Index: /trunk/library/PEAR/System.php
===================================================================
--- /trunk/library/PEAR/System.php	(revision 5146)
+++ /trunk/library/PEAR/System.php	(revision 7655)
@@ -323,5 +323,5 @@
 
         $count_args = count($args);
-        for ($i = 0; $i < $count_args; $i++) {
+        for ($i = 0; $i < $count_args; ++$i) {
             if ($args[$i] == '>') {
                 $mode = 'wb';
@@ -578,5 +578,5 @@
         $do_files = $do_dirs = true;
         $args_count = count($args);
-        for ($i = 0; $i < $args_count; $i++) {
+        for ($i = 0; $i < $args_count; ++$i) {
             switch ($args[$i]) {
                 case '-type':
@@ -588,5 +588,5 @@
                         }
                     }
-                    $i++;
+                    ++$i;
                     break;
                 case '-name':
@@ -596,5 +596,5 @@
                     $name = strtr($name, array('\?' => '.', '\*' => '.*'));
                     $patterns[] = '('.$name.')';
-                    $i++;
+                    ++$i;
                     break;
                 case '-maxdepth':
@@ -616,5 +616,5 @@
             $ret = array();
             $files_count = count($files);
-            for ($i = 0; $i < $files_count; $i++) {
+            for ($i = 0; $i < $files_count; ++$i) {
                 // only search in the part of the file below the current directory
                 $filepart = basename($files[$i]);
Index: /trunk/library/mime/mimeDecode.php
===================================================================
--- /trunk/library/mime/mimeDecode.php	(revision 6063)
+++ /trunk/library/mime/mimeDecode.php	(revision 7655)
@@ -326,5 +326,5 @@
 
                     $parts = $this->_boundarySplit($body, $content_type['other']['boundary']);
-                    for ($i = 0; $i < count($parts); $i++) {
+                    for ($i = 0; $i < count($parts); ++$i) {
                         list($part_header, $part_body) = $this->_splitBodyHeader($parts[$i]);
                         $part = $this->_decode($part_header, $part_body, $default_ctype);
@@ -386,5 +386,5 @@
                 $return[$prepend . $mime_number] = &$structure;
             }
-            for ($i = 0; $i < count($structure->parts); $i++) {
+            for ($i = 0; $i < count($structure->parts); ++$i) {
 
             
@@ -521,5 +521,5 @@
             $escaped = false;
             if ($c == '\\') {
-                $i++;
+                ++$i;
                 if ($i == $l-1) { // end of string.
                     break;
@@ -535,5 +535,5 @@
                     $val = '';
                     $key = trim($key);
-                    $i++;
+                    ++$i;
                     continue;
                 }
@@ -547,5 +547,5 @@
                 }
                 $key .= $c;
-                $i++;
+                ++$i;
                 continue;
             }
@@ -556,5 +556,5 @@
                 // not in quote yet.
                 if ((!strlen($val) || $lq !== false) && $c == ' ' ||  $c == "\t") {
-                    $i++;
+                    ++$i;
                     continue; // skip leading spaces after '=' or after '"'
                 }
@@ -565,5 +565,5 @@
                     // but we will handle it as a merged part of the string..
                     $val = !strlen(trim($val)) ? '' : trim($val);
-                    $i++;
+                    ++$i;
                     continue;
                 }
@@ -593,10 +593,10 @@
                     $key = '';
                     $lq = false;
-                    $i++;
+                    ++$i;
                     continue;
                 }
 
                 $val .= $c;
-                $i++;
+                ++$i;
                 continue;
             }
@@ -608,5 +608,5 @@
                 $lq = $q;
                 $q = false;
-                $i++;
+                ++$i;
                 continue;
             }
@@ -614,5 +614,5 @@
             // normal char inside of quoted string..
             $val.= $c;
-            $i++;
+            ++$i;
         }
         
@@ -668,5 +668,5 @@
 
         $len = count($tmp) -1;
-        for ($i = 1; $i < $len; $i++) {
+        for ($i = 1; $i < $len; ++$i) {
             if (strlen(trim($tmp[$i]))) {
                 $parts[] = $tmp[$i];
@@ -792,5 +792,5 @@
         preg_match_all("/begin ([0-7]{3}) (.+)\r?\n(.+)\r?\nend/Us", $input, $matches);
 
-        for ($j = 0; $j < count($matches[3]); $j++) {
+        for ($j = 0; $j < count($matches[3]); ++$j) {
 
             $str      = $matches[3][$j];
@@ -802,5 +802,5 @@
             $strlen = count($str);
 
-            for ($i = 0; $i < $strlen; $i++) {
+            for ($i = 0; $i < $strlen; ++$i) {
                 $pos = 1;
                 $d = 0;
@@ -943,5 +943,5 @@
             // Multiple headers with this name
             if (is_array($headers[$hdr_name])) {
-                for ($i = 0; $i < count($hdr_value); $i++) {
+                for ($i = 0; $i < count($hdr_value); ++$i) {
                     $output .= Mail_mimeDecode::_getXML_helper($hdr_name, $hdr_value[$i], $indent);
                 }
@@ -954,5 +954,5 @@
 
         if (!empty($input->parts)) {
-            for ($i = 0; $i < count($input->parts); $i++) {
+            for ($i = 0; $i < count($input->parts); ++$i) {
                 $output .= $crlf . str_repeat($htab, $indent) . '<mimepart>' . $crlf .
                            Mail_mimeDecode::_getXML($input->parts[$i], $indent+1) .
Index: /trunk/library/mime/mimePart.php
===================================================================
--- /trunk/library/mime/mimePart.php	(revision 6057)
+++ /trunk/library/mime/mimePart.php	(revision 7655)
@@ -283,5 +283,5 @@
             $encoded['body'] = ''; 
 
-            for ($i = 0; $i < count($this->_subparts); $i++) {
+            for ($i = 0; $i < count($this->_subparts); ++$i) {
                 $encoded['body'] .= '--' . $boundary . $eol;
                 $tmp = $this->_subparts[$i]->encode();
@@ -393,5 +393,5 @@
 
         if (count($this->_subparts)) {
-            for ($i = 0; $i < count($this->_subparts); $i++) {
+            for ($i = 0; $i < count($this->_subparts); ++$i) {
                 fwrite($fh, $f_eol . '--' . $boundary . $eol);
                 $res = $this->_subparts[$i]->_encodePartToFile($fh);
@@ -581,5 +581,5 @@
                 $char = $line[$i];
                 $dec  = ord($char);
-                $i++;
+                ++$i;
 
                 if (($dec == 32) && (!isset($line[$i]))) {
@@ -688,5 +688,5 @@
                 $value = '';
             }
-            $headCount++;
+            ++$headCount;
         }
 
@@ -921,5 +921,5 @@
         $strlen = strlen($string);
 
-        for ($q=$p=$i=0; $i < $strlen; $i++) {
+        for ($q=$p=$i=0; $i < $strlen; ++$i) {
             if ($string[$i] == "\""
                 && (empty($string[$i-1]) || $string[$i-1] != "\\")
@@ -1103,5 +1103,5 @@
             $prev  = '';
 
-            for ($i=1; $i<=$length; $i++) {
+            for ($i=1; $i<=$length; ++$i) {
                 // See #17311
                 $chunk = mb_substr($str, $start, $i-$start, $charset);
@@ -1134,5 +1134,5 @@
             $regexp = '/([\x22-\x29\x2C\x2E\x3A-\x40\x5B-\x60\x7B-\x7E\x80-\xFF])/';
 
-            for ($i=0; $i<=$length; $i++) {
+            for ($i=0; $i<=$length; ++$i) {
                 $char = mb_substr($str, $i, 1, $charset);
                 // RFC recommends underline (instead of =20) in place of the space
Index: /trunk/library/mime/mime.php
===================================================================
--- /trunk/library/mime/mime.php	(revision 6266)
+++ /trunk/library/mime/mime.php	(revision 7655)
@@ -895,5 +895,5 @@
         case !$text && !$html && $attachments:
             $message =& $this->_addMixedPart();
-            for ($i = 0; $i < count($this->_parts); $i++) {
+            for ($i = 0; $i < count($this->_parts); ++$i) {
                 $this->_addAttachmentPart($message, $this->_parts[$i]);
             }
@@ -903,5 +903,5 @@
             $message =& $this->_addMixedPart();
             $this->_addTextPart($message, $this->_txtbody);
-            for ($i = 0; $i < count($this->_parts); $i++) {
+            for ($i = 0; $i < count($this->_parts); ++$i) {
                 $this->_addAttachmentPart($message, $this->_parts[$i]);
             }
@@ -930,5 +930,5 @@
                 $ht =& $this->_addRelatedPart($message);
                 $this->_addHtmlPart($ht);
-                for ($i = 0; $i < count($this->_html_images); $i++) {
+                for ($i = 0; $i < count($this->_html_images); ++$i) {
                     $this->_addHtmlImagePart($ht, $this->_html_images[$i]);
                 }
@@ -939,5 +939,5 @@
                 $message =& $this->_addRelatedPart($null);
                 $this->_addHtmlPart($message);
-                for ($i = 0; $i < count($this->_html_images); $i++) {
+                for ($i = 0; $i < count($this->_html_images); ++$i) {
                     $this->_addHtmlImagePart($message, $this->_html_images[$i]);
                 }
@@ -958,5 +958,5 @@
                 $this->_addHtmlPart($message);
             }
-            for ($i = 0; $i < count($this->_html_images); $i++) {
+            for ($i = 0; $i < count($this->_html_images); ++$i) {
                 $this->_addHtmlImagePart($message, $this->_html_images[$i]);
             }
@@ -973,5 +973,5 @@
                 $this->_addHtmlPart($message);
             }
-            for ($i = 0; $i < count($this->_parts); $i++) {
+            for ($i = 0; $i < count($this->_parts); ++$i) {
                 $this->_addAttachmentPart($message, $this->_parts[$i]);
             }
@@ -989,8 +989,8 @@
             }
             $this->_addHtmlPart($rel);
-            for ($i = 0; $i < count($this->_html_images); $i++) {
+            for ($i = 0; $i < count($this->_html_images); ++$i) {
                 $this->_addHtmlImagePart($rel, $this->_html_images[$i]);
             }
-            for ($i = 0; $i < count($this->_parts); $i++) {
+            for ($i = 0; $i < count($this->_parts); ++$i) {
                 $this->_addAttachmentPart($message, $this->_parts[$i]);
             }
@@ -1009,8 +1009,8 @@
             }
 			
-            for ($i = 0; $i < count($this->_html_images); $i++) {
+            for ($i = 0; $i < count($this->_html_images); ++$i) {
                 $this->_addHtmlImagePart($message, $this->_html_images[$i]);
             }
-            for ($i = 0; $i < count($this->_parts); $i++) {
+            for ($i = 0; $i < count($this->_parts); ++$i) {
                 $this->_addAttachmentPart($message, $this->_parts[$i]);
             }
Index: /trunk/library/iCalcreator/iCalUtilityFunctions.class.php
===================================================================
--- /trunk/library/iCalcreator/iCalUtilityFunctions.class.php	(revision 5146)
+++ /trunk/library/iCalcreator/iCalUtilityFunctions.class.php	(revision 7655)
@@ -352,5 +352,5 @@
     $output = array();
     $val    = null;
-    for( $ix=0; $ix < strlen( $duration ); $ix++ ) {
+    for( $ix=0; $ix < strlen( $duration ); ++$ix ) {
       switch( strtoupper( substr( $duration, $ix, 1 ))) {
        case 'W':
@@ -697,5 +697,5 @@
         $yeardays   = $weekno = 0;
         $yeardaycnt = array();
-        for( $m = 1; $m <= 12; $m++ ) { // count up and update up-counters
+        for( $m = 1; $m <= 12; ++$m ) { // count up and update up-counters
           $daycnts[$m] = array();
           $weekdaycnt = array();
@@ -703,8 +703,8 @@
             $yeardaycnt[$dn] = $weekdaycnt[$dn] = 0;
           $mcnt     = date( 't', mktime( 0, 0, 0, $m, 1, $wdate['year'] ));
-          for( $d   = 1; $d <= $mcnt; $d++ ) {
+          for( $d   = 1; $d <= $mcnt; ++$d ) {
             $daycnts[$m][$d] = array();
             if( isset( $recur['BYYEARDAY'] )) {
-              $yeardays++;
+              ++$yeardays;
               $daycnts[$m][$d]['yearcnt_up'] = $yeardays;
             }
@@ -880,5 +880,5 @@
         else {
             /* update result array if BYSETPOS is set */
-          $countcnt++;
+          ++$countcnt;
           if( $startdatets <= $wdatets ) { // only output within period
             $result[$wdatets] = TRUE;
@@ -939,5 +939,5 @@
        //echo "recur ".implode('-',iCalUtilityFunctions::_date_time_string(date('Y-m-d H:i:s',$bysetposarr1[$ix]),6))."<br />\n";//test
               }
-              $countcnt++;
+              ++$countcnt;
             }
             if( isset( $recur['COUNT'] ) && ( $countcnt >= $recur['COUNT'] ))
Index: /trunk/library/iCalcreator/iCalcreator.class.php
===================================================================
--- /trunk/library/iCalcreator/iCalcreator.class.php	(revision 5316)
+++ /trunk/library/iCalcreator/iCalcreator.class.php	(revision 7655)
@@ -394,5 +394,5 @@
             if( $propix != $xpropno )
               $reduced[$xpropkey] = $xpropvalue;
-            $xpropno++;
+            ++$xpropno;
           }
         }
@@ -450,5 +450,5 @@
                                     : array( $xpropkey, $this->xprop[$xpropkey]['value'] );
             else
-              $xpropno++;
+              ++$xpropno;
           }
           return FALSE; // not found ??
@@ -766,5 +766,5 @@
           return TRUE;
         }
-        $cix1dC++;
+        ++$cix1dC;
       }
       elseif( !$argType && ($arg1 == $component->getProperty( 'uid' ))) {
@@ -817,5 +817,5 @@
          if( $index == $cix1gC )
            return $component->copy();
-         $cix1gC++;
+         ++$cix1gC;
       }
       elseif( !$argType && ($arg1 == $component->getProperty( 'uid' ))) {
@@ -1219,5 +1219,5 @@
           return TRUE;
         }
-        $cix1sC++;
+        ++$cix1sC;
       }
       elseif( !$argType && ( $arg1 == $component2->getProperty( 'uid' ))) { // UID insert/replace
@@ -1289,5 +1289,5 @@
     elseif( 'vtimezone' == $b->objName )          return  1;
     $sortkeys = array( 'year', 'month', 'day', 'hour', 'min', 'sec' );
-    for( $k = 0; $k < 4 ; $k++ ) {
+    for( $k = 0; $k < 4 ; ++$k ) {
       if(        empty( $a->srtk[$k] ))           return -1;
       elseif(    empty( $b->srtk[$k] ))           return  1;
@@ -1376,5 +1376,5 @@
         $line = substr( $line, 0, ( strlen( $line ) - strlen( "\n\r" ))).'\n';
       if(     'BEGIN:VCALENDAR' == strtoupper( substr( $line, 0, 15 ))) {
-        $calsync++;
+        ++$calsync;
         continue;
       }
@@ -1420,5 +1420,5 @@
         if( $newProp ) {
           $newProp = FALSE;
-          $lastix++;
+          ++$lastix;
           $proprows[$lastix]  = $line;
         }
@@ -1446,5 +1446,5 @@
             /* get propname */
         $cix = $propname = null;
-        for( $cix=0, $clen = strlen( $line ); $cix < $clen; $cix++ ) {
+        for( $cix=0, $clen = strlen( $line ); $cix < $clen; ++$cix ) {
           if( in_array( $line[$cix], array( ':', ';' )))
             break;
@@ -1460,5 +1460,5 @@
         $attrix = -1;
         $strlen = strlen( $line );
-        for( $cix=0; $cix < $strlen; $cix++ ) {
+        for( $cix=0; $cix < $strlen; ++$cix ) {
           if((       ':'   == $line[$cix] )             &&
                    ( '://' != substr( $line, $cix, 3 )) &&
@@ -1500,9 +1500,9 @@
           $content  = explode( ',', $line );
           $clen     = count( $content );
-          for( $cix = 0; $cix < $clen; $cix++ ) {
+          for( $cix = 0; $cix < $clen; ++$cix ) {
             if( "\\" == substr( $content[$cix], -1 )) {
               $content[$cix] .= ','.$content[$cix + 1];
               unset( $content[$cix + 1] );
-              $cix++;
+              ++$cix;
             }
           }
@@ -2740,5 +2740,5 @@
         if( $fno < $cnt )
           $content .= ',';
-        $fno++;
+        ++$fno;
       }
       $output .= $this->_createElement( 'FREEBUSY', $attributes, $content );
@@ -3122,5 +3122,5 @@
         if( $rno < $cnt )
           $content .= ',';
-        $rno++;
+        ++$rno;
       }
       $output    .= $this->_createElement( 'RDATE', $attributes, $content );
@@ -3930,5 +3930,5 @@
     $length = 6;
     $str    = null;
-    for( $p = 0; $p < $length; $p++ )
+    for( $p = 0; $p < $length; ++$p )
       $unique .= $base{mt_rand( $start, $end )};
     $this->uid = array( 'params' => null );
@@ -4335,5 +4335,5 @@
                 }
                 $content2 .= $content21.$content22;
-                $bydaycnt++;
+                ++$bydaycnt;
               }
               else {
@@ -4343,5 +4343,5 @@
                 else {
                   $content22 .= $valuePart;
-                  $bydaycnt++;
+                  ++$bydaycnt;
                 }
                 $content2 .= $content21.$content22;
@@ -4812,5 +4812,5 @@
             if( $propix != $xpropno )
               $reduced[$xpropkey] = $xpropvalue;
-            $xpropno++;
+            ++$xpropno;
           }
         }
@@ -5029,5 +5029,5 @@
                                     : array( $xpropkey, $this->xprop[$xpropkey]['value'] );
             else
-              $xpropno++;
+              ++$xpropno;
           }
           return FALSE; // not found ??
@@ -5054,5 +5054,5 @@
       return FALSE;
     $arglist[0] = strtoupper( $arglist[0] );
-    for( $argix=$numargs; $argix < 12; $argix++ ) {
+    for( $argix=$numargs; $argix < 12; ++$argix ) {
       if( !isset( $arglist[$argix] ))
         $arglist[$argix] = null;
@@ -5212,5 +5212,5 @@
       if( $newProp ) {
         $newProp = FALSE;
-        $lastix++;
+        ++$lastix;
         $proprows[$lastix]  = $line;
       }
@@ -5240,5 +5240,5 @@
             /* get propname, (problem with x-properties, otherwise in previous loop) */
       $cix = $propname = null;
-      for( $cix=0, $clen = strlen( $line ); $cix < $clen; $cix++ ) {
+      for( $cix=0, $clen = strlen( $line ); $cix < $clen; ++$cix ) {
         if( in_array( $line[$cix], array( ':', ';' )))
           break;
@@ -5259,5 +5259,5 @@
       $controlCN = false;
 
-      for( $cix=0; $cix < $clen; $cix++ ) {
+      for( $cix=0; $cix < $clen; ++$cix ) {
 
         if('"' == $line[$cix] && $controlCN)  $controlCN = false;
@@ -5315,9 +5315,9 @@
             $content  = explode( ',', $line );
             $clen     = count( $content );
-            for( $cix = 0; $cix < $clen; $cix++ ) {
+            for( $cix = 0; $cix < $clen; ++$cix ) {
               if( "\\" == substr($content[$cix], -1)) {
                 $content[$cix] .= ','.$content[$cix + 1];
                 unset($content[$cix + 1]);
-                $cix++;
+                ++$cix;
               }
             }
@@ -5522,5 +5522,5 @@
           return TRUE;
         }
-        $cix2dC++;
+        ++$cix2dC;
       }
       elseif( !$argType && ($arg1 == $component->getProperty( 'uid' ))) {
@@ -5574,5 +5574,5 @@
          if( $index == $cix2gC )
            return $component->copy();
-         $cix2gC++;
+         ++$cix2gC;
       }
       elseif( !$argType && ( $arg1 == $component->getProperty( 'uid' ))) {
@@ -5671,5 +5671,5 @@
           return TRUE;
         }
-        $cix2sC++;
+        ++$cix2sC;
       }
       elseif( !$argType && ( $arg1 == $component2->getProperty( 'uid' ))) { // UID insert/replace
@@ -5751,5 +5751,5 @@
       $bytecnt = strlen( $tmp );
       $charCnt = $ix = 0;
-      for( $ix = 0; $ix < $bytecnt; $ix++ ) {
+      for( $ix = 0; $ix < $bytecnt; ++$ix ) {
         if(( 73 < $charCnt ) && ( '\n' == substr( $tmp, $ix, $eolcharlen ))) {
           $ix += $eolcharlen;
Index: /trunk/library/CssToInlineStyles/css_to_inline_styles.php
===================================================================
--- /trunk/library/CssToInlineStyles/css_to_inline_styles.php	(revision 5745)
+++ /trunk/library/CssToInlineStyles/css_to_inline_styles.php	(revision 7655)
@@ -409,5 +409,5 @@
 
 			// increment
-			$i++;
+			++$i;
 		}
 
Index: /trunk/mobile/inc/class.ui_mobilecalendar.inc.php
===================================================================
--- /trunk/mobile/inc/class.ui_mobilecalendar.inc.php	(revision 6057)
+++ /trunk/mobile/inc/class.ui_mobilecalendar.inc.php	(revision 7655)
@@ -204,10 +204,10 @@
 				
 				//identificando os dias do mês anterior
-				for($i = 0; $i < $day_of_week_first_day; $i++) {
+				for($i = 0; $i < $day_of_week_first_day; ++$i) {
 					$days_of_calendar[$i] = array("day" => ($last_day_of_before_month-$day_of_week_first_day+$i+1), "month" => $last_month_year[0], "year" => $last_month_year[1], "other_month" => true);					
 				}
 				
 				//adicionando os dias do mês especificado
-				for($i = 0; $i < ($last_day_of_month ); $i++) {
+				for($i = 0; $i < ($last_day_of_month ); ++$i) {
 					$days_of_calendar[$i+$day_of_week_first_day] = array("day" => $i+1, "month" => $month, "year" => $year, "other_month" => false);
 				}
@@ -234,5 +234,5 @@
 				$this->template->parse('events_box','bar_block',true);
 				
-				for($i = 0; $i < 7; $i++) {
+				for($i = 0; $i < 7; ++$i) {
 					$this->template->set_var("week_day", $this->shortDaysOfWeek[$i]);
 					$this->template->parse('week_day_box','calendar_header_block',true);
Index: /trunk/mobile/inc/class.ui_mobilemail.inc.php
===================================================================
--- /trunk/mobile/inc/class.ui_mobilemail.inc.php	(revision 6714)
+++ /trunk/mobile/inc/class.ui_mobilemail.inc.php	(revision 7655)
@@ -573,5 +573,5 @@
 			{
 				// Geração das páginas
-				for ($i = 1; $i <= $number_of_pages ; $i++)
+				for ($i = 1; $i <= $number_of_pages ; ++$i)
 				{
 
Index: /trunk/mobile/inc/class.ui_mobilecc.inc.php
===================================================================
--- /trunk/mobile/inc/class.ui_mobilecc.inc.php	(revision 5928)
+++ /trunk/mobile/inc/class.ui_mobilecc.inc.php	(revision 7655)
@@ -225,8 +225,8 @@
 				$this->template->set_var('href_next',"index.php?menuaction=mobile.".
 										 "ui_mobilecc.change_letter&letter=".$last_letter);
-				$first_letter++;
-			}
-			
-			for($i=1;$i<=$max_letters;$i++) { //Roda as letras
+				++$first_letter;
+			}
+			
+			for($i=1;$i<=$max_letters;++$i) { //Roda as letras
 					$this->template->set_var("href","index.php?menuaction=mobile.".
 											"ui_mobilecc.change_letter&letter=".$first_letter);
@@ -238,5 +238,5 @@
 					$this->template->set_var("letter",strtoupper($first_letter));
 					$this->template->fp("pagging_letters","pagging_block",true);
-					$first_letter++;
+					++$first_letter;
 			}
 			
@@ -846,5 +846,5 @@
 	
 				if ( !empty($params['email']) || !empty($params['id_connection_email']) ){
-					$cont++;
+					++$cont;
 				
 					if (empty($params['id_connection_email'])){
@@ -860,5 +860,5 @@
 	
 				if ( !empty($params['phone']) || !empty($params['id_connection_phone']) ){
-					$cont++;
+					++$cont;
 	
 					if (empty($params['id_connection_phone'])){
Index: /trunk/mobile/index.php
===================================================================
--- /trunk/mobile/index.php	(revision 5303)
+++ /trunk/mobile/index.php	(revision 7655)
@@ -14,5 +14,5 @@
 	}
 	
-	$fwConstruct .= $REQUEST_URI;
+	$fwConstruct .= urldecode($REQUEST_URI);
 	
 	if(!$GLOBALS['sessionid'])
Index: /trunk/header.session.inc.php
===================================================================
--- /trunk/header.session.inc.php	(revision 7126)
+++ /trunk/header.session.inc.php	(revision 7655)
@@ -31,5 +31,5 @@
 			$ip_exploded = explode(",",$new_ip);
 			$new_ip = "";
-			for($i=0;$i<2;$i++)
+			for($i=0;$i<2;++$i)
 				$new_ip .= isset($ip_exploded[$i])?(($i==1?",":"").trim($ip_exploded[$i])):("");
 			if(strlen($new_ip)>30)
Index: /trunk/filemanager/tests/benchmark_dav.php
===================================================================
--- /trunk/filemanager/tests/benchmark_dav.php	(revision 3019)
+++ /trunk/filemanager/tests/benchmark_dav.php	(revision 7655)
@@ -30,5 +30,5 @@
     $times = array(); 
 	$phpgw->vfs->cd();
-	for ($i=0;$i<20; $i++)
+	for ($i=0;$i<20; ++$i)
 	{
 		$phpgw->vfs->dav_client->cached_props = array();
@@ -46,5 +46,5 @@
     $times = array(); 
 	$phpgw->vfs->cd();
-	for ($i=0;$i<20; $i++)
+	for ($i=0;$i<20; ++$i)
 	{
 		$phpgw->vfs->dav_client->cached_props = array();
Index: /trunk/filemanager/tp/dompdf/dompdf.php
===================================================================
--- /trunk/filemanager/tp/dompdf/dompdf.php	(revision 6057)
+++ /trunk/filemanager/tp/dompdf/dompdf.php	(revision 7655)
@@ -108,10 +108,10 @@
     case "-h":
       $opts["h"] = true;
-      $i++;
+      ++$i;
       break;
 
     case "-l":
       $opts["l"] = true;
-      $i++;
+      ++$i;
       break;
 
@@ -146,10 +146,10 @@
     case "-v":
       $opts["v"] = true;
-      $i++;
+      ++$i;
       break;
 
     case "-d":
       $opts["d"] = true;
-      $i++;
+      ++$i;
       break;
 
@@ -163,5 +163,5 @@
    default:
       $opts["filename"] = $_SERVER["argv"][$i];
-      $i++;
+      ++$i;
       break;
     }
Index: /trunk/filemanager/tp/dompdf/include/gd_adapter.cls.php
===================================================================
--- /trunk/filemanager/tp/dompdf/include/gd_adapter.cls.php	(revision 3019)
+++ /trunk/filemanager/tp/dompdf/include/gd_adapter.cls.php	(revision 7655)
@@ -264,9 +264,9 @@
 
       if ( count($style) == 1 ) {
-        for ($i = 0; $i < $style[0] * $this->_aa_factor; $i++) {
+        for ($i = 0; $i < $style[0] * $this->_aa_factor; ++$i) {
           $gd_style[] = $c;
         }
 
-        for ($i = 0; $i < $style[0] * $this->_aa_factor; $i++) {
+        for ($i = 0; $i < $style[0] * $this->_aa_factor; ++$i) {
           $gd_style[] = $this->_bg_color;
         }
@@ -279,14 +279,14 @@
           if ( $i % 2 == 0 ) {
             // 'On' pattern
-            for ($i = 0; $i < $style[0] * $this->_aa_factor; $i++) 
+            for ($i = 0; $i < $style[0] * $this->_aa_factor; ++$i)
               $gd_style[] = $c;
             
           } else {
             // Off pattern
-            for ($i = 0; $i < $style[0] * $this->_aa_factor; $i++) 
+            for ($i = 0; $i < $style[0] * $this->_aa_factor; ++$i)
               $gd_style[] = $this->_bg_color;
             
           }
-          $i++;
+          ++$i;
         }
       }
@@ -332,5 +332,5 @@
 
       foreach ($style as $length) {
-        for ($i = 0; $i < $length; $i++) {
+        for ($i = 0; $i < $length; ++$i) {
           $gd_style[] = $c;
         }
@@ -409,5 +409,5 @@
 
       foreach ($style as $length) {
-        for ($i = 0; $i < $length; $i++) {
+        for ($i = 0; $i < $length; ++$i) {
           $gd_style[] = $c;
         }
@@ -456,5 +456,5 @@
 
       foreach ($style as $length) {
-        for ($i = 0; $i < $length; $i++) {
+        for ($i = 0; $i < $length; ++$i) {
           $gd_style[] = $c;
         }
Index: /trunk/filemanager/tp/dompdf/include/cpdf_adapter.cls.php
===================================================================
--- /trunk/filemanager/tp/dompdf/include/cpdf_adapter.cls.php	(revision 3019)
+++ /trunk/filemanager/tp/dompdf/include/cpdf_adapter.cls.php	(revision 7655)
@@ -851,5 +851,5 @@
 
       $this->close_object();
-      $page_number++;
+      ++$page_number;
     }
   }
Index: /trunk/filemanager/tp/dompdf/include/stylesheet.cls.php
===================================================================
--- /trunk/filemanager/tp/dompdf/include/stylesheet.cls.php	(revision 6057)
+++ /trunk/filemanager/tp/dompdf/include/stylesheet.cls.php	(revision 7655)
@@ -327,5 +327,5 @@
 
     if ( !in_array($selector{0}, array(" ", ">", ".", "#", "+", ":", "[")) ) {
-    	$d++;
+    	++$d;
     }
 
@@ -373,5 +373,5 @@
 
       $s = $selector{$i};
-      $i++;
+      ++$i;
 
       // Eat characters up to the next delimiter
@@ -500,5 +500,5 @@
         // Read the attribute value, if required
         if ( $op != "" ) {
-          $j++;
+          ++$j;
           while ( $j < $tok_len ) {
             if ( $tok{$j} == "]" )
@@ -548,5 +548,5 @@
       }
     }
-    $i++;
+    ++$i;
 
 //       case ":":
Index: /trunk/filemanager/tp/dompdf/include/pdflib_adapter.cls.php
===================================================================
--- /trunk/filemanager/tp/dompdf/include/pdflib_adapter.cls.php	(revision 3019)
+++ /trunk/filemanager/tp/dompdf/include/pdflib_adapter.cls.php	(revision 7655)
@@ -281,5 +281,5 @@
     // Close all pages
     $this->_pdf->suspend_page("");
-    for ($p = 1; $p <= $this->_page_count; $p++) {
+    for ($p = 1; $p <= $this->_page_count; ++$p) {
       $this->_pdf->resume_page("pagenumber=$p");
       $this->_pdf->end_page_ext("");
@@ -844,5 +844,5 @@
     $this->_pdf->suspend_page("");
 
-    for ($p = 1; $p <= $this->_page_count; $p++) {
+    for ($p = 1; $p <= $this->_page_count; ++$p) {
       $this->_pdf->resume_page("pagenumber=$p");
 
Index: /trunk/filemanager/tp/dompdf/include/cellmap.cls.php
===================================================================
--- /trunk/filemanager/tp/dompdf/include/cellmap.cls.php	(revision 3019)
+++ /trunk/filemanager/tp/dompdf/include/cellmap.cls.php	(revision 7655)
@@ -382,10 +382,10 @@
 
         // Resolve the borders
-        for ( $i = 0; $i < $num_rows+1; $i++) {
+        for ( $i = 0; $i < $num_rows+1; ++$i) {
           $this->_resolve_border($start_row + $i, 0, "vertical", $bp["left"]);
           $this->_resolve_border($start_row + $i, $this->_num_cols, "vertical", $bp["right"]);
         }
 
-        for ( $j = 0; $j < $this->_num_cols; $j++) {
+        for ( $j = 0; $j < $this->_num_cols; ++$j) {
           $this->_resolve_border($start_row, $j, "horizontal", $bp["top"]);
           $this->_resolve_border($this->__row, $j, "horizontal", $bp["bottom"]);
@@ -421,14 +421,14 @@
     $ac = $this->__col;
     while ( isset($this->_cells[$this->__row][$ac]) )
-       $ac++;
+       ++$ac;
     $this->__col = $ac;
 
     // Rows:
-    for ( $i = 0; $i < $rowspan; $i++ ) {
+    for ( $i = 0; $i < $rowspan; ++$i ) {
       $row = $this->__row + $i;
 
       $this->_frames[ $key ]["rows"][] = $row;
 
-      for ( $j = 0; $j < $colspan; $j++)
+      for ( $j = 0; $j < $colspan; ++$j)
         $this->_cells[$row][$this->__col + $j] = $frame;
 
@@ -443,5 +443,5 @@
 
     // Columns:
-    for ( $j = 0; $j < $colspan; $j++ ) {
+    for ( $j = 0; $j < $colspan; ++$j ) {
       $col = $this->__col + $j;
       $this->_frames[ $key ]["columns"][] = $col;
@@ -493,5 +493,5 @@
     $min = 0;
     $max = 0;
-    for ( $cs = 0; $cs < $colspan; $cs++ ) {
+    for ( $cs = 0; $cs < $colspan; ++$cs ) {
 
       // Resolve the frame's width(s) with other cells
@@ -514,5 +514,5 @@
       // The frame needs more space.  Expand each sub-column
       $inc = ($frame_min - $min) / $colspan;
-      for ($c = 0; $c < $colspan; $c++) {
+      for ($c = 0; $c < $colspan; ++$c) {
         $col =& $this->get_column($this->__col + $c);
         $col["min-width"] += $inc;
@@ -522,5 +522,5 @@
     if ( $frame_max > $max ) {
       $inc = ($frame_max - $max) / $colspan;
-      for ($c = 0; $c < $colspan; $c++) {
+      for ($c = 0; $c < $colspan; ++$c) {
         $col =& $this->get_column($this->__col + $c);
         $col["max-width"] += $inc;
@@ -544,5 +544,5 @@
     $i = 0;
     while ( isset($this->_cells[$this->__row][$i]) )
-      $i++;
+      ++$i;
 
     $this->__col = $i;
Index: /trunk/filemanager/tp/dompdf/include/functions.inc.php
===================================================================
--- /trunk/filemanager/tp/dompdf/include/functions.inc.php	(revision 3019)
+++ /trunk/filemanager/tp/dompdf/include/functions.inc.php	(revision 7655)
@@ -343,5 +343,5 @@
 
     $path[$i] = $dir;
-    $i++;
+    ++$i;
   }
 
@@ -472,5 +472,5 @@
 
     echo "#" . str_pad($i, 2, " ", STR_PAD_RIGHT) . ": " . str_pad($file.":", 42) . " $func\n";
-    $i++;
+    ++$i;
   }
   echo "\n";
Index: /trunk/filemanager/tp/dompdf/include/text_frame_decorator.cls.php
===================================================================
--- /trunk/filemanager/tp/dompdf/include/text_frame_decorator.cls.php	(revision 3019)
+++ /trunk/filemanager/tp/dompdf/include/text_frame_decorator.cls.php	(revision 7655)
@@ -82,5 +82,5 @@
 //      var_dump($text = $this->_frame->get_node()->data);
 //      var_dump($asc = utf8_decode($text));
-//      for ($i = 0; $i < strlen($asc); $i++)
+//      for ($i = 0; $i < strlen($asc); ++$i)
 //        pre_r("$i: " . $asc{$i} . " - " . ord($asc{$i}));
 //      pre_r("width: " . Font_Metrics::get_text_width($text, $style->font_family, $style->font_size));
Index: /trunk/filemanager/tp/dompdf/include/frame_tree.cls.php
===================================================================
--- /trunk/filemanager/tp/dompdf/include/frame_tree.cls.php	(revision 3019)
+++ /trunk/filemanager/tp/dompdf/include/frame_tree.cls.php	(revision 7655)
@@ -173,5 +173,5 @@
     // Store the children in an array so that the tree can be modified
     $children = array();
-    for ($i = 0; $i < $node->childNodes->length; $i++)
+    for ($i = 0; $i < $node->childNodes->length; ++$i)
       $children[] = $node->childNodes->item($i);
 
Index: /trunk/filemanager/tp/dompdf/www/test/long_table.php
===================================================================
--- /trunk/filemanager/tp/dompdf/www/test/long_table.php	(revision 3019)
+++ /trunk/filemanager/tp/dompdf/www/test/long_table.php	(revision 7655)
@@ -25,8 +25,8 @@
 $j_max = 20;
 
-for ( $i = 1; $i <= $i_max; $i++): ?>
+for ( $i = 1; $i <= $i_max; ++$i): ?>
 <tr>
 <?php
-for ( $j = 1; $j <= $j_max; $j++) {
+for ( $j = 1; $j <= $j_max; ++$j) {
   $r = (int)(255*$i / $i_max);
   $b = (int)(255*$j / $j_max);
Index: /trunk/filemanager/tp/dompdf/www/test/php_test.php
===================================================================
--- /trunk/filemanager/tp/dompdf/www/test/php_test.php	(revision 3019)
+++ /trunk/filemanager/tp/dompdf/www/test/php_test.php	(revision 7655)
@@ -15,5 +15,5 @@
 $max_x = $pdf->get_width() - 50;
 $max_y = $pdf->get_height() - 50; 
-for ( $i = 0; $i < 30; $i++) {
+for ( $i = 0; $i < 30; ++$i) {
   $pdf->circle(rand(50, $max_x), rand(50, $max_y), rand(10, 70),
                array(rand()/getrandmax(), rand()/getrandmax(), rand()/getrandmax()),
Index: /trunk/filemanager/tp/dompdf/lib/class.pdf.php
===================================================================
--- /trunk/filemanager/tp/dompdf/lib/class.pdf.php	(revision 3019)
+++ /trunk/filemanager/tp/dompdf/lib/class.pdf.php	(revision 7655)
@@ -2211,5 +2211,5 @@
     $k = substr($k, 0, 256);
 
-    for  ($i = 0;$i<256;$i++) {
+    for  ($i = 0;$i<256;++$i) {
 
       $this->arc4.=  chr($i);
@@ -2218,5 +2218,5 @@
     $j = 0;
 
-    for  ($i = 0;$i<256;$i++) {
+    for  ($i = 0;$i<256;++$i) {
 
       $t =  $this->arc4[$i];
@@ -2246,5 +2246,5 @@
     $out = '';
 
-    for  ($i = 0;$i<$len;$i++) {
+    for  ($i = 0;$i<$len;++$i) {
 
       $a =  ($a+1) %256;
@@ -2615,5 +2615,5 @@
                   $dtmp[$bits2[0]] = array();
 
-                  for  ($i = 1;$i<count($bits2);$i++) {
+                  for  ($i = 1;$i<count($bits2);++$i) {
 
                     $dtmp[$bits2[0]][] = $bits2[$i];
@@ -2661,5 +2661,5 @@
                     $dtmp[$bits2[0]] = array();
 
-                    for  ($i = 1;$i<count($bits2);$i++) {
+                    for  ($i = 1;$i<count($bits2);++$i) {
 
                       $dtmp[$bits2[0]][] = $bits2[$i];
@@ -2849,5 +2849,5 @@
                 if  ($lastChar>0 &&  $num>$lastChar+1) {
 
-                  for ($i =  $lastChar+1;$i<$num;$i++) {
+                  for ($i =  $lastChar+1;$i<$num;++$i) {
 
                     $widths[] =  0;
@@ -2879,5 +2879,5 @@
                 if (!$this->isUnicode) {
                   // With Unicode, widths array isn't used
-                  for ($i =  $lastChar + 1; $i <=  $charNum; $i++) {
+                  for ($i =  $lastChar + 1; $i <=  $charNum; ++$i) {
 
                     $widths[] =  0;
@@ -3343,5 +3343,5 @@
     $this->objects[$this->currentContents]['c'] .=  "\n".sprintf('%.3F', $a0) .' '.sprintf('%.3F', $b0) .' m ';
 
-    for  ($i = 1; $i <=  $nSeg; $i++) {
+    for  ($i = 1; $i <=  $nSeg; ++$i) {
 
       // draw this bit of the total curve
@@ -3531,5 +3531,5 @@
     if  ($this->nStateStack) {
 
-      for  ($i =  1;$i <=  $this->nStateStack;$i++) {
+      for  ($i =  1;$i <=  $this->nStateStack;++$i) {
 
         $this->saveState($i);
@@ -3715,5 +3715,5 @@
     $numbytes = 1; // number of octetc needed to represent the UTF-8 character
     
-    for ($i = 0; $i < $length; $i++) {
+    for ($i = 0; $i < $length; ++$i) {
       $c = ord($text{$i}); // get one string character at time
       if (count($bytes) == 0) { // get starting octect
@@ -3741,5 +3741,5 @@
           // compose UTF-8 bytes to a single unicode value
           $c = $bytes[0];
-          for ($j = 1; $j < $numbytes; $j++) {
+          for ($j = 1; $j < $numbytes; ++$j) {
             $c += ($bytes[$j] << (($numbytes - $j - 1) * 0x06));
           }
@@ -3866,5 +3866,5 @@
     if  ($text[$j] ==  '<') {
 
-      $j++;
+      ++$j;
 
       switch ($text[$j]) {
@@ -3872,5 +3872,5 @@
       case  '/':
 
-        $j++;
+        ++$j;
 
         if  (mb_strlen($text) <=  $j) {
@@ -3885,5 +3885,5 @@
         case  'i':
 
-          $j++;
+          ++$j;
 
           if  ($text[$j] ==  '>') {
@@ -3905,5 +3905,5 @@
 
           // this this might be a callback function
-          $j++;
+          ++$j;
 
           $k =  mb_strpos($text, '>', $j);
@@ -3992,5 +3992,5 @@
       case  'i':
 
-        $j++;
+        ++$j;
 
         if  ($text[$j] ==  '>') {
@@ -4010,5 +4010,5 @@
 
         // this this might be a callback function
-        $j++;
+        ++$j;
 
         $k =  mb_strpos($text, '>', $j);
@@ -4158,5 +4158,5 @@
 
     /*
-     for ($i = 0;$i<$len;$i++){
+     for ($i = 0;$i<$len;++$i){
      $f = 1;
      $directive = 0; //$this->PRVTcheckTextDirective($text,$i,$f);
@@ -4282,5 +4282,5 @@
       $len =  mb_strlen($text);
 
-      for  ($i =  0; $i < $len; $i++) {
+      for  ($i =  0; $i < $len; ++$i) {
         $char =  ord($text{$i});
         // check if we have to replace character
@@ -4402,5 +4402,5 @@
     $tw =  $width/$size*1000;
 
-    for  ($i =  0;$i<$len;$i++) {
+    for  ($i =  0;$i<$len;++$i) {
 
       $f =  1;
@@ -4850,5 +4850,5 @@
     $ret =  0;
 
-    for  ($i =  0;$i<$num;$i++) {
+    for  ($i =  0;$i<$num;++$i) {
 
       $ret =  $ret*256;
Index: /trunk/filemanager/inc/jupload.php
===================================================================
--- /trunk/filemanager/inc/jupload.php	(revision 3894)
+++ /trunk/filemanager/inc/jupload.php	(revision 7655)
@@ -396,5 +396,5 @@
 				$rtry = $dir . $nameWithoutExtension . '.[' . $cnt . ']' . $ext;
 				while (file_exists($rtry)) {
-					$cnt++;
+					++$cnt;
 					$rtry = $dir . $nameWithoutExtension . '.[' . $cnt . ']' . $ext;
 				}
@@ -618,5 +618,5 @@
 				}
 				unlink($tmpname);
-				$cnt++;
+				++$cnt;
 				continue;
 			}
@@ -691,5 +691,5 @@
 				array_push($this->files, $files_data);
 			}
-			$cnt++;
+			++$cnt;
 		}
 
Index: /trunk/filemanager/inc/class.vfs_functions.inc.php
===================================================================
--- /trunk/filemanager/inc/class.vfs_functions.inc.php	(revision 5912)
+++ /trunk/filemanager/inc/class.vfs_functions.inc.php	(revision 7655)
@@ -382,7 +382,7 @@
 						'relatives'	=> array(RELATIVE_NONE, RELATIVE_NONE)
 					)))
-						$moved++;
+						++$moved;
 					else
-						$error++;
+						++$error;
 				}
 			}
@@ -412,7 +412,7 @@
 						'relatives'	=> array(RELATIVE_NONE, RELATIVE_NONE)
 					)))
-						$copied++;
+						++$copied;
 					else
-						$error++;
+						++$error;
 				}
 			}
Index: /trunk/filemanager/inc/class.bofilemanager.inc.php
===================================================================
--- /trunk/filemanager/inc/class.bofilemanager.inc.php	(revision 6037)
+++ /trunk/filemanager/inc/class.bofilemanager.inc.php	(revision 7655)
@@ -156,5 +156,5 @@
 		function ord_match ($string, $charnum)
 		{
-			for ($i = 0; $i < strlen ($string); $i++)
+			for ($i = 0; $i < strlen ($string); ++$i)
 			{
 				$character = ord (substr ($string, $i, 1));
@@ -191,5 +191,5 @@
 			if ($times == NULL)
 			$times = 1;
-			for ($i = 0; $i != $times; $i++)
+			for ($i = 0; $i != $times; ++$i)
 			{
 				if ($return)
Index: /trunk/filemanager/inc/class.uiconfig.inc.php
===================================================================
--- /trunk/filemanager/inc/class.uiconfig.inc.php	(revision 3887)
+++ /trunk/filemanager/inc/class.uiconfig.inc.php	(revision 7655)
@@ -273,5 +273,5 @@
 				$emails_to = explode(",", $result[0]['email_to']);
 				
-				for( $i = 0 ; $i < count($emails_to); $i++ )
+				for( $i = 0 ; $i < count($emails_to); ++$i )
 				{
 					$value_email_to .= "<tr>";
Index: /trunk/filemanager/inc/upload.php
===================================================================
--- /trunk/filemanager/inc/upload.php	(revision 5509)
+++ /trunk/filemanager/inc/upload.php	(revision 7655)
@@ -89,5 +89,5 @@
 {
 	$command = "nice -n19 ".$current_config['filemanager_antivirus_command'];
-	for($i = 0; $i != $show_upload_boxes; $i++)
+	for($i = 0; $i != $show_upload_boxes; ++$i)
 	{
 		$command .= " ".$_FILES['upload_file']['tmp_name'][$i];
@@ -108,5 +108,5 @@
 {
 	$return = array( );
-	for( $i = 0; $i != $show_upload_boxes; $i++)
+	for( $i = 0; $i != $show_upload_boxes; ++$i)
 	{
 		if ( $_FILES['upload_file']['error'][$i] !== 0 )
Index: /trunk/filemanager/inc/class.uifilemanager.inc.php
===================================================================
--- /trunk/filemanager/inc/class.uifilemanager.inc.php	(revision 5327)
+++ /trunk/filemanager/inc/class.uifilemanager.inc.php	(revision 7655)
@@ -544,5 +544,5 @@
 		$this->readFilesInfo();
 
-		for ($i = 0; $i != $this->numoffiles; $i++)
+		for ($i = 0; $i != $this->numoffiles; ++$i)
 		{
 			$files = $this->files_array[$i];
@@ -958,5 +958,5 @@
 			# We need to include all of the fileman entries for each file's form,
 			# so we loop through again
-			for ($i = 0; $i != $this->numoffiles; $i++) {
+			for ($i = 0; $i != $this->numoffiles; ++$i) {
 				if ($this->filename)
 					$value = 'value="' . $this->filename . '"';
@@ -1211,5 +1211,5 @@
 				reset($this->files_array);
 				$this->readFilesInfo();
-				for ($i = 0; $i < count($this->files_array); $i++) {
+				for ($i = 0; $i < count($this->files_array); ++$i) {
 					$comment = strtoupper($this->files_array[$i]['comment']);
 					$name = strtoupper($this->files_array[$i]['name']);
Index: /trunk/filemanager/inc/class.notifications.inc.php
===================================================================
--- /trunk/filemanager/inc/class.notifications.inc.php	(revision 3638)
+++ /trunk/filemanager/inc/class.notifications.inc.php	(revision 7655)
@@ -111,5 +111,5 @@
 			$email_to = explode( ",", $result[0]['email_to'] );
 			
-			for( $i = 0 ; $i < count($email_to); $i++ )
+			for( $i = 0 ; $i < count($email_to); ++$i )
 			{
 				if($email_to[$i] == $emailTo)
Index: /trunk/expressoAdmin1_2/setup/tables_update.inc.php
===================================================================
--- /trunk/expressoAdmin1_2/setup/tables_update.inc.php	(revision 7516)
+++ /trunk/expressoAdmin1_2/setup/tables_update.inc.php	(revision 7655)
@@ -281,5 +281,5 @@
 	{
 				$bin = '';
-				for ($i=0; $i<$index; $i++)
+				for ($i=0; $i<$index; ++$i)
 				{
 					$bin .= '0';
Index: /trunk/expressoAdmin1_2/controller.php
===================================================================
--- /trunk/expressoAdmin1_2/controller.php	(revision 7194)
+++ /trunk/expressoAdmin1_2/controller.php	(revision 7655)
@@ -26,5 +26,5 @@
  			$count_files = $_POST['countFiles'];
 			$array_files = array(); 		
- 			for($idx = 1; $idx <= $count_files; $idx++) { 		
+ 			for($idx = 1; $idx <= $count_files; ++$idx) {
  				if($_FILES['file_'.$idx] && !$_FILES['file_'.$idx]['error'])
  					$array_files[] = $_FILES['file_'.$idx]; 					 
Index: /trunk/expressoAdmin1_2/inc/class.uiaccounts.inc.php
===================================================================
--- /trunk/expressoAdmin1_2/inc/class.uiaccounts.inc.php	(revision 5593)
+++ /trunk/expressoAdmin1_2/inc/class.uiaccounts.inc.php	(revision 7655)
@@ -585,5 +585,5 @@
 			if (is_array($user_info['mailalternateaddress']))
 			{
-				for ($i = 0; $i < $user_info['mailalternateaddress']['count']; $i++)
+				for ($i = 0; $i < $user_info['mailalternateaddress']['count']; ++$i)
 				{
 					if ($i > 0)
@@ -599,5 +599,5 @@
 			if (is_array($user_info['mailforwardingaddress']))
 			{
-				for ($i = 0; $i < $user_info['mailforwardingaddress']['count']; $i++)
+				for ($i = 0; $i < $user_info['mailforwardingaddress']['count']; ++$i)
 				{
 					if ($i > 0)
Index: /trunk/expressoAdmin1_2/inc/class.db_functions.inc.php
===================================================================
--- /trunk/expressoAdmin1_2/inc/class.db_functions.inc.php	(revision 6553)
+++ /trunk/expressoAdmin1_2/inc/class.db_functions.inc.php	(revision 7655)
@@ -141,5 +141,5 @@
 		
 		//Escrevre no Banco as aplicações que o gerente tem direito de disponibilizar aos seus usuarios.
-		for ($i=0; $i<count($aplications); $i++)
+		for ($i=0; $i<count($aplications); ++$i)
 		{
 			$sql = "INSERT INTO phpgw_expressoadmin_apps (manager_lid, context, app) "
@@ -416,5 +416,5 @@
 			$user_app[] = $this->db->row();
 		
-		for ($i=0; $i<count($user_app); $i++)
+		for ($i=0; $i<count($user_app); ++$i)
 			$return['groups'][] = $user_app[$i]['acl_location'];
 		
@@ -644,5 +644,5 @@
 			$serverList[$i]['imapsieveserver']	= $this->db->f(2);
 			$serverList[$i]['imapsieveport']	= $this->db->f(3);
-			$i++;
+			++$i;
 		}
 		
Index: /trunk/expressoAdmin1_2/inc/class.bomessages_size.inc.php
===================================================================
--- /trunk/expressoAdmin1_2/inc/class.bomessages_size.inc.php	(revision 5593)
+++ /trunk/expressoAdmin1_2/inc/class.bomessages_size.inc.php	(revision 7655)
@@ -285,5 +285,5 @@
 			$rules_tr = '';
 
-			for ($i = 0; $i<count($rules); $i++) 
+			for ($i = 0; $i<count($rules); ++$i)
 			{
 				$name_link = (string)str_replace(" ", "%", $rules[$i]['email_recipient']);
@@ -311,5 +311,5 @@
 			$rules_tr = '';
 
-			for ($i = 0; $i<count($rules); $i++) 
+			for ($i = 0; $i<count($rules); ++$i)
 			{
 				$name_link = (string)str_replace(" ", "%", $rules[$i]['email_recipient']);
@@ -403,5 +403,5 @@
 				$entries = ldap_get_entries($this->ldap_functions, $sr);			
 	
-				for ($i=0; $i<$entries["count"]; $i++){
+				for ($i=0; $i<$entries["count"]; ++$i){
 						$u_tmp[$entries[$i]["uid"][0]] = $entries[$i]["cn"][0];
 				}
@@ -449,5 +449,5 @@
                     $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);
 
@@ -457,5 +457,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')
Index: /trunk/expressoAdmin1_2/inc/class.socomputers.inc.php
===================================================================
--- /trunk/expressoAdmin1_2/inc/class.socomputers.inc.php	(revision 493)
+++ /trunk/expressoAdmin1_2/inc/class.socomputers.inc.php	(revision 7655)
@@ -86,5 +86,5 @@
 					// Recupera o contexto do email_list
 					$tmp = explode(",", $computer_data['dn']);
-					for ($i = 1; $i < count($tmp); $i++)
+					for ($i = 1; $i < count($tmp); ++$i)
 						$computer_data['context'] .= $tmp[$i] . ',';
 					$computer_data['context'] = substr($computer_data['context'],0,(strlen($computer_data['context']) - 1));
Index: /trunk/expressoAdmin1_2/inc/sieve-php.lib.php
===================================================================
--- /trunk/expressoAdmin1_2/inc/sieve-php.lib.php	(revision 5593)
+++ /trunk/expressoAdmin1_2/inc/sieve-php.lib.php	(revision 7655)
@@ -285,5 +285,5 @@
       $index = 0;
 
-      for($ptr = 0; $ptr < strlen($string); $ptr++){
+      for($ptr = 0; $ptr < strlen($string); ++$ptr){
           if($string[$ptr] == '"' and $string[$ptr] != '\\'){
               if($start == -1){
Index: /trunk/expressoAdmin1_2/inc/class.uimanagers.inc.php
===================================================================
--- /trunk/expressoAdmin1_2/inc/class.uimanagers.inc.php	(revision 6517)
+++ /trunk/expressoAdmin1_2/inc/class.uimanagers.inc.php	(revision 7655)
@@ -263,5 +263,5 @@
 				$manager_acl = $this->functions->read_acl($_GET['manager_lid']);
 				//Pesquisa no Banco e pega os valores dos apps.
-				$query = "SELECT * FROM phpgw_expressoadmin_apps WHERE manager_lid = '" . $_GET['manager_lid'] . "' AND context = '" . $_GET['context'] . "'";
+				$query = "SELECT * FROM phpgw_expressoadmin_apps WHERE manager_lid = '" . addslashes($_GET['manager_lid']) . "' AND context = '" . addslashes($_GET['context']) . "'";
 				$GLOBALS['phpgw']->db->query($query);
 				$i=0;
@@ -272,8 +272,8 @@
 					$_POST['applications_list'][$tmp[$i]['app']] = 1;
 					$manager[0]['apps'][$tmp[$i]['app']] = 1;
-					$i++;
-				}
-			}
-			
+					++$i;
+				}
+			}
+
 			// Seta o template
 			$p = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
@@ -415,5 +415,5 @@
 					$applications_list .= sprintf('<tr bgcolor="%s">%s%s%s</tr>',$this->nextmatchs->alternate_row_color(), $app_col1, $app_col2, $app_col3);					
 				}
-				$i++;
+				++$i;
 			}
 			return $applications_list;
Index: /trunk/expressoAdmin1_2/inc/class.uimessages_size.inc.php
===================================================================
--- /trunk/expressoAdmin1_2/inc/class.uimessages_size.inc.php	(revision 5144)
+++ /trunk/expressoAdmin1_2/inc/class.uimessages_size.inc.php	(revision 7655)
@@ -115,5 +115,5 @@
             $all_rules = $this->bo->get_all_rules();
 			
-			for ($i = 0; $i<count($all_rules); $i++) 
+			for ($i = 0; $i<count($all_rules); ++$i)
 			{	
 				/* Verificação para não listar a regra default */
Index: /trunk/expressoAdmin1_2/inc/class.uimaillists.inc.php
===================================================================
--- /trunk/expressoAdmin1_2/inc/class.uimaillists.inc.php	(revision 6803)
+++ /trunk/expressoAdmin1_2/inc/class.uimaillists.inc.php	(revision 7655)
@@ -254,5 +254,5 @@
 				foreach ($array_users as $mail=>$cn)
 				{
-					$user_count++;
+					++$user_count;
 					if ($array_users_type[$mail] == 'u')
 					{
Index: /trunk/expressoAdmin1_2/inc/class.bosectors.inc.php
===================================================================
--- /trunk/expressoAdmin1_2/inc/class.bosectors.inc.php	(revision 6917)
+++ /trunk/expressoAdmin1_2/inc/class.bosectors.inc.php	(revision 7655)
@@ -162,5 +162,5 @@
 			$sector_users = $this->so->get_sector_users($sector_dn);
 
-			for ($i=0; $i<count($sector_users)-1; $i++)
+			for ($i=0; $i<count($sector_users)-1; ++$i)
 			{
 				//_debug_array($user);
@@ -174,5 +174,5 @@
 
 			$sector_groups = $this->so->get_sector_groups($sector_dn);
-			for ($i=0; $i<count($sector_groups)-1; $i++)
+			for ($i=0; $i<count($sector_groups)-1; ++$i)
 			{
  				$dn = $sector_groups[$i]['dn'];
Index: /trunk/expressoAdmin1_2/inc/class.somessages_size.inc.php
===================================================================
--- /trunk/expressoAdmin1_2/inc/class.somessages_size.inc.php	(revision 5144)
+++ /trunk/expressoAdmin1_2/inc/class.somessages_size.inc.php	(revision 7655)
@@ -203,5 +203,5 @@
 			
 			while($this->db->next_record())
-                $i++;
+                ++$i;
 
 			if($i==0)
Index: /trunk/expressoAdmin1_2/inc/class.shared_accounts.inc.php
===================================================================
--- /trunk/expressoAdmin1_2/inc/class.shared_accounts.inc.php	(revision 5942)
+++ /trunk/expressoAdmin1_2/inc/class.shared_accounts.inc.php	(revision 7655)
@@ -95,5 +95,5 @@
                                 $entries = ldap_get_entries($this->ldap, $shared_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]."')>" . $entries[$i]['cn'][0] . "</td><td onClick=edit_shared_account('".$entries[$i]['uid'][0]."')>" . $entries[$i]['mail'][0] . "</td><td align='center' onClick=delete_shared_accounts('".$entries[$i]['uid'][0]."')><img HEIGHT='16' WIDTH='16' src=./expressoAdmin1_2/templates/default/images/delete.png></td></tr>";
@@ -145,5 +145,5 @@
 	                                $return['owners_acl'][$i] .= $value;
                                         $return['owners_calendar_acl'][$i] .= $calendarAcls[$key];
-	                                $i++;
+	                                ++$i;
 	                        }
                         } else {
Index: /trunk/expressoAdmin1_2/inc/class.uigroups.inc.php
===================================================================
--- /trunk/expressoAdmin1_2/inc/class.uigroups.inc.php	(revision 6157)
+++ /trunk/expressoAdmin1_2/inc/class.uigroups.inc.php	(revision 7655)
@@ -294,5 +294,5 @@
 				foreach ($array_users as $uidnumber=>$cn)
 				{
-					$user_count++;
+					++$user_count;
 					if ($array_users_type[$uidnumber] == 'u')
 					{
Index: /trunk/expressoAdmin1_2/inc/class.sosectors.inc.php
===================================================================
--- /trunk/expressoAdmin1_2/inc/class.sosectors.inc.php	(revision 6553)
+++ /trunk/expressoAdmin1_2/inc/class.sosectors.inc.php	(revision 7655)
@@ -97,5 +97,5 @@
 			$info = ldap_get_entries($connection, $search);
 			
-			for($i=0;$i<$info['count'];$i++)
+			for($i=0;$i<$info['count'];++$i)
 			{
 				//deleting recursively sub entries
Index: /trunk/expressoAdmin1_2/inc/class.functions.inc.php
===================================================================
--- /trunk/expressoAdmin1_2/inc/class.functions.inc.php	(revision 6697)
+++ /trunk/expressoAdmin1_2/inc/class.functions.inc.php	(revision 7655)
@@ -353,5 +353,5 @@
 					$info = ldap_get_entries($ldap_conn, $search);
 					
-					for ($i=0; $i < $info['count']; $i++)
+					for ($i=0; $i < $info['count']; ++$i)
 					{
 						$tmp[$info[$i]['uid'][0]]['account_id']	 = $info[$i]['uidnumber'][0]; 
@@ -383,5 +383,5 @@
 					$search=ldap_search($ldap_conn, $context, $filter, $justthese);
 					$info = ldap_get_entries($ldap_conn, $search);
-					for ($i=0; $i < $info['count']; $i++)
+					for ($i=0; $i < $info['count']; ++$i)
 					{
 						$tmp[$info[$i]['cn'][0]]['cn']= $info[$i]['cn'][0];
@@ -410,5 +410,5 @@
 					$info = ldap_get_entries($ldap_conn, $search);
 					
-					for ($i=0; $i < $info['count']; $i++)
+					for ($i=0; $i < $info['count']; ++$i)
 					{
 						$tmp[$info[$i]['uid'][0]]['uid']		= $info[$i]['uid'][0];
@@ -437,5 +437,5 @@
 					$search=ldap_search($ldap_conn, $context, $filter, $justthese);
 					$info = ldap_get_entries($ldap_conn, $search);
-					for ($i=0; $i < $info['count']; $i++)
+					for ($i=0; $i < $info['count']; ++$i)
 					{
 						$tmp[$info[$i]['cn'][0]]['cn']			= $info[$i]['cn'][0];
@@ -496,5 +496,5 @@
          
                                 // Retiro o count do array info e inverto o array para ordenaçãoo. 
-                                for ($i=0; $i<$info["count"]; $i++) 
+                                for ($i=0; $i<$info["count"]; ++$i)
                                 { 
                                         $dn = $info[$i]["dn"]; 
@@ -533,5 +533,5 @@
                 else  
                 { 
-                                        for ($i=0; $i<$level; $i++) 
+                                        for ($i=0; $i<$level; ++$i)
                                                 $display .= '---'; 
                 } 
@@ -667,5 +667,5 @@
 				$search=ldap_search($ldap_conn, $context, $filter, $justthese);
         		$info = ldap_get_entries($ldap_conn, $search);
-		        for ($i=0; $i<$info["count"]; $i++)
+		        for ($i=0; $i<$info["count"]; ++$i)
     		    {
     		    	$a_sectors[] = $info[$i]['dn'];	
@@ -712,5 +712,5 @@
                 else 
                 {
-					for ($i=0; $i<$level; $i++)
+					for ($i=0; $i<$level; ++$i)
 						$display .= '---';
                 }
@@ -855,5 +855,5 @@
 					$applications_list .= sprintf('<tr bgcolor="%s">%s%s%s</tr>','#DDDDDD', $app_col1, $app_col2, $app_col3);					
 				}
-				$i++;
+                ++$i;
 			}
 			return $applications_list;
@@ -911,5 +911,5 @@
 			/*Calcula o penúltimo dígito verificador*/
 			$acum=0;
-			for($i=0; $i<9; $i++)
+			for($i=0; $i<9; ++$i)
 			{
   				$acum+= $cpf[$i]*(10-$i);
@@ -924,5 +924,5 @@
 			/*Calcula o último dígito verificador*/
 			$acum=0;
-			for ($i=0; $i<10; $i++)
+			for ($i=0; $i<10; ++$i)
 			{
   				$acum+= $cpf[$i]*(11-$i);
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;
Index: /trunk/expressoAdmin1_2/inc/class.totalsessions.inc.php
===================================================================
--- /trunk/expressoAdmin1_2/inc/class.totalsessions.inc.php	(revision 5233)
+++ /trunk/expressoAdmin1_2/inc/class.totalsessions.inc.php	(revision 7655)
@@ -79,5 +79,5 @@
                                             }
 
-                                            $total++;
+                                            ++$total;
                                     }
                                     
Index: /trunk/listAdmin/docs/manageheader.php
===================================================================
--- /trunk/listAdmin/docs/manageheader.php	(revision 5912)
+++ /trunk/listAdmin/docs/manageheader.php	(revision 7655)
@@ -504,5 +504,5 @@
 				);
 
-				for($i=0; $i<30; $i++)
+				for($i=0; $i<30; ++$i)
 				{
 					$GLOBALS['phpgw_info']['server']['mcrypt_iv'] .= $random_char[rand(1,count($random_char))];
Index: /trunk/listAdmin/controller.php
===================================================================
--- /trunk/listAdmin/controller.php	(revision 3514)
+++ /trunk/listAdmin/controller.php	(revision 7655)
@@ -15,5 +15,5 @@
  			$count_files = $_POST['countFiles'];
 			$array_files = array(); 		
- 			for($idx = 1; $idx <= $count_files; $idx++) { 		
+ 			for($idx = 1; $idx <= $count_files; ++$idx) {
  				if($_FILES['file_'.$idx] && !$_FILES['file_'.$idx]['error'])
  					$array_files[] = $_FILES['file_'.$idx]; 					 
Index: /trunk/listAdmin/inc/class.db_functions.inc.php
===================================================================
--- /trunk/listAdmin/inc/class.db_functions.inc.php	(revision 3514)
+++ /trunk/listAdmin/inc/class.db_functions.inc.php	(revision 7655)
@@ -283,5 +283,5 @@
 			$user_app[] = $this->db->row();
 		
-		for ($i=0; $i<count($user_app); $i++)
+		for ($i=0; $i<count($user_app); ++$i)
 			$return['groups'][] = $user_app[$i]['acl_location'];
 		
@@ -505,5 +505,5 @@
 			$serverList[$i]['imapsieveserver']	= $this->db->f(2);
 			$serverList[$i]['imapsieveport']	= $this->db->f(3);
-			$i++;
+			++$i;
 		}
 		
@@ -587,5 +587,5 @@
 			$users_ldap[$i]['cn']        		= $this->db->f(3);
 			$users_ldap[$i]['mail']        		= $this->db->f(5);
-			$i++;
+			++$i;
 			}	     
 		return $users_ldap;
Index: /trunk/listAdmin/inc/class.functions.inc.php
===================================================================
--- /trunk/listAdmin/inc/class.functions.inc.php	(revision 6057)
+++ /trunk/listAdmin/inc/class.functions.inc.php	(revision 7655)
@@ -242,5 +242,5 @@
 				$i = 0;
 				$tmp = array();
-				for ($i=0; $i < $info['count']; $i++)
+				for ($i=0; $i < $info['count']; ++$i)
 				{
 					$tmp[$i]['uid'] 		= $info[$i]['uid'][0];
@@ -271,5 +271,5 @@
 				$tmp = array();
 				$ldap_found=false;
-				for ($i=0; $i < $info['count']; $i++)
+				for ($i=0; $i < $info['count']; ++$i)
 					{
 					$tmp[$i][account_id]			= $info[$i]['uidnumber'][0]; 
@@ -338,5 +338,5 @@
 				$i = 0;
 				$tmp = array();
-				for ($i=0; $i < $info['count']; $i++)
+				for ($i=0; $i < $info['count']; ++$i)
 				{
 					$tmp[$i][cn] 			= $info[$i][cn][0];
@@ -363,5 +363,5 @@
 				$i = 0;
 				$tmp = array();
-				for ($i=0; $i < $info['count']; $i++)
+				for ($i=0; $i < $info['count']; ++$i)
 				{
 					$tmp[$i]['uid'] 		= $info[$i]['uid'][0];
@@ -381,5 +381,5 @@
 				ldap_close($ldap_conn);
 				$tmp = array();
-				for ($i=0; $i < $info['count']; $i++)
+				for ($i=0; $i < $info['count']; ++$i)
 				{
 					$tmp[$i]['cn'] 			= $info[$i]['cn'][0];
@@ -416,5 +416,5 @@
 				{
 					$sector_space = '';
-					for ($i=1; $i < $sector->sector_level; $i++)
+					for ($i=1; $i < $sector->sector_level; ++$i)
 						$sector_space = '---'.$sector_space;
 					$sector->sector_name = $sector_space.' '.$sector->sector_name;
@@ -452,5 +452,5 @@
 
 			// Retiro o count do array info e inverto o array para ordenaï¿œï¿œo.
-	        for ($i=0; $i<$info["count"]; $i++)
+	        for ($i=0; $i<$info["count"]; ++$i)
     	    {
 				$dn = $info[$i]["dn"];
@@ -486,5 +486,5 @@
                         $display .= '+';
                 else {
-                        for ($i=0; $i<$level; $i++)
+                        for ($i=0; $i<$level; ++$i)
                                 $display .= '---';
                 }
@@ -567,5 +567,5 @@
 				ldap_sort($connection, $search, "ou");
 				$info = ldap_get_entries($connection, $search);
-				for ($i=0; $i<$info["count"]; $i++)
+				for ($i=0; $i<$info["count"]; ++$i)
 				{
 					$this->level++;
@@ -607,5 +607,5 @@
 
 			// Retiro o count do array info e inverto o array para ordenaï¿œï¿œo.
-	        for ($i=0; $i<$info["count"]; $i++)
+	        for ($i=0; $i<$info["count"]; ++$i)
     	    {
 				$dn = $info[$i]["dn"];
@@ -644,5 +644,5 @@
                 else 
                 {
-					for ($i=0; $i<$level; $i++)
+					for ($i=0; $i<$level; ++$i)
 						$display .= '---';
                 }
@@ -793,5 +793,5 @@
 					$applications_list .= sprintf('<tr bgcolor="%s">%s%s%s</tr>','#DDDDDD', $app_col1, $app_col2, $app_col3);					
 				}
-				$i++;
+				++$i;
 			}
 			return $applications_list;
Index: /trunk/listAdmin/inc/class.ldap_functions.inc.php
===================================================================
--- /trunk/listAdmin/inc/class.ldap_functions.inc.php	(revision 3514)
+++ /trunk/listAdmin/inc/class.ldap_functions.inc.php	(revision 7655)
@@ -215,5 +215,5 @@
     	$entries = ldap_get_entries($this->ldap, $groups_list);
     	
-		for ($i=0; $i<$entries["count"]; $i++){
+		for ($i=0; $i<$entries["count"]; ++$i){
 			$u_tmp[$entries[$i]["uidnumber"][0]] = $entries[$i]["cn"][0];
 		}
@@ -266,5 +266,5 @@
 		
 		$lists_entries = ldap_get_entries($this->ldap, $lists_search);
-		for ($i=0; $i<$lists_entries["count"]; $i++)
+		for ($i=0; $i<$lists_entries["count"]; ++$i)
 		{
 			$l_tmp[$lists_entries[$i]["uidnumber"][0]] = $lists_entries[$i]["cn"][0];
@@ -288,5 +288,5 @@
 		
 		$users_entries = ldap_get_entries($this->ldap, $users_search);
-		for ($i=0; $i<$users_entries["count"]; $i++)
+		for ($i=0; $i<$users_entries["count"]; ++$i)
 		{
 			$u_tmp[$users_entries[$i]["uidnumber"][0]] = $users_entries[$i]["cn"][0];
@@ -336,5 +336,5 @@
 		
 		$users_entries = ldap_get_entries($this->ldap, $users_search);
-		for ($i=0; $i<$users_entries["count"]; $i++)
+		for ($i=0; $i<$users_entries["count"]; ++$i)
 		{
 			$u_tmp[$users_entries[$i]["uidnumber"][0]] = $users_entries[$i]["cn"][0];
@@ -371,5 +371,5 @@
 		$entry = ldap_get_entries($this->ldap, $search);
 		$i = 0;
-		for($i = 0; $i <= $entry[0]['memberuid']['count']; $i++)
+		for($i = 0; $i <= $entry[0]['memberuid']['count']; ++$i)
 		{
 			if($entry[0]['memberuid'][$i] == $uid)
@@ -416,5 +416,5 @@
 
 		$users_entries = ldap_get_entries($this->ldap, $users_search);
-		for ($i=0; $i<$users_entries["count"]; $i++)
+		for ($i=0; $i<$users_entries["count"]; ++$i)
 		{
 				$u_tmp[$users_entries[$i]["uidnumber"][0]] = $users_entries[$i]["cn"][0] . " [" .$users_entries[$i]["mail"][0] . "]";
@@ -454,5 +454,5 @@
     	$entries = ldap_get_entries($this->ldap, $groups_list);
 	$options = '';
-	for ($i=0; $i<$entries['count']; $i++)
+	for ($i=0; $i<$entries['count']; ++$i)
 		{
 		$options .= "<option value=" . $entries[$i]['gidnumber'][0] . ">" . $entries[$i]['cn'][0] . "</option>";
@@ -471,5 +471,5 @@
     	
 		$options = '';			
-		for ($i=0; $i<$entries['count']; $i++)
+		for ($i=0; $i<$entries['count']; ++$i)
 		{
 			$options .= "<option value=" . $entries[$i]['uidnumber'][0] . ">" . $entries[$i]['uid'][0] . " </option>";
@@ -715,5 +715,5 @@
 		$entries = ldap_get_entries($this->ldap_write, $search);
 		$result['status'] = true;
-		for ($i=0; $i<$entries['count']; $i++)
+		for ($i=0; $i<$entries['count']; ++$i)
 		{
 			$attrs['mailforwardingaddress'] = $old_mail;
@@ -746,5 +746,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.
@@ -790,5 +790,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')
@@ -812,5 +812,5 @@
     	$entries = ldap_get_entries($this->ldap, $search);
 
-    	for ($i=0; $i<$entries['count']; $i++)
+    	for ($i=0; $i<$entries['count']; ++$i)
     	{
     		$result['maillists_info'][$i]['uidnumber'] = $entries[$i]['uidnumber'][0];
@@ -826,5 +826,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] ] = $entries[$i]['cn'][0];
@@ -844,5 +844,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.
@@ -857,5 +857,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");
@@ -863,8 +863,8 @@
 			// Montagem dinamica do filtro
 			$filter="(&(phpgwAccountType=u)(|";
-			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--;
@@ -874,5 +874,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];
@@ -903,5 +903,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')
@@ -925,5 +925,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.
@@ -944,5 +944,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");
@@ -950,8 +950,8 @@
 			// Montagem dinamica do filtro
 			$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--;
@@ -961,5 +961,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['members_info'][$user_entry[$j]['uidnumber'][0]]['uid'] = $user_entry[$j]['uid'][0];
@@ -1006,5 +1006,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.
@@ -1023,5 +1023,5 @@
 
 		//Members
-		for ($i=0; $i<$entry[0]['admlista']['count']; $i++)
+		for ($i=0; $i<$entry[0]['admlista']['count']; ++$i)
 		{
 			$justthese = array("cn", "uidnumber", "uid", "phpgwaccounttype", "mail", "admlista");
@@ -1029,8 +1029,8 @@
 			// Montagem dinamica do filtro
 			$filter="(&(|(phpgwAccountType=u)(phpgwAccountType=l))(|";
-			for ($k=0; (($k<10) && ($i<$entry[0]['admlista']['count'])); $k++)
+			for ($k=0; (($k<10) && ($i<$entry[0]['admlista']['count'])); ++$k)
 			{
 				$filter .= "(mail=".$entry[0]['admlista'][$i].")";
-				$i++;
+				++$i;
 			}
 			$i--;
@@ -1040,5 +1040,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['members_info'][$user_entry[$j]['uidnumber'][0]]['uid'] = $user_entry[$j]['uid'][0];
@@ -1086,5 +1086,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.
@@ -1105,8 +1105,8 @@
 		
 		//Senders
-		//for ($i=0; $i<$entry[0]['mailsenderaddress']['count']; $i++)
+		//for ($i=0; $i<$entry[0]['mailsenderaddress']['count']; ++$i)
 		//Recupera a relacao de usuario nao moderados no Mailman (podem enviar e-mails para uma lista de e-mail sem precisar da
 		//autorizacao do moderador;
-		for ($i=0; $i<$entry[0]['naomoderado']['count']; $i++)
+		for ($i=0; $i<$entry[0]['naomoderado']['count']; ++$i)
 		{
 			$justthese = array("cn", "uidnumber", "uid", "mail");
@@ -1161,5 +1161,5 @@
 					$result['groups_info'][$i]['group_disabled'] = 'false';
 				
-				$i++;
+				++$i;
 			}
 		}
@@ -1421,5 +1421,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);
@@ -1441,5 +1441,5 @@
     	$array_mod_del['memberUid'] = $uid;
 
-	    for ($i=0; $i<=$entry['count']; $i++)
+	    for ($i=0; $i<=$entry['count']; ++$i)
 	    {
 	    	$dn = $entry[$i]['dn'];
@@ -1464,5 +1464,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);
@@ -1487,5 +1487,5 @@
 	    $entry = ldap_get_entries($this->ldap, $search);
 		
-	    for ($i=0; $i<=$entry['count']; $i++)
+	    for ($i=0; $i<=$entry['count']; ++$i)
 	    {
 	    	$dn = strtolower($entry[$i]['dn']);
@@ -1513,5 +1513,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]['samba_domain_sid'] = $entry[$i]['sambasid'][0];
@@ -1569,5 +1569,5 @@
 	    $entry = ldap_get_entries($this->ldap_write, $search);
 	    
-   	    for ($i=0; $i<$entry['count']; $i++)
+   	    for ($i=0; $i<$entry['count']; ++$i)
 	    {
 			$return['sambaDomains'][$i] = $entry[$i]['sambadomainname'][0];
@@ -1630,5 +1630,5 @@
 		$key='expresso-livre';
 		$result = '';
-		for($i=1; $i<=strlen($string); $i++)
+		for($i=1; $i<=strlen($string); ++$i)
 		{
 			$char = substr($string, $i-1, 1);
Index: /trunk/listAdmin/inc/sieve-php.lib.php
===================================================================
--- /trunk/listAdmin/inc/sieve-php.lib.php	(revision 6057)
+++ /trunk/listAdmin/inc/sieve-php.lib.php	(revision 7655)
@@ -285,5 +285,5 @@
       $index = 0;
 
-      for($ptr = 0; $ptr < strlen($string); $ptr++){
+      for($ptr = 0; $ptr < strlen($string); ++$ptr){
           if($string[$ptr] == '"' and $string[$ptr] != '\\'){
               if($start == -1){
Index: /trunk/admin/inc/class.uiaccounts.inc.php
===================================================================
--- /trunk/admin/inc/class.uiaccounts.inc.php	(revision 5928)
+++ /trunk/admin/inc/class.uiaccounts.inc.php	(revision 7655)
@@ -581,5 +581,5 @@
 			$c_users = count($users);
 			$str = '';
-			for($i=0;$i<$c_users;$i++)
+			for($i=0;$i<$c_users;++$i)
 			{
 				$str .= '<option value='.$users[$i]['account_id'].'>'.$GLOBALS['phpgw']->common->display_fullname($users[$i]['account_lid'],$users[$i]['account_firstname'],$users[$i]['account_lastname']).'</option>'."\n";
@@ -806,5 +806,5 @@
 					$perm_display[$i]['appName'] = $app;
 					$perm_display[$i]['title']   = $data['title'];
-					$i++;
+					++$i;
 				}
 			}
@@ -816,5 +816,5 @@
 			@reset($db_perms);
 
-			for ($i=0;$i<count($perm_display);$i++)
+			for ($i=0;$i<count($perm_display);++$i)
 			{
 				if ($perm_display[$i]['title'])
@@ -823,5 +823,5 @@
 				}
 
-				$i++;
+				++$i;
 
 				if ($perm_display[$i]['title'])
@@ -955,5 +955,5 @@
 			
 			$tr_color = $GLOBALS['phpgw_info']['theme']['row_off'];
-			for ($i=0;$i < count($perm_display);$i++)
+			for ($i=0;$i < count($perm_display);++$i)
 			{
 				$app = $perm_display[$i][0];
@@ -1182,5 +1182,5 @@
 			{
 				$groups_select .= '<option value="' . $value['account_id'] . '"';
-				for ($i=0; $i<count($userGroups); $i++) 
+				for ($i=0; $i<count($userGroups); ++$i)
 				{
 					/* print "Los1:".$userData["account_id"].$userGroups[$i]['account_id']." : ".$value['account_id']."<br>"; */
Index: /trunk/admin/inc/class.soaccounts.inc.php
===================================================================
--- /trunk/admin/inc/class.soaccounts.inc.php	(revision 2)
+++ /trunk/admin/inc/class.soaccounts.inc.php	(revision 7655)
@@ -95,5 +95,5 @@
 			{
 				$c_acct_groups = count($userData['account_groups']);
-				for ($i=0;$i<$c_acct_groups;$i++)
+				for ($i=0;$i<$c_acct_groups;+$i)
 				{
 					$GLOBALS['phpgw']->acl->add_repository('phpgw_group',$userData['account_groups'][$i],$userData['account_id'],1);
Index: /trunk/admin/inc/class.uiapplications.inc.php
===================================================================
--- /trunk/admin/inc/class.uiapplications.inc.php	(revision 2)
+++ /trunk/admin/inc/class.uiapplications.inc.php	(revision 7655)
@@ -97,5 +97,5 @@
 					$applications[$app] = $data;
 				}
-				$i++;
+				++$i;
 			}
 
Index: /trunk/admin/inc/class.boaccounts.inc.php
===================================================================
--- /trunk/admin/inc/class.boaccounts.inc.php	(revision 2)
+++ /trunk/admin/inc/class.boaccounts.inc.php	(revision 7655)
@@ -703,5 +703,5 @@
 			{
 				$error[$totalerrors] = lang('You must enter a lastname');
-				$totalerrors++;
+				++$totalerrors;
 			}
 
@@ -709,5 +709,5 @@
 			{
 				$error[$totalerrors] = lang('You must enter a loginid');
-				$totalerrors++;
+				++$totalerrors;
 			}
 			
@@ -715,5 +715,5 @@
 			{
 				$error[$totalerrors] = lang('The groups must include the primary group');
-				$totalerrors++;
+				++$totalerrors;
 			}
 			
@@ -730,5 +730,5 @@
 					  $error[$totalerrors] = lang('That loginid has already been taken');
 				   }
-				   $totalerrors++;
+				   ++$totalerrors;
 				}
 			}
@@ -739,5 +739,5 @@
 				{
 					$error[$totalerrors] = lang('The two passwords are not the same');
-					$totalerrors++;
+					++$totalerrors;
 				}
 			}
@@ -746,5 +746,5 @@
 			{
 				$error[$totalerrors] = lang('You must add at least 1 permission or group to this account');
-				$totalerrors++;
+				++$totalerrors;
 			}
 
@@ -761,5 +761,5 @@
 					{
 						$error[$totalerrors] = lang('You have entered an invalid expiration date');
-						$totalerrors++;
+						++$totalerrors;
 					}
 					else
@@ -781,5 +781,5 @@
 			{
 				$error[$totalerrors] = lang ('File space must be an integer');
-				$totalerrors++;
+				++$totalerrors;
 			}
 		*/
Index: /trunk/admin/inc/class.uilog.inc.php
===================================================================
--- /trunk/admin/inc/class.uilog.inc.php	(revision 2)
+++ /trunk/admin/inc/class.uilog.inc.php	(revision 7655)
@@ -63,5 +63,5 @@
 				{
 					$c = array();
-					for ($i=0;$i<count($_cols);$i++)
+					for ($i=0;$i<count($_cols);++$i)
 					{
 						if (!in_array($i, $_delcol))
Index: /trunk/admin/inc/class.solog.inc.php
===================================================================
--- /trunk/admin/inc/class.solog.inc.php	(revision 2)
+++ /trunk/admin/inc/class.solog.inc.php	(revision 7655)
@@ -40,5 +40,5 @@
 				/* fields from phpgw_log table */
 				$clist = $this->db->metadata('phpgw_log');
-				for ($i=0; $i<count($clist); $i++)
+				for ($i=0; $i<count($clist); ++$i)
 				{
 					$name =  $clist[$i]['name'];
@@ -48,5 +48,5 @@
 				/* fields from phpgw_log_msg table */
 				$clist = $this->db->metadata('phpgw_log_msg');
-				for ($i=0; $i<count($clist); $i++)
+				for ($i=0; $i<count($clist); ++$i)
 				{
 					$name =  $clist[$i]['name'];
@@ -66,5 +66,5 @@
 				/* Enhance with Columns for phpgw_accounts */
 				$clist = $this->db->metadata('phpgw_accounts');
-				for ($i=0; $i<count($clist); $i++)
+				for ($i=0; $i<count($clist); ++$i)
 				{
 					$name =  $clist[$i]['name'];
Index: /trunk/admin/inc/class.uimenuclass.inc.php
===================================================================
--- /trunk/admin/inc/class.uimenuclass.inc.php	(revision 2)
+++ /trunk/admin/inc/class.uimenuclass.inc.php	(revision 7655)
@@ -59,5 +59,5 @@
 				}
 				$this->section_item($link,lang($value['description']),$this->rowColor[($i % 2)]);
-				$i++;
+				++$i;
 			}
 
Index: /trunk/admin/inc/class.html_tables.inc.php
===================================================================
--- /trunk/admin/inc/class.html_tables.inc.php	(revision 2)
+++ /trunk/admin/inc/class.html_tables.inc.php	(revision 7655)
@@ -102,5 +102,5 @@
 			$rparms = array();
 			$mrow = $stop;
-			for($rno=0;$rno<$mrow;$rno++)
+			for($rno=0;$rno<$mrow;++$rno)
 			{
 				// Build GroupKey
@@ -131,5 +131,5 @@
 				$grno = $start;
 				$gkey = $rows[$start]['#gkey'];
-				for($rno=$start+1;$rno<$stop;$rno++)
+				for($rno=$start+1;$rno<$stop;++$rno)
 				{
 					$rowspan = 1;
@@ -142,5 +142,5 @@
 						$row = $rows[$rno];
 
-						for($pc=0;$pc<count($row);$pc++)
+						for($pc=0;$pc<count($row);++$pc)
 						{
 							$c = $row[$cols[$pc]];
@@ -155,5 +155,5 @@
 							}
 						}
-						$rno++;
+						++$rno;
 						$rkey = $rows[$rno]['#gkey'];
 					}
@@ -173,5 +173,5 @@
 			*/
 			//print_r($rows);
-			for($rno=$start;$rno<$stop;$rno++)
+			for($rno=$start;$rno<$stop;++$rno)
 			{
 				// let user have a hack at the row...
@@ -314,5 +314,5 @@
 			$html .= "<table width=\"98%\" bgcolor=\"#000000\">\n";
 			$f = array();
-			for($fno=0;$fno<$noflds;$fno++)
+			for($fno=0;$fno<$noflds;++$fno)
 			{
 				$f[]=$fno;
@@ -320,13 +320,13 @@
 			// Column Headings
 			$html .= "\t<tr bgcolor=\"#D3DCFF\">\n";
-			for($cno=0;$cno<$nocols;$cno++)
+			for($cno=0;$cno<$nocols;++$cno)
 			{
 				$html .= "\t\t<td align=\"center\">$cno</td>\n";
 			}
 			$html .= "\t</tr >\n";
-			for($rno=0;$rno<$norows;$rno++)
+			for($rno=0;$rno<$norows;++$rno)
 			{
 				$html .= "\t<tr bgcolor=\"#D3DCFF\">\n";
-				for($cno=0;$cno<$nocols;$cno++)
+				for($cno=0;$cno<$nocols;++$cno)
 				{
 					$c = $layout[$rno][$cno];
@@ -359,5 +359,5 @@
 			reset($cols);
 	//		while(list($cno,$name) = each($cols))
-			for($fno=0;$fno<$noflds;$fno++)
+			for($fno=0;$fno<$noflds;++$fno)
 			{
 				$name = $cols[$fno];
@@ -412,7 +412,7 @@
 			$mrows = count($tlayout);
 			$mcols = count($tlayout[0]);
-			for($pr=0;$pr<$mrows;$pr++)
-			{
-				for($pc=0;$pc<$mcols;$pc++)
+			for($pr=0;$pr<$mrows;++$pr)
+			{
+				for($pc=0;$pc<$mcols;++$pc)
 				{
 					if(isset($tlayout[$pr][$pc]))
@@ -425,16 +425,16 @@
 						{
 							unset($tlayout[$pr + $rowspan][$pc]);
-							$rowspan++;
+							++$rowspan;
 						}
 						while(($pc + $colspan < $mcols) && ($tlayout[$pr][$pc+$colspan] == $cno))
 						{
 							unset($tlayout[$pr][$pc+$colspan]);
-							$colspan++;
+							++$colspan;
 						}
 						if($colspan > 1 && $rowspan > 1)
 						{
-							for($r=$pr+1;$r<$pr+$rowspan;$r++)
+							for($r=$pr+1;$r<$pr+$rowspan;++$r)
 							{
-								for($c=$pc+1;$c<$pc+$colspan;$c++)
+								for($c=$pc+1;$c<$pc+$colspan;++$c)
 								{
 									unset($tlayout[$r][$c]);
Index: /trunk/admin/inc/class.uiconfig.inc.php
===================================================================
--- /trunk/admin/inc/class.uiconfig.inc.php	(revision 6528)
+++ /trunk/admin/inc/class.uiconfig.inc.php	(revision 7655)
@@ -407,5 +407,5 @@
 						$newvals = explode(' ',$newval);
 						$setting = end($newvals);
-						for ($i=0;$i<(count($newvals) - 1); $i++)
+						for ($i=0;$i<(count($newvals) - 1); ++$i)
 						{
 							$configs[] = $newvals[$i];
Index: /trunk/admin/inc/Controller.class.php
===================================================================
--- /trunk/admin/inc/Controller.class.php	(revision 6057)
+++ /trunk/admin/inc/Controller.class.php	(revision 7655)
@@ -109,5 +109,5 @@
 		$contents_itens = $this->controller_contentes->getElementsByTagName(self::__CONTROLLER_CONTENTES_ITEM__);
 
-		for ( $i = 0; $i < $contents_itens->length && $contents_itens->item($i)->getAttribute(self::__CONTROLLER_CONTENTES_ITEM_PARAM__) != $section_name; $i++ );
+		for ( $i = 0; $i < $contents_itens->length && $contents_itens->item($i)->getAttribute(self::__CONTROLLER_CONTENTES_ITEM_PARAM__) != $section_name; ++$i );
 		( !($i < $contents_itens->length) )
 			and die(__CLASS__ . ' [ ERROR #11 ] :: invalid section "' . $section_name . '"');
@@ -125,7 +125,7 @@
 
 		if ( empty($alias) && $alias !== '0' )
-			for ( $i = 0; $i < $section_itens->length && $section_itens->item($i)->getAttribute('ref') != $ref; $i++ );
+			for ( $i = 0; $i < $section_itens->length && $section_itens->item($i)->getAttribute('ref') != $ref; ++$i );
 		else
-			for ( $i = 0; $i < $section_itens->length && ( $section_itens->item($i)->getAttribute('ref') != $ref || $section_itens->item($i)->getAttribute('alias') !== $alias); $i++ );
+			for ( $i = 0; $i < $section_itens->length && ( $section_itens->item($i)->getAttribute('ref') != $ref || $section_itens->item($i)->getAttribute('alias') !== $alias); ++$i );
 
 		( !($i < $section_itens->length) )
@@ -264,5 +264,5 @@
 	private function _pack($script)
    	{
-		for ( $i = 0; isset($this->_parsers[$i]); $i++ )
+		for ( $i = 0; isset($this->_parsers[$i]); ++$i )
 			$script = call_user_func(array(&$this,$this->_parsers[$i]), $script);
 
Index: /trunk/jabberit_messenger/jmessenger/inc/jabberit_acl.inc.php
===================================================================
--- /trunk/jabberit_messenger/jmessenger/inc/jabberit_acl.inc.php	(revision 5320)
+++ /trunk/jabberit_messenger/jmessenger/inc/jabberit_acl.inc.php	(revision 7655)
@@ -12,5 +12,5 @@
 $size_of_acl = sizeof($GLOBALS['phpgw_info']['user']['acl']);
 
-for( $i = 0; $i < $size_of_acl && $GLOBALS['phpgw_info']['user']['acl'] != "jabberit_messenger"; $i++ )
+for( $i = 0; $i < $size_of_acl && $GLOBALS['phpgw_info']['user']['acl'] != "jabberit_messenger"; ++$i )
 {
 	$apps = unserialize($GLOBALS['phpgw_info']['server']['apps_jabberit']);
Index: /trunk/jabberit_messenger/jmessenger/inc/class.CommonFunctions.inc.php
===================================================================
--- /trunk/jabberit_messenger/jmessenger/inc/class.CommonFunctions.inc.php	(revision 3102)
+++ /trunk/jabberit_messenger/jmessenger/inc/class.CommonFunctions.inc.php	(revision 7655)
@@ -29,5 +29,5 @@
 		$key = "";
 		
-		for( $i = 0 ; $i < 61; $i++ )
+		for( $i = 0 ; $i < 61; ++$i )
 		{
 			$key   .= substr($char, $i, mt_rand(1,61));	
Index: /trunk/jabberit_messenger/jmessenger/inc/class.ContactsIm.inc.php
===================================================================
--- /trunk/jabberit_messenger/jmessenger/inc/class.ContactsIm.inc.php	(revision 3406)
+++ /trunk/jabberit_messenger/jmessenger/inc/class.ContactsIm.inc.php	(revision 7655)
@@ -70,5 +70,5 @@
 		if( is_array($users) )
 		{	
-			for($i = 0; $i < count($users); $i++)				
+			for($i = 0; $i < count($users); ++$i)
 			{
 				if( is_array($hostsJabber) )
@@ -204,7 +204,7 @@
 			$_restrict = array();
 			
-			for( $i = 0 ; $i < count($orgs) ; $i++ )
-			{
-				for( $j = 0 ; $j < count($array_uids) ; $j++ )
+			for( $i = 0 ; $i < count($orgs) ; ++$i )
+			{
+				for( $j = 0 ; $j < count($array_uids) ; ++$j )
 				{
 					if( trim($array_uids[$j]['ou']) === trim($orgs[$i]) )
@@ -248,5 +248,5 @@
 	{
 	    $result = array();
-	    for($i = $offset; $i< strlen($haystack); $i++ )
+	    for($i = $offset; $i< strlen($haystack); ++$i )
 	    {
 	        $pos = strpos($haystack,$needle,$i);
@@ -332,5 +332,5 @@
 						$orgs = array();
 				
-						for( $i = 0 ; $i < count($posAll); $i++ )
+						for( $i = 0 ; $i < count($posAll); ++$i )
 						{
 							$pos = strpos($ou_User, ",");
@@ -370,5 +370,5 @@
 							$orgs = array();
 					
-							for( $i = 0 ; $i < count($posAll); $i++ )
+							for( $i = 0 ; $i < count($posAll); ++$i )
 							{
 								$pos = strpos($ou_User, ",");
Index: /trunk/jabberit_messenger/jmessenger/inc/class.LdapIM.inc.php
===================================================================
--- /trunk/jabberit_messenger/jmessenger/inc/class.LdapIM.inc.php	(revision 3530)
+++ /trunk/jabberit_messenger/jmessenger/inc/class.LdapIM.inc.php	(revision 7655)
@@ -125,5 +125,5 @@
 			$confHosts	= $this->hostsJabber;
 			
-			for($i = 0; $i < count($confHosts); $i++ )
+			for($i = 0; $i < count($confHosts); ++$i )
 			{
 				if( $pData['serverLdap'] == $confHosts[$i]['serverLdap'] )
@@ -197,5 +197,5 @@
 				$count = count($members[$servers]);
 				
-				for( $i = 0; $i < $count; $i++ )
+				for( $i = 0; $i < $count; ++$i )
 				{
 					if ( ! $this->getMemberUid($groups, $members[$servers][$i]['uid'] ) )
@@ -210,5 +210,5 @@
 				$confHosts	= $this->hostsJabber;
 			
-				for($i = 0; $i < count($confHosts); $i++ )
+				for($i = 0; $i < count($confHosts); ++$i )
 				{
 					if( $this->ldap )
@@ -279,5 +279,5 @@
 			$confHosts	= $this->hostsJabber;
 		
-			for($i = 0; $i < count($confHosts); $i++ )
+			for($i = 0; $i < count($confHosts); ++$i )
 			{
 				if( $this->ldap )
@@ -322,5 +322,5 @@
 			$confHosts	= $this->hostsJabber;
 			
-			for($i = 0; $i < count($confHosts); $i++ )
+			for($i = 0; $i < count($confHosts); ++$i )
 			{
 				if( $pLdap_host == $confHosts[$i]['serverLdap'] )
@@ -344,5 +344,5 @@
 			$info = ldap_get_entries($this->ldap, $search);
 		
-			for ($i=0; $i<$info["count"]; $i++)
+			for ($i=0; $i<$info["count"]; ++$i)
 			{
 				$a_sectors[] = $info[$i]['dn'];
@@ -375,5 +375,5 @@
             else 
             {
-				for( $i = 0; $i < $level; $i++)
+				for( $i = 0; $i < $level; ++$i)
 					$display .= '---';
             }
@@ -399,5 +399,5 @@
 			$confHosts	= $this->hostsJabber;	
 
-			for( $i = 0; $i < count($confHosts); $i++ )
+			for( $i = 0; $i < count($confHosts); ++$i )
 			{
 				if( trim($host) === trim($confHosts[$i]['jabberName']) )
@@ -427,5 +427,5 @@
 			$entry		= ldap_get_entries( $this->ldap, $search );
 			
-			for( $i = 0 ; $i < $entry['count']; $i++ )
+			for( $i = 0 ; $i < $entry['count']; ++$i )
 			{
 				if( $entry[$i]['jpegphoto'][0] && $entry[$i]['phpgwaccountvisible'][0] != '-1' )
@@ -454,5 +454,5 @@
 		$conn	= "";		
 
-		for( $i = 0; $i < count($confHosts); $i++ )
+		for( $i = 0; $i < count($confHosts); ++$i )
 		{
 			if( $pLdap && $pLdap == $confHosts[$i]['serverLdap'] )
@@ -513,5 +513,5 @@
 		$j		= 0;
 		
-		for( $i = 0 ; $i < $entry['count']; $i++ )
+		for( $i = 0 ; $i < $entry['count']; ++$i )
 		{
 			if ( $entry[$i]['phpgwaccountvisible'][0] != '-1' )
Index: /trunk/jabberit_messenger/jmessenger/inc/class.DataBaseIM.inc.php
===================================================================
--- /trunk/jabberit_messenger/jmessenger/inc/class.DataBaseIM.inc.php	(revision 3326)
+++ /trunk/jabberit_messenger/jmessenger/inc/class.DataBaseIM.inc.php	(revision 7655)
@@ -59,5 +59,5 @@
 		$return = "";	
 		
-		for( $i = 0 ; $i < count($hostsJabber); $i++ )
+		for( $i = 0 ; $i < count($hostsJabber); ++$i )
 			if( $hostsJabber[$i]['org'] == $findHosts[0] && $hostsJabber[$i]['jabberName'] == $findHosts[1] )
 			{
@@ -469,5 +469,5 @@
 		{
 		    $result = array();
-		    for($i = $offset; $i< strlen($haystack); $i++ )
+		    for($i = $offset; $i< strlen($haystack); ++$i )
 		    {
 		        $pos = strpos($haystack,$needle,$i);
@@ -490,5 +490,5 @@
 		$orgs = array();
 
-		for( $i = 0 ; $i < count($posAll); $i++ )
+		for( $i = 0 ; $i < count($posAll); ++$i )
 		{
 			$pos = strpos($organization, ",");
@@ -628,5 +628,5 @@
 					if( count($confHostsOrgs) > 0 )
 					{
-						for( $i = 0; $i < count($confHostsOrgs); $i++)
+						for( $i = 0; $i < count($confHostsOrgs); ++$i)
 							if( $confHostsOrgs[$i]['org'] == $hosts[0] && $confHostsOrgs[$i]['jabberName'] == $hosts[1])
 								$key = $i;	
Index: /trunk/jabberit_messenger/jmessenger/inc/Controller.class.php
===================================================================
--- /trunk/jabberit_messenger/jmessenger/inc/Controller.class.php	(revision 3102)
+++ /trunk/jabberit_messenger/jmessenger/inc/Controller.class.php	(revision 7655)
@@ -111,5 +111,5 @@
 		$contents_itens = $this->controller_contentes->getElementsByTagName(self::__CONTROLLER_CONTENTES_ITEM__);
 
-		for ( $i = 0; $i < $contents_itens->length && $contents_itens->item($i)->getAttribute(self::__CONTROLLER_CONTENTES_ITEM_PARAM__) != $section_name; $i++ );
+		for ( $i = 0; $i < $contents_itens->length && $contents_itens->item($i)->getAttribute(self::__CONTROLLER_CONTENTES_ITEM_PARAM__) != $section_name; ++$i );
 		( !($i < $contents_itens->length) )
 			and die(__CLASS__ . ' [ ERROR #11 ] :: invalid section "' . $section_name . '"');
@@ -127,7 +127,7 @@
 
 		if ( empty($alias) && $alias !== '0' )
-			for ( $i = 0; $i < $section_itens->length && $section_itens->item($i)->getAttribute('ref') != $ref; $i++ );
+			for ( $i = 0; $i < $section_itens->length && $section_itens->item($i)->getAttribute('ref') != $ref; ++$i );
 		else
-			for ( $i = 0; $i < $section_itens->length && ( $section_itens->item($i)->getAttribute('ref') != $ref || $section_itens->item($i)->getAttribute('alias') !== $alias); $i++ );
+			for ( $i = 0; $i < $section_itens->length && ( $section_itens->item($i)->getAttribute('ref') != $ref || $section_itens->item($i)->getAttribute('alias') !== $alias); ++$i );
 
 		( !($i < $section_itens->length) )
Index: /trunk/jabberit_messenger/inc/login.php
===================================================================
--- /trunk/jabberit_messenger/inc/login.php	(revision 3155)
+++ /trunk/jabberit_messenger/inc/login.php	(revision 7655)
@@ -88,5 +88,5 @@
 			$pluginsJava[] = "callVoip.jar";		
 		
-		for( $i = 0; $i < count($pluginsJava); $i++ )
+		for( $i = 0; $i < count($pluginsJava); ++$i )
 		{
 			$javaFiles	 .= $path . "plugins/" . $pluginsJava[$i] . ",";
Index: /trunk/jabberit_messenger/inc/jabberit_acl.inc.php
===================================================================
--- /trunk/jabberit_messenger/inc/jabberit_acl.inc.php	(revision 6179)
+++ /trunk/jabberit_messenger/inc/jabberit_acl.inc.php	(revision 7655)
@@ -40,5 +40,5 @@
 	$size_of_acl = sizeof($GLOBALS['phpgw_info']['user']['acl']);
 	
-	for( $i = 0; $i < $size_of_acl && $GLOBALS['phpgw_info']['user']['acl'] != "jabberit_messenger"; $i++ )
+	for( $i = 0; $i < $size_of_acl && $GLOBALS['phpgw_info']['user']['acl'] != "jabberit_messenger"; ++$i )
 	{
 		$apps = unserialize($GLOBALS['phpgw_info']['server']['apps_jabberit']);
Index: /trunk/jabberit_messenger/inc/class.contacts_im.inc.php
===================================================================
--- /trunk/jabberit_messenger/inc/class.contacts_im.inc.php	(revision 3530)
+++ /trunk/jabberit_messenger/inc/class.contacts_im.inc.php	(revision 7655)
@@ -93,5 +93,5 @@
 		if( is_array($users) )
 		{	
-			for($i = 0; $i < count($users); $i++)				
+			for($i = 0; $i < count($users); ++$i)
 			{
 				if( is_array($hostsJabber) )
@@ -226,7 +226,7 @@
 			$_restrict = array();
 			
-			for( $i = 0 ; $i < count($orgs) ; $i++ )
-			{
-				for( $j = 0 ; $j < count($array_uids) ; $j++ )
+			for( $i = 0 ; $i < count($orgs) ; ++$i )
+			{
+				for( $j = 0 ; $j < count($array_uids) ; ++$j )
 				{
 					if( trim($array_uids[$j]['ou']) === trim($orgs[$i]) )
@@ -248,5 +248,5 @@
 	{
 	    $result = array();
-	    for($i = $offset; $i< strlen($haystack); $i++ )
+	    for($i = $offset; $i< strlen($haystack); ++$i )
 	    {
 	        $pos = strpos($haystack,$needle,$i);
@@ -332,5 +332,5 @@
 						$orgs = array();
 				
-						for( $i = 0 ; $i < count($posAll); $i++ )
+						for( $i = 0 ; $i < count($posAll); ++$i )
 						{
 							$pos = strpos($ou_User, ",");
@@ -370,5 +370,5 @@
 							$orgs = array();
 					
-							for( $i = 0 ; $i < count($posAll); $i++ )
+							for( $i = 0 ; $i < count($posAll); ++$i )
 							{
 								$pos = strpos($ou_User, ",");
Index: /trunk/jabberit_messenger/inc/class.ldap_im.inc.php
===================================================================
--- /trunk/jabberit_messenger/inc/class.ldap_im.inc.php	(revision 3530)
+++ /trunk/jabberit_messenger/inc/class.ldap_im.inc.php	(revision 7655)
@@ -126,5 +126,5 @@
 			$confHosts	= $this->hostsJabber;
 			
-			for($i = 0; $i < count($confHosts); $i++ )
+			for($i = 0; $i < count($confHosts); ++$i )
 			{
 				if( $pData['serverLdap'] == $confHosts[$i]['serverLdap'] )
@@ -198,5 +198,5 @@
 				$count = count($members[$servers]);
 				
-				for( $i = 0; $i < $count; $i++ )
+				for( $i = 0; $i < $count; ++$i )
 				{
 					if ( ! $this->getMemberUid($groups, $members[$servers][$i]['uid'] ) )
@@ -211,5 +211,5 @@
 				$confHosts	= $this->hostsJabber;
 			
-				for($i = 0; $i < count($confHosts); $i++ )
+				for($i = 0; $i < count($confHosts); ++$i )
 				{
 					if( $this->ldap )
@@ -227,5 +227,5 @@
 						$count = count($members[$servers]);
 						
-						for( $i = 0; $i < $count; $i++ )
+						for( $i = 0; $i < $count; ++$i )
 						{
 							if ( ! $this->getMemberUid($groups, $members[$servers][$i]['uid'] ) )
@@ -280,5 +280,5 @@
 			$confHosts	= $this->hostsJabber;
 		
-			for($i = 0; $i < count($confHosts); $i++ )
+			for($i = 0; $i < count($confHosts); ++$i )
 			{
 				if( $this->ldap )
@@ -323,5 +323,5 @@
 			$confHosts	= $this->hostsJabber;
 			
-			for($i = 0; $i < count($confHosts); $i++ )
+			for($i = 0; $i < count($confHosts); ++$i )
 			{
 				if( $pLdap_host == $confHosts[$i]['serverLdap'] )
@@ -345,5 +345,5 @@
 			$info = ldap_get_entries($this->ldap, $search);
 		
-			for ($i=0; $i<$info["count"]; $i++)
+			for ($i=0; $i<$info["count"]; ++$i)
 			{
 				$a_sectors[] = $info[$i]['dn'];
@@ -376,5 +376,5 @@
             else 
             {
-				for( $i = 0; $i < $level; $i++)
+				for( $i = 0; $i < $level; ++$i)
 					$display .= '---';
             }
@@ -398,5 +398,5 @@
 		$conn	= "";		
 
-		for( $i = 0; $i < count($confHosts); $i++ )
+		for( $i = 0; $i < count($confHosts); ++$i )
 		{
 			if( $pLdap && $pLdap == $confHosts[$i]['serverLdap'] )
@@ -456,5 +456,5 @@
 		$j		= 0;
 		
-		for( $i = 0 ; $i < $entry['count']; $i++ )
+		for( $i = 0 ; $i < $entry['count']; ++$i )
 		{
 			if ( $entry[$i]['phpgwaccountvisible'][0] != '-1' )
Index: /trunk/jabberit_messenger/inc/class.db_im.inc.php
===================================================================
--- /trunk/jabberit_messenger/inc/class.db_im.inc.php	(revision 3266)
+++ /trunk/jabberit_messenger/inc/class.db_im.inc.php	(revision 7655)
@@ -60,5 +60,5 @@
 		$return = "";	
 		
-		for( $i = 0 ; $i < count($hostsJabber); $i++ )
+		for( $i = 0 ; $i < count($hostsJabber); ++$i )
 			if( $hostsJabber[$i]['org'] == $findHosts[0] && $hostsJabber[$i]['jabberName'] == $findHosts[1] )
 			{
@@ -496,5 +496,5 @@
 		{
 		    $result = array();
-		    for($i = $offset; $i< strlen($haystack); $i++ )
+		    for($i = $offset; $i< strlen($haystack); ++$i )
 		    {
 		        $pos = strpos($haystack,$needle,$i);
@@ -517,5 +517,5 @@
 		$orgs = array();
 
-		for( $i = 0 ; $i < count($posAll); $i++ )
+		for( $i = 0 ; $i < count($posAll); ++$i )
 		{
 			$pos = strpos($organization, ",");
@@ -655,5 +655,5 @@
 					if( count($confHostsOrgs) > 0 )
 					{
-						for( $i = 0; $i < count($confHostsOrgs); $i++)
+						for( $i = 0; $i < count($confHostsOrgs); ++$i)
 							if( $confHostsOrgs[$i]['org'] == $hosts[0] && $confHostsOrgs[$i]['jabberName'] == $hosts[1])
 								$key = $i;	
Index: /trunk/jabberit_messenger/inc/Controller.class.php
===================================================================
--- /trunk/jabberit_messenger/inc/Controller.class.php	(revision 3199)
+++ /trunk/jabberit_messenger/inc/Controller.class.php	(revision 7655)
@@ -111,5 +111,5 @@
 		$contents_itens = $this->controller_contentes->getElementsByTagName(self::__CONTROLLER_CONTENTES_ITEM__);
 
-		for ( $i = 0; $i < $contents_itens->length && $contents_itens->item($i)->getAttribute(self::__CONTROLLER_CONTENTES_ITEM_PARAM__) != $section_name; $i++ );
+		for ( $i = 0; $i < $contents_itens->length && $contents_itens->item($i)->getAttribute(self::__CONTROLLER_CONTENTES_ITEM_PARAM__) != $section_name; ++$i );
 		( !($i < $contents_itens->length) )
 			and die(__CLASS__ . ' [ ERROR #11 ] :: invalid section "' . $section_name . '"');
@@ -127,7 +127,7 @@
 
 		if ( empty($alias) && $alias !== '0' )
-			for ( $i = 0; $i < $section_itens->length && $section_itens->item($i)->getAttribute('ref') != $ref; $i++ );
+			for ( $i = 0; $i < $section_itens->length && $section_itens->item($i)->getAttribute('ref') != $ref; ++$i );
 		else
-			for ( $i = 0; $i < $section_itens->length && ( $section_itens->item($i)->getAttribute('ref') != $ref || $section_itens->item($i)->getAttribute('alias') !== $alias); $i++ );
+			for ( $i = 0; $i < $section_itens->length && ( $section_itens->item($i)->getAttribute('ref') != $ref || $section_itens->item($i)->getAttribute('alias') !== $alias); ++$i );
 
 		( !($i < $section_itens->length) )
Index: /trunk/contactcenter/inc/class.bo_shared_people_manager.inc.php
===================================================================
--- /trunk/contactcenter/inc/class.bo_shared_people_manager.inc.php	(revision 5509)
+++ /trunk/contactcenter/inc/class.bo_shared_people_manager.inc.php	(revision 7655)
@@ -402,5 +402,5 @@
 					$return['relation'.$count]['type'] = $relation->get_type_name(); 
 					$return['relation'.$count]['is_subordinated'] = $relation->get_is_subordinated();
-					$count++;
+					++$count;
 				}
 				else if ($extra !== 'subordinated')
@@ -410,5 +410,5 @@
 					$return['relation'.$count]['type'] = $relation->get_type_name(); 
 					$return['relation'.$count]['is_subordinated'] = $relation->get_is_subordinated();
-					$count++;
+					++$count;
 				}
 			}
@@ -581,5 +581,5 @@
 					$return['connection'.$count]['connection_value'] = $connection->get_value();
 					$return['connection'.$count]['connection_is_default'] = $connection->is_default();
-					$count++;
+					++$count;
 				}
 				else if ($extra !== 'default')
@@ -592,5 +592,5 @@
 					$return['connection'.$count]['connection_value'] = $connection->get_value();
 					$return['connection'.$count]['connection_is_default'] = $connection->is_default();
-					$count++;
+					++$count;
 				}
 			}
@@ -638,5 +638,5 @@
 					$return['company'.$count]['default_company'] = $value['default_company'];
 					$return['company'.$count]['default_contact'] = $value['default_contact'];
-					$count++;
+					++$count;
 				}
 				else if ($extra !== 'default')
@@ -648,5 +648,5 @@
 					$return['company'.$count]['default_company'] = $value['default_company'];
 					$return['company'.$count]['default_contact'] = $value['default_contact'];
-					$count++;
+					++$count;
 				}
 			}
@@ -1146,5 +1146,5 @@
 			 		'connection_is_default' => 1,
 		 		);
-				$i++;
+				++$i;
 			}
 
Index: /trunk/contactcenter/inc/class.so_main.inc.php
===================================================================
--- /trunk/contactcenter/inc/class.so_main.inc.php	(revision 1689)
+++ /trunk/contactcenter/inc/class.so_main.inc.php	(revision 7655)
@@ -240,7 +240,7 @@
 							$this->manage_fields($this->db_tables[$table]['fields'][$field_info['name']], 'sync', 'new');
 						}
-						$pos++;
-					}
-					$pos++;
+						++$pos;
+					}
+					++$pos;
 				}
 			}
@@ -389,5 +389,5 @@
 					$where = false;
 					$n_values = count($table_info['keys']['primary'][0]['values']);
-					for ($i = 0; $i < $n_values; $i++)
+					for ($i = 0; $i < $n_values; ++$i)
 					{
 						unset($where);
@@ -524,5 +524,5 @@
 			
 			reset($table_info['fields']);
-			for ($i = 0; $i < $n_values; $i++)
+			for ($i = 0; $i < $n_values; ++$i)
 			{
 				$multi_table_changed = false;
Index: /trunk/contactcenter/inc/class.bo_ldap_manager.inc.php
===================================================================
--- /trunk/contactcenter/inc/class.bo_ldap_manager.inc.php	(revision 4838)
+++ /trunk/contactcenter/inc/class.bo_ldap_manager.inc.php	(revision 7655)
@@ -227,5 +227,5 @@
 			// stream_select native timeout.
 			$response = NULL;
-			for ($i = 0; $i < $timeout; $i++)
+			for ($i = 0; $i < $timeout; ++$i)
 			{
 				if ($tsearch->isActive())
@@ -376,5 +376,5 @@
 			$entries = ldap_get_entries($resource, $result_res);
 			
-			for ($i = 0; $i < $entries['count']; $i++)
+			for ($i = 0; $i < $entries['count']; ++$i)
 			{
 				$subtree = $this->get_ldap_tree_recursive($resource, $entries[$i]['dn'], $objectClass);
@@ -439,5 +439,5 @@
 			$sub_branches = array();
 			
-			for($i = 0; $i <count($referral); $i++) {
+			for($i = 0; $i <count($referral); ++$i) {
 				$dn = str_replace("??base","",preg_replace('!^(ldap://[^/]+)/(.*$)!', '\\2', $referral[$i]));
 				$dn = explode(",",$dn);				
Index: /trunk/contactcenter/inc/class.bo_global_ldap_catalog.inc.php
===================================================================
--- /trunk/contactcenter/inc/class.bo_global_ldap_catalog.inc.php	(revision 5399)
+++ /trunk/contactcenter/inc/class.bo_global_ldap_catalog.inc.php	(revision 7655)
@@ -194,5 +194,5 @@
 
 		    $rEntry = ldap_first_entry( $ldap, $result_r );
-		    for ( $iCurrent = 0; $iCurrent < $iEnd ;$iCurrent++)
+		    for ( $iCurrent = 0; $iCurrent < $iEnd ;++$iCurrent)
 		    {
 
@@ -262,5 +262,5 @@
 
                     $rEntry = ldap_first_entry( $ldap, $result_r );
-                    for ( $iCurrent = 0; $iCurrent < $iEnd ;$iCurrent++)
+                    for ( $iCurrent = 0; $iCurrent < $iEnd ;++$iCurrent)
                     {
 
@@ -769,5 +769,5 @@
 								$contact_data['relations']['relation'.$i]['type'] = $l_type;
 								$contact_data['relations']['relation'.$i]['names_ordered'] = utf8_decode($contact[$l_type_fields[0]][0]);
-								$i++;
+								++$i;
 							}
 						}
@@ -818,5 +818,5 @@
 									$contact_data['addresses']['address'.$i]['type'] = $l_type;
 									$contact_data['addresses']['address'.$i][$l_field] = utf8_decode($contact[$l_type_fields[0]][0]);
-									$i++;
+									++$i;
 								}
 							}
@@ -872,5 +872,5 @@
 									$contact_data['connections']['connection'.$i]['type'] = $l_type;
 									$contact_data['connections']['connection'.$i][$l_field] = utf8_decode($contact[$l_type_fields[0]][0]);
-									$i++;
+									++$i;
 								}
 							}
@@ -1096,5 +1096,5 @@
 									$contact_data['relations']['relation'.$i]['type'] = $l_type;
 									$contact_data['relations']['relation'.$i]['names_ordered'] = utf8_decode($contact[$l_type_fields[0]][0]);
-									$i++;
+									++$i;
 								}
 							}
@@ -1145,5 +1145,5 @@
 										$contact_data['addresses']['address'.$i]['type'] = $l_type;
 										$contact_data['addresses']['address'.$i][$l_field] = utf8_decode($contact[$l_type_fields[0]][0]);
-										$i++;
+										++$i;
 									}
 								}
@@ -1200,5 +1200,5 @@
 										$contact_data['connections']['connection'.$i]['type'] = $l_type;
 										$contact_data['connections']['connection'.$i][$l_field] = utf8_decode($contact[$l_type_fields[0]][0]);
-										$i++;
+										++$i;
 									}
 								}
@@ -1360,5 +1360,5 @@
 			{
 				$filter = '(&(objectClass='.$this->src_info['obj'] .  ')(|';
-				for ($i = 0; $i < $size; $i++)
+				for ($i = 0; $i < $size; ++$i)
 				{
 
Index: /trunk/contactcenter/inc/class.bo_company_manager.inc.php
===================================================================
--- /trunk/contactcenter/inc/class.bo_company_manager.inc.php	(revision 2)
+++ /trunk/contactcenter/inc/class.bo_company_manager.inc.php	(revision 7655)
@@ -213,5 +213,5 @@
 				$return['relation'.$count]['type'] = $relation->get_type_name(); 
 				$return['relation'.$count]['is_subordinated'] = $relation->get_is_subordinated();
-				$count++;
+				++$count;
 			}
 			
@@ -285,5 +285,5 @@
 				$return['address'.$count]['id_country'] = $address->get_id_country();
 				$return['address'.$count]['country_name'] = $address->get_country_name();
-				$count++;
+				++$count;
 			}
 			
@@ -331,5 +331,5 @@
 				$return['connection'.$count]['connection_value'] = $connection->get_value();
 				$return['connection'.$count]['connection_is_default'] = $connection->is_default();
-				$count++;
+				++$count;
 			}
 			
@@ -368,5 +368,5 @@
 				$return['contact'.$count]['title'] = $value['title'];
 				$return['contact'.$count]['department'] = $value['department'];
-				$count++;
+				++$count;
 			}
 			
@@ -412,5 +412,5 @@
 				$return['legal'.$count]['legal_info_value'] = $legal->get_value();
 				$return['legal'.$count]['legal_is_default'] = $legal->is_default();
-				$count++;
+				++$count;
 			}
 			
Index: /trunk/contactcenter/inc/class.abo_catalog.inc.php
===================================================================
--- /trunk/contactcenter/inc/class.abo_catalog.inc.php	(revision 5915)
+++ /trunk/contactcenter/inc/class.abo_catalog.inc.php	(revision 7655)
@@ -308,5 +308,5 @@
 			
 			$n_fields = count($what);
-			for($i = 0; $i < $n_fields; $i++)
+			for($i = 0; $i < $n_fields; ++$i)
 			{
 				$path = $this->get_tables_by_field($what[$i], $tables_def);
@@ -354,5 +354,5 @@
 					if ($n_joins = count($query_fields_joins))
 					{
-						for($k = 0; $k < $n_joins; $k++)
+						for($k = 0; $k < $n_joins; ++$k)
 						{
 							if (preg_match("/$query_join_reg/",$query_fields_joins[$k]))
@@ -388,5 +388,5 @@
 			$n_restrictions = count($restric_fields);
 			
-			for ($i = 0; $i < $n_restrictions; $i++)
+			for ($i = 0; $i < $n_restrictions; ++$i)
 			{
 				$path = $this->get_tables_by_field($restric_fields[$i], $tables_def);
@@ -428,5 +428,5 @@
 					if ($n_joins = count($query_restric_joins))
 					{
-						for($k = 0; $k < $n_joins; $k++)
+						for($k = 0; $k < $n_joins; ++$k)
 						{
 							if (preg_match("/$query_join_reg/",$query_restric_joins[$k]))
@@ -605,5 +605,5 @@
 			$return = array();
 			$previous = false;
-			for($i = 0; $i < $n_fields-1; $i++)
+			for($i = 0; $i < $n_fields-1; ++$i)
 			{
 				$actual = $field_parts[$i];
Index: /trunk/contactcenter/inc/class.bo_people_catalog.inc.php
===================================================================
--- /trunk/contactcenter/inc/class.bo_people_catalog.inc.php	(revision 5131)
+++ /trunk/contactcenter/inc/class.bo_people_catalog.inc.php	(revision 7655)
@@ -355,5 +355,5 @@
 					$return['relation'.$count]['type'] = $relation->get_type_name(); 
 					$return['relation'.$count]['is_subordinated'] = $relation->get_is_subordinated();
-					$count++;
+					++$count;
 				}
 				else if ($extra !== 'subordinated')
@@ -363,5 +363,5 @@
 					$return['relation'.$count]['type'] = $relation->get_type_name(); 
 					$return['relation'.$count]['is_subordinated'] = $relation->get_is_subordinated();
-					$count++;
+					++$count;
 				}
 			}
@@ -541,5 +541,5 @@
 						$return['connection'.$count]['connection_value'] = $connection->get_value();
 						$return['connection'.$count]['connection_is_default'] = $connection->is_default();
-						$count++;
+						++$count;
 					}
 					else if ($extra !== 'default')
@@ -552,5 +552,5 @@
 						$return['connection'.$count]['connection_value'] = $connection->get_value();
 						$return['connection'.$count]['connection_is_default'] = $connection->is_default();
-						$count++;
+						++$count;
 					}
 				}
@@ -674,5 +674,5 @@
 					$return['company'.$count]['default_company'] = $value['default_company'];
 					$return['company'.$count]['default_contact'] = $value['default_contact'];
-					$count++;
+					++$count;
 				}
 				else if ($extra !== 'default')
@@ -684,5 +684,5 @@
 					$return['company'.$count]['default_company'] = $value['default_company'];
 					$return['company'.$count]['default_contact'] = $value['default_contact'];
-					$count++;
+					++$count;
 				}
 			}
@@ -1246,5 +1246,5 @@
 			 		'connection_is_default' => 1,
 		 		);
-				$i++;
+				++$i;
 			}
 			
@@ -1257,5 +1257,5 @@
 			 		'connection_is_default' => 0,
 		 		);
-				$i++;
+				++$i;
 			}
 							
@@ -1273,5 +1273,5 @@
 				{
 					if($connection_fields['connection_value'] != ''){
-						$i++;
+						++$i;
 						$new_data['connections']['connection'.$i] = array(
 				 		'id_typeof_connection'  => $preferences['personCardPhone'],
@@ -1288,5 +1288,5 @@
 				foreach($data['connections']['aditional_phone'] as $connection_name => $connection_fields)
 				{
-					$i++;
+					++$i;
 					$new_data['connections']['connection'.$i] = array(
 			 		'id_typeof_connection'  => $preferences['personCardPhone'],
@@ -1310,5 +1310,5 @@
 			 		'address_is_default' => 0,
 		 		);
-				$i++;
+				++$i;
 			
 		 		$new_data['addresses']['address'.$i] = array(
@@ -1323,5 +1323,5 @@
 			 		'address_is_default' => 1,
 		 		);							
-				$i++;
+				++$i;
 			}
 
@@ -1342,5 +1342,5 @@
 					'address_is_default'	=> 'false',
 				);
-				$j++;
+				++$j;
 			}*/
 
Index: /trunk/contactcenter/inc/class.ui_api.inc.php
===================================================================
--- /trunk/contactcenter/inc/class.ui_api.inc.php	(revision 7497)
+++ /trunk/contactcenter/inc/class.ui_api.inc.php	(revision 7655)
@@ -291,5 +291,5 @@
 						$date[$j]['name'] = lang('Day');
 				}
-				$j++;
+				++$j;
 			}
 			
@@ -416,5 +416,5 @@
 			$fieldsTop = 10;
 			$fieldsSpace = 30;
-			for ($i = 0; $i < $nFields; $i++)
+			for ($i = 0; $i < $nFields; ++$i)
 			{
 				$fieldsHTML .= '<span id="ccQuickAddT'.$i.'" style="position: absolute; top: '.($fieldsTop+$i*$fieldsSpace).'px; left: 5px; width: 100px; text-align: right; border: 0px solid #999;">'.$fields[$i].':</span>'."\n";
Index: /trunk/contactcenter/inc/class.ui_data.inc.php
===================================================================
--- /trunk/contactcenter/inc/class.ui_data.inc.php	(revision 5928)
+++ /trunk/contactcenter/inc/class.ui_data.inc.php	(revision 7655)
@@ -735,5 +735,5 @@
 				{
 					$validos[$uid_relacionado] = $perms_relacao[$uid_relacionado];
-					$count++;
+                    ++$count;
 				}
 			}
@@ -812,5 +812,5 @@
 								{
 									$validos[$uid_relacionado] = $perms_relacao[$uid_relacionado];
-									$count++;
+                                    ++$count;
 								}
 							}
@@ -833,5 +833,5 @@
                                         			$infos = ldap_get_entries($s, $r);
                                         			ldap_close($s);
-                                        			for($z = 0; $z < $infos['count']; $z++) {
+                                        			for($z = 0; $z < $infos['count']; ++$z) {
                                                 			$prop_names[$infos[$z]['uidnumber'][0]] = array("cn" => $infos[$z]['cn'][0], "uid" => $infos[$z]['uid'][0]);
                                         			}
@@ -1412,5 +1412,5 @@
 				}
 
-				for($i = $id_i; $i < $id_f and $i < $n_entries; $i++)
+				for($i = $id_i; $i < $id_f and $i < $n_entries; ++$i)
 				{
 /**rev 104**/
@@ -1449,5 +1449,5 @@
 					$info = ldap_get_entries($ds, $sr);
 					ldap_close($ds);
-					for($z = 0; $z < $info['count']; $z++) {
+					for($z = 0; $z < $info['count']; ++$z) {
 						$owner_names[$info[$z]['uidnumber'][0]] = array("cn" => $info[$z]['cn'][0], "uid" => $info[$z]['uid'][0]);
 					}
@@ -1463,5 +1463,5 @@
 								$info = ldap_get_entries($ds, $sr);
 								ldap_close($ds);
-								for($z = 0; $z < $info['count']; $z++) {
+								for($z = 0; $z < $info['count']; ++$z) {
 									$owner_names[$info[$z]['uidnumber'][0]] = array("cn" => $info[$z]['cn'][0], "uid" => $info[$z]['uid'][0]);
 								}	
@@ -1478,5 +1478,5 @@
 
 				/// Original
-				//for($i = $id_i; $i < $id_f and $i < $n_entries; $i++)
+				//for($i = $id_i; $i < $id_f and $i < $n_entries; ++$i)
 				//{
 				//	$ids[] = $this->page_info['actual_entries'][$i];
@@ -1518,6 +1518,6 @@
 							$final[3][$i][6] = $owner_names[$owners[$i]]['uid'];
 							$final[3][$i][7] = $owners[$i]; //uidNumber
-						}						
-						$i++;							
+						}
+                        ++$i;
 					}
 
@@ -1683,8 +1683,8 @@
 
 						$final[4][$i] = $contact['photo'] ? 1  : 0;
-						
-
-
-						$i++;
+
+
+
+                        ++$i;
 					}
 					else
@@ -1742,5 +1742,5 @@
 				$sr = ldap_search($ds,$dn, $filter,$justThese);
 				$info = ldap_get_entries($ds, $sr);
-				for($z = 0; $z < $info['count']; $z++) {
+				for($z = 0; $z < $info['count']; ++$z) {
 					$owner_names[$info[$z]['uidnumber'][0]] = array("cn" => $info[$z]['cn'][0], "uid" => $info[$z]['uid'][0]);
 				}
@@ -1753,5 +1753,5 @@
 							$info = ldap_get_entries($ds, $sr);
 							ldap_close($ds);
-							for($z = 0; $z < $info['count']; $z++) {
+							for($z = 0; $z < $info['count']; ++$z) {
 								$owner_names[$info[$z]['uidnumber'][0]] = array("cn" => $info[$z]['cn'][0], "uid" => $info[$z]['uid'][0]);
 							}
@@ -1859,5 +1859,5 @@
 						$birthdate[$j] = $date[2];
 				}
-				$j++;
+                ++$j;
 			}
 			$datecount = 0;
@@ -1938,5 +1938,5 @@
 					'short_name' 	=> $group['short_name']
 				);
-				$i++;
+                ++$i;
 			}
 
@@ -1983,5 +1983,5 @@
 				}
 
-				$i++;
+                ++$i;
 			}
 
@@ -2118,5 +2118,5 @@
 
                         $actualCatalog = $this->get_actual_catalog();
-                        for ($i = 0; $i < count($data['contact_in_list']); $i++)
+                        for ($i = 0; $i < count($data['contact_in_list']); ++$i)
                         {
                             if (preg_match('/ldap:.*:.*/', $data['contact_in_list'][$i])) // from ldap
@@ -2357,5 +2357,5 @@
 				sleep(1);
 				$photo_ok = $GLOBALS['phpgw']->session->appsession('ui_data.photo','contactcenter');
-				$sleep_count++;
+                ++$sleep_count;
 
 				if ($sleep_count > 35)
@@ -2410,5 +2410,5 @@
 						$date[$j]['digit'] = 'D';
 				}
-				$j++;
+                ++$j;
 			}
 			$datecount = 0;
@@ -2420,5 +2420,5 @@
 				$aa = count($dataConn);
 
-				for($i = 0; $i < $aa; $i++ )
+				for($i = 0; $i < $aa; ++$i )
 				{
 				    if($dataConn['connection'.$i]['connection_is_default'] == "TRUE")
@@ -2480,6 +2480,6 @@
 							unset($data[$field]);
 						}
-						
-						$datecount++;
+
+                        ++$datecount;
 
 						if ($datecount != 3)
@@ -2666,5 +2666,5 @@
 				sleep(1);
 				$photo_ok = $GLOBALS['phpgw']->session->appsession('ui_data.photo','contactcenter');
-				$sleep_count++;
+                ++$sleep_count;
 
 				if ($sleep_count > 35)
@@ -2719,5 +2719,5 @@
 						$date[$j]['digit'] = 'D';
 				}
-				$j++;
+                ++$j;
 			}
 			$datecount = 0;
@@ -2730,5 +2730,5 @@
 				$aa = count($dataConn);
 
-				for($i = 0; $i < $aa; $i++ )
+				for($i = 0; $i < $aa; ++$i )
 				{
 				    if($dataConn['connection'.$i]['connection_is_default'] == "TRUE")
@@ -2792,5 +2792,5 @@
 						}
 						unset($data[$field]);
-						$datecount++;
+                        ++$datecount;
 
 						if ($datecount != 3)
@@ -3626,5 +3626,5 @@
 
 							$jsCode[] = '_this.entries.options[_this.entries.options.length] = new Option("'.$optionName.' ('.$value.')", "'.$count.'");';
-							$count++;
+                            ++$count;
 						}
 					}
@@ -3643,5 +3643,5 @@
 								if ($connection['id_type'] == $this->preferences['personCardEmail'])	{
 									$jsCode[] = '_this.entries.options[_this.entries.options.length] = new Option("'.$name.' <'.$connection['connection_value'].'>", "'.$count.'");';
-									$count++;
+                                    ++$count;
 								}
 							}
@@ -3759,5 +3759,5 @@
 			$sr = ldap_read($ds,$id, "objectClass=*",$justThese);
 			$info = ldap_get_entries($ds, $sr);
-			for($z = 0; $z < 5; $z++) {
+			for($z = 0; $z < 5; ++$z) {
 				$participant = $info[0][$justThese[$z]];
 				$participant[0] = utf8_decode($participant[0]);
@@ -3789,5 +3789,5 @@
 			$contact['names_ordered'] = $info[0]['description'];
 			$filter = "";
-			for($z = 0; $z < count($member_uids); $z++) {
+			for($z = 0; $z < count($member_uids); ++$z) {
 				if($member_uids[$z])
 					$filter.="(uid=".$member_uids[$z].")";
@@ -3802,5 +3802,5 @@
 				$sr = ldap_search($ds,$dn, $filter,$justThese);
 				$info = ldap_get_entries($ds, $sr);
-				for($z = 0; $z < $info['count']; $z++) {
+				for($z = 0; $z < $info['count']; ++$z) {
 					$participant =  '<font color=\'DARKBLUE\'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;'.$info[$z]['cn'][0].'&quot; &lt;'.$info[$z]['mail'][0].'&gt;</font><br>';
 				    $array_emails[$info[$z]['mail'][0]] = null;
@@ -3830,5 +3830,5 @@
 
 			$filter = null;
-			for($z = 0; $z < $contact['mail_forwarding_address']['count']; $z++) {
+			for($z = 0; $z < $contact['mail_forwarding_address']['count']; ++$z) {
 					if(strstr($contact['mail_forwarding_address'][$z],'@')) {
 						$filter.="(mail=".$contact['mail_forwarding_address'][$z].")";
@@ -3850,5 +3850,5 @@
 				$sr = ldap_search($ds,$dn, $filter,$justThese);
 				$info = ldap_get_entries($ds, $sr);
-				for($z = 0; $z < $info['count']; $z++) {
+				for($z = 0; $z < $info['count']; ++$z) {
 					$participant =  '<font color=\'DARKBLUE\'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;'.$info[$z]['cn'][0].'&quot; &lt;'.$info[$z]['mail'][0].'&gt;</font><br>';
 					$array_emails[$info[$z]['mail'][0]] = null;
@@ -4339,5 +4339,5 @@
              			$text = trim($matches[2]);
 
-                		$fields[$field_num++] = $value;
+                		$fields[++$field_num] = $value;
             		} else {
                 		preg_match('/^([^' . $re_d . ']*)' . $re_d . '?(.*)$/', $text, $matches);
@@ -4346,5 +4346,5 @@
                			$text = trim($matches[2]);
 
-              		  	$fields[$field_num++] = $value;
+              		  	$fields[++$field_num] = $value;
             	}
         	}
@@ -4806,5 +4806,5 @@
 			if ($info)
 			{
-				for ($i = 0; $i < count($justThese); $i++)
+				for ($i = 0; $i < count($justThese); ++$i)
 				{
 					$attr = array();
@@ -4814,5 +4814,5 @@
 						$attr['type'] = 'multivalues';
 						$attr['value'] = array();
-						for ($j = 0; $j < $info[0][$justThese[$i]]['count']; $j++)
+						for ($j = 0; $j < $info[0][$justThese[$i]]['count']; ++$j)
 							$attr['value'][] = utf8_decode($info[0][$justThese[$i]][$j]);
 					}
Index: /trunk/contactcenter/inc/class.bo_contactcenter.inc.php
===================================================================
--- /trunk/contactcenter/inc/class.bo_contactcenter.inc.php	(revision 3282)
+++ /trunk/contactcenter/inc/class.bo_contactcenter.inc.php	(revision 7655)
@@ -410,5 +410,5 @@
 
 					}
-					$i++;
+					++$i;
 				}
 			}
@@ -434,5 +434,5 @@
 						$this->tree[$i]['type'] = 'ldap';
 						$this->tree[$i]['src'] = $id;
-					$i++;
+					++$i;
 				}
 			}	
@@ -461,5 +461,5 @@
 			
 			$code = '$branch =& $this->tree[\'branches\']';
-			for ($i = 1; $i < $n_ways-1; $i++)
+			for ($i = 1; $i < $n_ways-1; ++$i)
 			{
 				$code .= '['.$path[$i].'][\'sub_branch\']';
Index: /trunk/index.php
===================================================================
--- /trunk/index.php	(revision 7437)
+++ /trunk/index.php	(revision 7655)
@@ -141,5 +141,5 @@
 		$GLOBALS['phpgw']->common->phpgw_footer();
 	}*/
-		
+
 		if($_GET['menuaction']){
 			$modulo = explode('.', $_GET['menuaction']);
Index: /trunk/emailadmin/inc/class.postfixldap.inc.php
===================================================================
--- /trunk/emailadmin/inc/class.postfixldap.inc.php	(revision 2)
+++ /trunk/emailadmin/inc/class.postfixldap.inc.php	(revision 7655)
@@ -78,5 +78,5 @@
 				{
 					$count = $allValues[0]['mailalternateaddress']['count'];
-					for($i=0; $i < $count; $i++)
+					for($i=0; $i < $count; ++$i)
 					{
 						$emailAddresses[] = array
Index: /trunk/emailadmin/inc/class.ui.inc.php
===================================================================
--- /trunk/emailadmin/inc/class.ui.inc.php	(revision 1523)
+++ /trunk/emailadmin/inc/class.ui.inc.php	(revision 7655)
@@ -240,5 +240,5 @@
 			if ($profileList)
 			{
-				for ($i=0; $i < count($profileList); $i++)
+				for ($i=0; $i < count($profileList); ++$i)
 				{
 					$linkData = array
Index: /trunk/emailadmin/inc/class.bo.inc.php
===================================================================
--- /trunk/emailadmin/inc/class.bo.inc.php	(revision 1523)
+++ /trunk/emailadmin/inc/class.bo.inc.php	(revision 7655)
@@ -397,5 +397,5 @@
 							$newMailAlternateAddress[$i]=$value;
 							#print "!! $i: $value<br>";
-							$i++;
+							++$i;
 						}
 					}
@@ -432,5 +432,5 @@
 						{
 							$newMailRoutingAddress[$i]=$value;
-							$i++;
+							++$i;
 						}
 					}
Index: /trunk/emailadmin/inc/class.so.inc.php
===================================================================
--- /trunk/emailadmin/inc/class.so.inc.php	(revision 2)
+++ /trunk/emailadmin/inc/class.so.inc.php	(revision 7655)
@@ -125,5 +125,5 @@
 				$serverList[$i]['imapType']    = $this->db->f(4);
 				$serverList[$i]['description'] = $this->db->f(5);
-				$i++;
+				++$i;
 			}
 			
Index: /trunk/emailadmin/inc/class.uiuserdata.inc.php
===================================================================
--- /trunk/emailadmin/inc/class.uiuserdata.inc.php	(revision 2)
+++ /trunk/emailadmin/inc/class.uiuserdata.inc.php	(revision 7655)
@@ -78,5 +78,5 @@
 				{
 					$options_mailAlternateAddress = "<select size=\"6\" name=\"mailAlternateAddress\">\n";
-					for ($i=0;$i < count($userData['mailAlternateAddress']); $i++)
+					for ($i=0;$i < count($userData['mailAlternateAddress']); ++$i)
 					{
 						$options_mailAlternateAddress .= "<option value=\"$i\">".
@@ -94,5 +94,5 @@
 				{
 					$options_mailRoutingAddress = "<select size=\"6\" name=\"mailRoutingAddress\">\n";
-					for ($i=0;$i < count($userData['mailRoutingAddress']); $i++)
+					for ($i=0;$i < count($userData['mailRoutingAddress']); ++$i)
 					{
 						$options_mailRoutingAddress .= "<option value=\"$i\">".
Index: /trunk/setup/sqltoarray.php
===================================================================
--- /trunk/setup/sqltoarray.php	(revision 2)
+++ /trunk/setup/sqltoarray.php	(revision 7655)
@@ -189,5 +189,5 @@
 			while(list($key,$table) = @each($tables))
 			{
-				$i++;
+                ++$i;
 				if($i == $tbls)
 				{
Index: /trunk/setup/manageheader.php
===================================================================
--- /trunk/setup/manageheader.php	(revision 6164)
+++ /trunk/setup/manageheader.php	(revision 7655)
@@ -507,5 +507,5 @@
 				);
 
-				for($i=0; $i<30; $i++)
+				for($i=0; $i<30; ++$i)
 				{
 					$GLOBALS['phpgw_info']['server']['mcrypt_iv'] .= $random_char[rand(1,count($random_char))];
Index: /trunk/setup/config.php
===================================================================
--- /trunk/setup/config.php	(revision 5781)
+++ /trunk/setup/config.php	(revision 7655)
@@ -241,5 +241,5 @@
 					$newvals = explode(' ',$newval);
 					$setting = end($newvals);
-					for($i=0;$i<(count($newvals) - 1); $i++)
+					for($i=0;$i<(count($newvals) - 1); ++$i)
 					{
 						$configs[] = $newvals[$i];
Index: /trunk/setup/ldapimport.php
===================================================================
--- /trunk/setup/ldapimport.php	(revision 328)
+++ /trunk/setup/ldapimport.php	(revision 7655)
@@ -90,5 +90,5 @@
 	$tmp = '';
 
-	for($i=0; $i<$info['count']; $i++)
+	for($i=0; $i<$info['count']; ++$i)
 	{
 		if(!$phpgw_info['server']['global_denied_users'][$info[$i]['uid'][0]])
@@ -109,5 +109,5 @@
 		$tmp = '';
 
-		for($i=0; $i<$info['count']; $i++)
+		for($i=0; $i<$info['count']; ++$i)
 		{
 			if(!$phpgw_info['server']['global_denied_groups'][$info[$i]['cn'][0]] &&
@@ -216,5 +216,5 @@
 						// This is typically an exception to apps for run rights
 						//  as a group member.
-						for($a=0;$a<count($admins);$a++)
+						for($a=0;$a<count($admins);++$a)
 						{
 							if($admins[$a] == $thisacctlid)
Index: /trunk/setup/applications.php
===================================================================
--- /trunk/setup/applications.php	(revision 6528)
+++ /trunk/setup/applications.php	(revision 7655)
@@ -327,5 +327,5 @@
 					list($depapp,$depver) = parsedep($setup_info[$resolve]['depends'],False);
                                 $depapp_count = count($depapp);
-					for ($i=0; $i<$depapp_count; $i++)
+					for ($i=0; $i<$depapp_count; ++$i)
 					{
 						echo '<br>' . $depapp[$i] . ': ';
Index: /trunk/setup/ldapmodify.php
===================================================================
--- /trunk/setup/ldapmodify.php	(revision 3664)
+++ /trunk/setup/ldapmodify.php	(revision 7655)
@@ -84,5 +84,5 @@
 
 	$account_info = array( );
-	for ( $i = 0; $i < $info[ 'count' ]; $i++ )
+	for ( $i = 0; $i < $info[ 'count' ]; ++$i )
 		if ( ! array_key_exists( $info[ $i ][ 'uid' ][ 0 ], $phpgw_info[ 'server' ][ 'global_denied_users' ] ) )
 			$account_info[ $info[ $i ][ 'dn' ] ] = $info[ $i ];
@@ -97,5 +97,5 @@
 		$tmp = '';
 
-		for ( $i = 0; $i < $info[ 'count' ]; $i++ )
+		for ( $i = 0; $i < $info[ 'count' ]; ++$i )
 			if ( ! array_key_exists( $info[ $i ][ 'cn' ][ 0 ], $phpgw_info[ 'server' ][ 'global_denied_groups' ] ) )
 				$group_info[ $info[ $i ][ 'dn' ] ] = $info[ $i ];
@@ -269,5 +269,5 @@
 						if ( !empty($thisacctid) && !empty($thisacctlid))
 						{
-							$users_process++;
+                            ++$users_process;
 
 							$add = array( );
@@ -310,5 +310,5 @@
 							$acl -> save_repository( );
 
-							$new_uidnumber++;
+                            ++$new_uidnumber;
 						}
 
Index: /trunk/preferences/handlecertificate.php
===================================================================
--- /trunk/preferences/handlecertificate.php	(revision 4127)
+++ /trunk/preferences/handlecertificate.php	(revision 7655)
@@ -140,5 +140,5 @@
             {
                     $var_tokens = '';
-                    for($ii = 1; $ii < 11; $ii++)
+                    for($ii = 1; $ii < 11; ++$ii)
                     {
                             if($GLOBALS['phpgw_info']['server']['test_token' . $ii . '1'])
Index: /trunk/preferences/inc/class.uiaclprefs.inc.php
===================================================================
--- /trunk/preferences/inc/class.uiaclprefs.inc.php	(revision 6057)
+++ /trunk/preferences/inc/class.uiaclprefs.inc.php	(revision 7655)
@@ -88,5 +88,5 @@
 				{
 					$just_owner_array[$cont] = $repository;
-					$cont++;
+					++$cont;
 				}
 			}
@@ -113,5 +113,5 @@
 				}
 				
-				for($i=0;$i<count($to_remove);$i++) {
+				for($i=0;$i<count($to_remove);++$i) {
 					
 					if(!array_key_exists((int)$to_remove[$i],$keys_to_keep)) {
Index: /trunk/preferences/inc/class.uicategories.inc.php
===================================================================
--- /trunk/preferences/inc/class.uicategories.inc.php	(revision 5129)
+++ /trunk/preferences/inc/class.uicategories.inc.php	(revision 7655)
@@ -83,5 +83,5 @@
 		function cat_data($edata,$data)
 		{
-			for ($j=0;$j<count($edata);$j++)
+			for ($j=0;$j<count($edata);++$j)
 			{
 				$td_data .= '<td>' . $data[$edata[$j]] . '</td>' . "\n";
@@ -169,5 +169,5 @@
 			if (is_array($edata))
 			{
-				for($i=0;$i<count($edata);$i++)
+				for($i=0;$i<count($edata);++$i)
 				{
 					$GLOBALS['phpgw']->template->set_var('th_data','<td bgcolor="' . $GLOBALS['phpgw_info']['theme']['th_bg'] . '">' . lang($edata[$i]) . '</td>');
@@ -182,5 +182,5 @@
 // -------------------------- end header declaration --------------------------------------
 
-			for ($i=0;$i<count($cats);$i++)
+			for ($i=0;$i<count($cats);++$i)
 			{
 				$this->nextmatchs->template_alternate_row_color($GLOBALS['phpgw']->template);
@@ -375,5 +375,5 @@
 			{
 				$edata = explode(',',$extra);
-				for($i=0;$i<count($edata);$i++)
+				for($i=0;$i<count($edata);++$i)
 				{
 					$GLOBALS['phpgw']->template->set_var('tr_color',$GLOBALS['phpgw']->nextmatchs->alternate_row_color());
@@ -506,5 +506,5 @@
 
 				$data = unserialize($cats[0]['data']);
-				for($i=0;$i<count($edata);$i++)
+				for($i=0;$i<count($edata);++$i)
 				{
 					$GLOBALS['phpgw']->template->set_var('td_data','<input name="cat_data[' . $edata[$i] . ']" size="50" value="' . $data[$edata[$i]] . '">');
Index: /trunk/preferences/inc/hook_settings.inc.php
===================================================================
--- /trunk/preferences/inc/hook_settings.inc.php	(revision 143)
+++ /trunk/preferences/inc/hook_settings.inc.php	(revision 7655)
@@ -48,5 +48,5 @@
 		$format .= 'H:i';
 	}
-	for ($i = -23; $i<24; $i++)
+	for ($i = -23; $i<24; ++$i)
 	{
 		$t = time() + $i * 60*60;
Index: /trunk/preferences/templates/classic/listUsers.php
===================================================================
--- /trunk/preferences/templates/classic/listUsers.php	(revision 3601)
+++ /trunk/preferences/templates/classic/listUsers.php	(revision 7655)
@@ -107,5 +107,5 @@
 		$sr=ldap_list($ds, $user_context, ("(&(cn=*)(phpgwaccounttype=u))"));
 		$info = ldap_get_entries($ds, $sr);
-		for ($i=0; $i<$info["count"]; $i++)
+		for ($i=0; $i<$info["count"]; ++$i)
 			$users[$uids=$info[$i]["uidnumber"][0]] = Array('name'	=>	$uids=$info[$i]["cn"][0], 'type'	=>	u);
 	}
Index: /trunk/preferences/templates/default/changepassword_default.php
===================================================================
--- /trunk/preferences/templates/default/changepassword_default.php	(revision 5928)
+++ /trunk/preferences/templates/default/changepassword_default.php	(revision 7655)
@@ -39,9 +39,9 @@
 		// Special Letters
 		$speccial_letter = 0;
-		for ($i=0; $i<strlen($n_passwd); $i++)
+		for ($i=0; $i<strlen($n_passwd); ++$i)
 		{
 			$letter = $n_passwd[$i];
 			if (!preg_match('/[a-zA-Z]/', $letter ) )
-				$speccial_letter++;
+				++$speccial_letter;
 		}
 		if ($speccial_letter < $GLOBALS['phpgw_info']['server']['num_special_letters_userpass'])
Index: /trunk/prototype/plugins/davicalCliente/XMLElement.php
===================================================================
--- /trunk/prototype/plugins/davicalCliente/XMLElement.php	(revision 5399)
+++ /trunk/prototype/plugins/davicalCliente/XMLElement.php	(revision 7655)
@@ -318,5 +318,5 @@
   if ( !isset($start_from) ) $start_from = 0;
 
-  for( $i=0; $i < 50000 && isset($xmltags[$start_from]); $i++) {
+  for( $i=0; $i < 50000 && isset($xmltags[$start_from]); ++$i) {
     $tagdata = $xmltags[$start_from++];
     if ( !isset($tagdata) || !isset($tagdata['tag']) || !isset($tagdata['type']) ) break;
Index: /trunk/prototype/plugins/davicalCliente/AWLUtilities.php
===================================================================
--- /trunk/prototype/plugins/davicalCliente/AWLUtilities.php	(revision 5399)
+++ /trunk/prototype/plugins/davicalCliente/AWLUtilities.php	(revision 7655)
@@ -542,5 +542,5 @@
     );
 
-    for( $i=160; $i < 256; $i++ ) {
+    for( $i=160; $i < 256; ++$i ) {
       $ch = chr($i);
       $byte_map[$ch] = iconv('ISO-8859-1', 'UTF-8', $ch);
Index: /trunk/prototype/plugins/davicalCliente/XMLDocument.php
===================================================================
--- /trunk/prototype/plugins/davicalCliente/XMLDocument.php	(revision 5399)
+++ /trunk/prototype/plugins/davicalCliente/XMLDocument.php	(revision 7655)
@@ -77,5 +77,5 @@
         $i = "";
         if ( isset($this->prefixes[$prefix]) ) {
-          for ( $i=1; $i<10 && isset($this->prefixes["$prefix$i"]); $i++ ) {
+          for ( $i=1; $i<10 && isset($this->prefixes["$prefix$i"]); ++$i ) {
           }
         }
Index: /trunk/prototype/plugins/icalcreator/iCalUtilityFunctions.class.php
===================================================================
--- /trunk/prototype/plugins/icalcreator/iCalUtilityFunctions.class.php	(revision 5341)
+++ /trunk/prototype/plugins/icalcreator/iCalUtilityFunctions.class.php	(revision 7655)
@@ -441,5 +441,5 @@
     $output = array();
     $val    = null;
-    for( $ix=0; $ix < strlen( $duration ); $ix++ ) {
+    for( $ix=0; $ix < strlen( $duration ); ++$ix ) {
       switch( strtoupper( substr( $duration, $ix, 1 ))) {
        case 'W':
@@ -839,5 +839,5 @@
         $yeardays   = $weekno = 0;
         $yeardaycnt = array();
-        for( $m = 1; $m <= 12; $m++ ) { // count up and update up-counters
+        for( $m = 1; $m <= 12; ++$m ) { // count up and update up-counters
           $daycnts[$m] = array();
           $weekdaycnt = array();
@@ -845,8 +845,8 @@
             $yeardaycnt[$dn] = $weekdaycnt[$dn] = 0;
           $mcnt     = date( 't', mktime( 0, 0, 0, $m, 1, $wdate['year'] ));
-          for( $d   = 1; $d <= $mcnt; $d++ ) {
+          for( $d   = 1; $d <= $mcnt; ++$d ) {
             $daycnts[$m][$d] = array();
             if( isset( $recur['BYYEARDAY'] )) {
-              $yeardays++;
+              ++$yeardays;
               $daycnts[$m][$d]['yearcnt_up'] = $yeardays;
             }
@@ -1026,5 +1026,5 @@
         else {
             /* update result array if BYSETPOS is set */
-          $countcnt++;
+          ++$countcnt;
           if( $startdatets <= $wdatets ) { // only output within period
             $result[$wdatets] = TRUE;
@@ -1089,5 +1089,5 @@
 // echo " recur ".implode('-',iCalUtilityFunctions::_date_time_string(date('Y-m-d H:i:s',$bysetposarr1[$ix]),6)); // test ###
               }
-              $countcnt++;
+              ++$countcnt;
             }
             if( isset( $recur['COUNT'] ) && ( $countcnt >= $recur['COUNT'] ))
Index: /trunk/prototype/plugins/icalcreator/iCalcreator.class.php
===================================================================
--- /trunk/prototype/plugins/icalcreator/iCalcreator.class.php	(revision 5399)
+++ /trunk/prototype/plugins/icalcreator/iCalcreator.class.php	(revision 7655)
@@ -393,5 +393,5 @@
             if( $propix != $xpropno )
               $reduced[$xpropkey] = $xpropvalue;
-            $xpropno++;
+            ++$xpropno;
           }
         }
@@ -506,5 +506,5 @@
                                     : array( $xpropkey, $this->xprop[$xpropkey]['value'] );
             else
-              $xpropno++;
+              ++$xpropno;
           }
           unset( $this->propix[$propName] );
@@ -829,5 +829,5 @@
           return TRUE;
         }
-        $cix1dC++;
+        ++$cix1dC;
       }
       elseif( !$argType && ($arg1 == $component->getProperty( 'uid' ))) {
@@ -891,5 +891,5 @@
         if( $index == $cix1gC )
           return $component->copy();
-        $cix1gC++;
+        ++$cix1gC;
       }
       elseif( is_array( $arg1 )) { // array( *[propertyName => propertyValue] )
@@ -944,5 +944,5 @@
           if( $index == $cix1gC )
             return $component->copy();
-          $cix1gC++;
+          ++$cix1gC;
         }
       } // end elseif( is_array( $arg1 )) { // array( *[propertyName => propertyValue] )
@@ -950,5 +950,5 @@
         if( $index == $cix1gC )
           return $component->copy();
-        $cix1gC++;
+        ++$cix1gC;
       }
     } // end foreach ( $this->components.. .
@@ -1436,5 +1436,5 @@
           return TRUE;
         }
-        $cix1sC++;
+        ++$cix1sC;
       }
       elseif( !$argType && ( $arg1 == $component2->getProperty( 'uid' ))) { // UID insert/replace
@@ -1523,5 +1523,5 @@
     elseif( 'vtimezone' == $b->objName )          return  1;
     $sortkeys = array( 'year', 'month', 'day', 'hour', 'min', 'sec' );
-    for( $k = 0; $k < 4 ; $k++ ) {
+    for( $k = 0; $k < 4 ; ++$k ) {
       if(        empty( $a->srtk[$k] ))           return -1;
       elseif(    empty( $b->srtk[$k] ))           return  1;
@@ -1607,5 +1607,5 @@
         continue;
       if(     'BEGIN:VCALENDAR' == strtoupper( substr( $line, 0, 15 ))) {
-        $calsync++;
+        ++$calsync;
         continue;
       }
@@ -1653,5 +1653,5 @@
         if( $newProp ) {
           $newProp = FALSE;
-          $lastix++;
+          ++$lastix;
           $proprows[$lastix]  = $line;
         }
@@ -1666,5 +1666,5 @@
             /* get property name */
         $cix = $propname = null;
-        for( $cix=0, $clen = strlen( $line ); $cix < $clen; $cix++ ) {
+        for( $cix=0, $clen = strlen( $line ); $cix < $clen; ++$cix ) {
           if( in_array( $line[$cix], array( ':', ';' )))
             break;
@@ -1680,5 +1680,5 @@
         $attrix = -1;
         $strlen = strlen( $line );
-        for( $cix=0; $cix < $strlen; $cix++ ) {
+        for( $cix=0; $cix < $strlen; ++$cix ) {
           if((       ':'   == $line[$cix] )             &&
                    ( '://' != substr( $line, $cix, 3 )) &&
@@ -1720,10 +1720,9 @@
           $content  = explode( ',', $line );
           $clen     = count( $content );
-          for( $cix = 0; $cix < $clen; $cix++ ) {
+          for( $cix = 0; $cix < $clen; ++$cix ) {
             if( "\\" == substr( $content[$cix], -1 )) {
               $content[$cix] .= ','.$content[$cix + 1];
               unset( $content[$cix + 1] );
-              $cix++;
-            }
+              ++$cix;            }
           }
           if( 1 < count( $content )) {
@@ -2984,5 +2983,5 @@
         if( $fno < $cnt )
           $content .= ',';
-        $fno++;
+        ++$fno;
       }
       $output .= $this->_createElement( 'FREEBUSY', $attributes, $content );
@@ -3368,5 +3367,5 @@
         if( $rno < $cnt )
           $content .= ',';
-        $rno++;
+        ++$rno;
       }
       $output    .= $this->_createElement( 'RDATE', $attributes, $content );
@@ -4593,5 +4592,5 @@
                 }
                 $content2 .= $content21.$content22;
-                $bydaycnt++;
+                ++$bydaycnt;
               }
               else {
@@ -4601,5 +4600,5 @@
                 else {
                   $content22 .= $valuePart;
-                  $bydaycnt++;
+                  ++$bydaycnt;
                 }
                 $content2 .= $content21.$content22;
@@ -5077,5 +5076,5 @@
             if( $propix != $xpropno )
               $reduced[$xpropkey] = $xpropvalue;
-            $xpropno++;
+            ++$xpropno;
           }
         }
@@ -5139,5 +5138,5 @@
         $ak = ( is_array( $this->attach )) ? array_keys( $this->attach ) : array();
         while( is_array( $this->attach ) && !isset( $this->attach[$propix] ) && ( 0 < count( $this->attach )) && ( $propix < end( $ak )))
-          $propix++;
+          ++$propix;
         if( !isset( $this->attach[$propix] )) { unset( $this->propix[$propName] ); return FALSE; }
         return ( $inclParam ) ? $this->attach[$propix] : $this->attach[$propix]['value'];
@@ -5146,5 +5145,5 @@
         $ak = ( is_array( $this->attendee )) ? array_keys( $this->attendee ) : array();
         while( is_array( $this->attendee ) && !isset( $this->attendee[$propix] ) && ( 0 < count( $this->attendee )) && ( $propix < end( $ak )))
-          $propix++;
+          ++$propix;
         if( !isset( $this->attendee[$propix] )) { unset( $this->propix[$propName] ); return FALSE; }
         return ( $inclParam ) ? $this->attendee[$propix] : $this->attendee[$propix]['value'];
@@ -5153,5 +5152,5 @@
         $ak = ( is_array( $this->categories )) ? array_keys( $this->categories ) : array();
         while( is_array( $this->categories ) && !isset( $this->categories[$propix] ) && ( 0 < count( $this->categories )) && ( $propix < end( $ak )))
-          $propix++;
+          ++$propix;
         if( !isset( $this->categories[$propix] )) { unset( $this->propix[$propName] ); return FALSE; }
         return ( $inclParam ) ? $this->categories[$propix] : $this->categories[$propix]['value'];
@@ -5163,5 +5162,5 @@
         $ak = ( is_array( $this->comment )) ? array_keys( $this->comment ) : array();
         while( is_array( $this->comment ) && !isset( $this->comment[$propix] ) && ( 0 < count( $this->comment )) && ( $propix < end( $ak )))
-          $propix++;
+          ++$propix;
         if( !isset( $this->comment[$propix] )) { unset( $this->propix[$propName] ); return FALSE; }
         return ( $inclParam ) ? $this->comment[$propix] : $this->comment[$propix]['value'];
@@ -5173,5 +5172,5 @@
         $ak = ( is_array( $this->contact )) ? array_keys( $this->contact ) : array();
         while( is_array( $this->contact ) && !isset( $this->contact[$propix] ) && ( 0 < count( $this->contact )) && ( $propix < end( $ak )))
-          $propix++;
+          ++$propix;
         if( !isset( $this->contact[$propix] )) { unset( $this->propix[$propName] ); return FALSE; }
         return ( $inclParam ) ? $this->contact[$propix] : $this->contact[$propix]['value'];
@@ -5183,5 +5182,5 @@
         $ak = ( is_array( $this->description )) ? array_keys( $this->description ) : array();
         while( is_array( $this->description ) && !isset( $this->description[$propix] ) && ( 0 < count( $this->description )) && ( $propix < end( $ak )))
-          $propix++;
+          ++$propix;
         if( !isset( $this->description[$propix] )) { unset( $this->propix[$propName] ); return FALSE; }
         return ( $inclParam ) ? $this->description[$propix] : $this->description[$propix]['value'];
@@ -5211,5 +5210,5 @@
         $ak = ( is_array( $this->exdate )) ? array_keys( $this->exdate ) : array();
         while( is_array( $this->exdate ) && !isset( $this->exdate[$propix] ) && ( 0 < count( $this->exdate )) && ( $propix < end( $ak )))
-          $propix++;
+          ++$propix;
         if( !isset( $this->exdate[$propix] )) { unset( $this->propix[$propName] ); return FALSE; }
         return ( $inclParam ) ? $this->exdate[$propix] : $this->exdate[$propix]['value'];
@@ -5218,5 +5217,5 @@
         $ak = ( is_array( $this->exrule )) ? array_keys( $this->exrule ) : array();
         while( is_array( $this->exrule ) && !isset( $this->exrule[$propix] ) && ( 0 < count( $this->exrule )) && ( $propix < end( $ak )))
-          $propix++;
+          ++$propix;
         if( !isset( $this->exrule[$propix] )) { unset( $this->propix[$propName] ); return FALSE; }
         return ( $inclParam ) ? $this->exrule[$propix] : $this->exrule[$propix]['value'];
@@ -5225,5 +5224,5 @@
         $ak = ( is_array( $this->freebusy )) ? array_keys( $this->freebusy ) : array();
         while( is_array( $this->freebusy ) && !isset( $this->freebusy[$propix] ) && ( 0 < count( $this->freebusy )) && ( $propix < end( $ak )))
-          $propix++;
+          ++$propix;
         if( !isset( $this->freebusy[$propix] )) { unset( $this->propix[$propName] ); return FALSE; }
         return ( $inclParam ) ? $this->freebusy[$propix] : $this->freebusy[$propix]['value'];
@@ -5270,5 +5269,5 @@
         $ak = ( is_array( $this->requeststatus )) ? array_keys( $this->requeststatus ) : array();
         while( is_array( $this->requeststatus ) && !isset( $this->requeststatus[$propix] ) && ( 0 < count( $this->requeststatus )) && ( $propix < end( $ak )))
-          $propix++;
+          ++$propix;
         if( !isset( $this->requeststatus[$propix] )) { unset( $this->propix[$propName] ); return FALSE; }
         return ( $inclParam ) ? $this->requeststatus[$propix] : $this->requeststatus[$propix]['value'];
@@ -5277,5 +5276,5 @@
         $ak = ( is_array( $this->resources )) ? array_keys( $this->resources ) : array();
         while( is_array( $this->resources ) && !isset( $this->resources[$propix] ) && ( 0 < count( $this->resources )) && ( $propix < end( $ak )))
-          $propix++;
+          ++$propix;
         if( !isset( $this->resources[$propix] )) { unset( $this->propix[$propName] ); return FALSE; }
         return ( $inclParam ) ? $this->resources[$propix] : $this->resources[$propix]['value'];
@@ -5284,5 +5283,5 @@
         $ak = ( is_array( $this->rrule )) ? array_keys( $this->rrule ) : array();
         while( is_array( $this->rrule ) && !isset( $this->rrule[$propix] ) && ( 0 < count( $this->rrule )) && ( $propix < end( $ak )))
-          $propix++;
+          ++$propix;
         if( !isset( $this->rrule[$propix] )) { unset( $this->propix[$propName] ); return FALSE; }
         return ( $inclParam ) ? $this->rrule[$propix] : $this->rrule[$propix]['value'];
@@ -5309,5 +5308,5 @@
         $ak = ( is_array( $this->tzname )) ? array_keys( $this->tzname ) : array();
         while( is_array( $this->tzname ) && !isset( $this->tzname[$propix] ) && ( 0 < count( $this->tzname )) && ( $propix < end( $ak )))
-          $propix++;
+          ++$propix;
         if( !isset( $this->tzname[$propix] )) { unset( $this->propix[$propName] ); return FALSE; }
         return ( $inclParam ) ? $this->tzname[$propix] : $this->tzname[$propix]['value'];
@@ -5346,5 +5345,5 @@
                                     : array( $xpropkey, $this->xprop[$xpropkey]['value'] );
             else
-              $xpropno++;
+              ++$xpropno;
           }
           return FALSE; // not found ??
@@ -5431,5 +5430,5 @@
       return FALSE;
     $arglist[0] = strtoupper( $arglist[0] );
-    for( $argix=$numargs; $argix < 12; $argix++ ) {
+    for( $argix=$numargs; $argix < 12; ++$argix ) {
       if( !isset( $arglist[$argix] ))
         $arglist[$argix] = null;
@@ -5613,5 +5612,5 @@
           $proprows[$lastix] = $proprows[$lastix];
         $newProp = FALSE;
-        $lastix++;
+        ++$lastix;
         $proprows[$lastix]  = $line;
       }
@@ -5627,5 +5626,5 @@
             /* get propname, (problem with x-properties, otherwise in previous loop) */
       $cix = $propname = null;
-      for( $cix=0, $clen = strlen( $line ); $cix < $clen; $cix++ ) {
+      for( $cix=0, $clen = strlen( $line ); $cix < $clen; ++$cix ) {
         if( in_array( $line[$cix], array( ':', ';' )))
           break;
@@ -5644,5 +5643,5 @@
       $attrix = -1;
       $clen = strlen( $line );
-      for( $cix=0; $cix < $clen; $cix++ ) {
+      for( $cix=0; $cix < $clen; ++$cix ) {
         if((       ':'   == $line[$cix] )             &&
                  ( '://' != substr( $line, $cix, 3 )) &&
@@ -5694,9 +5693,9 @@
             $content  = explode( ',', $line );
             $clen     = count( $content );
-            for( $cix = 0; $cix < $clen; $cix++ ) {
+            for( $cix = 0; $cix < $clen; ++$cix ) {
               if( "\\" == substr($content[$cix], -1)) {
                 $content[$cix] .= ','.$content[$cix + 1];
                 unset($content[$cix + 1]);
-                $cix++;
+                ++$cix;
               }
             }
@@ -5899,5 +5898,5 @@
           return TRUE;
         }
-        $cix2dC++;
+        ++$cix2dC;
       }
       elseif( !$argType && ($arg1 == $component->getProperty( 'uid' ))) {
@@ -5950,5 +5949,5 @@
          if( $index == $cix2gC )
            return $component->copy();
-         $cix2gC++;
+         ++$cix2gC;
       }
       elseif( !$argType && ( $arg1 == $component->getProperty( 'uid' )))
@@ -6043,5 +6042,5 @@
           return TRUE;
         }
-        $cix2sC++;
+        ++$cix2sC;
       }
       elseif( !$argType && ( $arg1 == $component2->getProperty( 'uid' ))) { // UID insert/replace
@@ -6130,5 +6129,5 @@
       $bytecnt = strlen( $tmp );
       $charCnt = $ix = 0;
-      for( $ix = 0; $ix < $bytecnt; $ix++ ) {
+      for( $ix = 0; $ix < $bytecnt; ++$ix ) {
         if(( 73 < $charCnt ) && ( '\n' == substr( $tmp, $ix, $eolcharlen ))) {
           $ix += $eolcharlen;
Index: /trunk/prototype/plugins/when/When.php
===================================================================
--- /trunk/prototype/plugins/when/When.php	(revision 5341)
+++ /trunk/prototype/plugins/when/When.php	(revision 7655)
@@ -551,5 +551,5 @@
 				while($run)
 				{
-					$_day++;
+					++$_day;
 					if($_day <= $days_in_month)
 					{
@@ -561,5 +561,5 @@
 						$tmp_date = new DateTime($year . '-' . $month . '-' . $overflow_count . ' ' . $timestamp);
 						$tmp_date->modify('+1 month');
-						$overflow_count++;
+						++$overflow_count;
 					}
 					
Index: /trunk/prototype/services/OpenLDAP.php
===================================================================
--- /trunk/prototype/services/OpenLDAP.php	(revision 6528)
+++ /trunk/prototype/services/OpenLDAP.php	(revision 7655)
@@ -98,5 +98,5 @@
          
 	$return = array();
-	for ($i=0; $i < $pEntries["count"]; $i++)
+	for ($i=0; $i < $pEntries["count"]; ++$i)
 	{
 	      $entrieTmp = array();
Index: /trunk/prototype/services/PostgreSQL.php
===================================================================
--- /trunk/prototype/services/PostgreSQL.php	(revision 6962)
+++ /trunk/prototype/services/PostgreSQL.php	(revision 7655)
@@ -359,5 +359,5 @@
         }
 
-        for($i=0; $i<count($order); $i++){
+        for($i=0; $i<count($order); ++$i){
             $order[$i] .= ($orderDesc[$i] === true) ? ' DESC' : '';
         }
Index: /trunk/prototype/services/ImapServiceAdapter.php
===================================================================
--- /trunk/prototype/services/ImapServiceAdapter.php	(revision 7622)
+++ /trunk/prototype/services/ImapServiceAdapter.php	(revision 7655)
@@ -171,5 +171,5 @@
 					if( $filter[0] !== 'msgNumber' )
 					{
-					for( $i = 0; $i < count($filter); $i++ )
+					for( $i = 0; $i < count($filter); ++$i )
 					{
 						if( count( $filter[$i] ) === 4 )
@@ -184,5 +184,5 @@
 					$msgNumber = array();
 
-					for( $i = $start; $i < $start + $limit && isset( $filter[2][$i] ); $i++ )
+					for( $i = $start; $i < $start + $limit && isset( $filter[2][$i] ); ++$i )
 					  $msgNumber[] = $filter[2][$i];
 
@@ -214,5 +214,5 @@
 				$response = array( "page" => $page, "total" => $total_pages, "records" => $count );
 				
-				for ($i=0; $i<count($result); $i++)
+				for ($i=0; $i<count($result); ++$i)
 				{
 					$flags_enum = array('Unseen'=> 1,  'Answered'=> 1, 'Forwarded'=> 1, 'Flagged'=> 1, 'Recent'=> 1, 'Draft'=> 1 ); 
Index: /trunk/prototype/library/uuid/class.uuid.php
===================================================================
--- /trunk/prototype/library/uuid/class.uuid.php	(revision 5698)
+++ /trunk/prototype/library/uuid/class.uuid.php	(revision 7655)
@@ -164,5 +164,5 @@
 		$uuid['time_mid'] = mt_rand(0, 0xffff);
 		$uuid['clock_seq_low'] = mt_rand(0, 255);
-		for ($i = 0; $i < 6; $i++)
+		for ($i = 0; $i < 6; ++$i)
 			$uuid['node'][$i] = mt_rand(0, 255);
 		return ($uuid);
@@ -247,5 +247,5 @@
 		 * we leave it for the user to supply the node.
 		 */
-		for ($i = 0; $i < 6; $i++)
+		for ($i = 0; $i < 6; ++$i)
 			$uuid['node'][$i] = ord(substr($node, $i, 1));
 
@@ -266,5 +266,5 @@
 		$uuid[9] = $src['clock_seq_low'];
 
-		for ($i = 0; $i < 6; $i++)
+		for ($i = 0; $i < 6; ++$i)
 			$uuid[10+$i] = $src['node'][$i];
 
@@ -296,5 +296,5 @@
 		$field['clock_seq_low'] = $uuid[9];
 
-		for ($i = 0; $i < 6; $i++)
+		for ($i = 0; $i < 6; ++$i)
 			$field['node'][$i] = $uuid[10+$i];
 		return ($field);
@@ -321,5 +321,5 @@
 		$field['clock_seq_hi'] = ($parts[3] & 0xff00) >> 8;
 		$field['clock_seq_low'] = $parts[3] & 0x00ff;
-		for ($i = 0; $i < 6; $i++)
+		for ($i = 0; $i < 6; ++$i)
 			$field['node'][$i] = $parts[4+$i];
 
Index: /trunk/prototype/library/tonic/examples/filesystem/filesystemcollection.php
===================================================================
--- /trunk/prototype/library/tonic/examples/filesystem/filesystemcollection.php	(revision 6528)
+++ /trunk/prototype/library/tonic/examples/filesystem/filesystemcollection.php	(revision 7655)
@@ -50,5 +50,5 @@
         $filename = 1;
         while (file_exists($collection.DIRECTORY_SEPARATOR.$filename)) {
-            $filename++;
+            ++$filename;
         }
         return $this->uriStub.substr($this->collection, strlen($this->path)).'/'.$filename;
Index: /trunk/prototype/modules/filters/interceptors/FilterMapping.php
===================================================================
--- /trunk/prototype/modules/filters/interceptors/FilterMapping.php	(revision 7375)
+++ /trunk/prototype/modules/filters/interceptors/FilterMapping.php	(revision 7655)
@@ -113,5 +113,5 @@
 					$script_criteria = "";
 					$require_fileinto = true;
-					$i++;
+					++$i;
 					continue;
 				}
@@ -270,5 +270,5 @@
 
 			if($data['id'] != "vacation")
-				$i++;
+				++$i;
 			$script_match = "";
 			$script_criteria = "";	
@@ -395,20 +395,20 @@
 						$action_type[$i_action] = 'reject';
 						$action_parameter[$i_action] = $array_rule[7];
-						$i_action++;
+						++$i_action;
 						break;
 					case 'folder':
 						$action_type[$i_action] = 'fileinto';
 						$action_parameter[$i_action] = $array_rule[7];
-						$i_action++;
+						++$i_action;
 						break;
 					case 'flagged':
 						$action_type[$i_action] = 'setflag';
 						$action_parameter[$i_action] = 'flagged';
-						$i_action++;
+						++$i_action;
 						break;
 					case 'address': 
 						$action_type[$i_action] = 'redirect';
 						$action_parameter[$i_action] = $array_rule[7];
-						$i_action++;
+						++$i_action;
 						break;
 					/* Somente para tratar casos em que a ação não é suportada */
@@ -416,5 +416,5 @@
 						$action_type[$i_action] = 'setflag';
 						$action_parameter[$i_action] = 'flagged';
-						$i_action++;
+						++$i_action;
 						break;
 					// Recuperar o cyrus_delimiter para forçar um fileinto para INBOX/trash
@@ -429,5 +429,5 @@
 					$criteria_operator[$i_criteria] = '=';
 					$criteria_field[$i_criteria] = 'from';
-					$i_criteria++;
+					++$i_criteria;
 				} 
 				if($array_rule[4] != "") {
@@ -435,5 +435,5 @@
 					$criteria_operator[$i_criteria] = '=';
 					$criteria_field[$i_criteria] = 'to';
-					$i_criteria++;
+					++$i_criteria;
 				} 
 				if($array_rule[5] != "") {
@@ -441,5 +441,5 @@
 					$criteria_operator[$i_criteria] = '=';
 					$criteria_field[$i_criteria] = 'subject';
-					$i_criteria++;
+					++$i_criteria;
 				}
 				$old_retorno = array();
@@ -467,5 +467,5 @@
 
 				$old_rules[$i_return] = $old_retorno;
-				$i_return++;
+				++$i_return;
 			}			
 			return $old_rules;
@@ -608,5 +608,5 @@
 	    $i = 0;
 
-	    for( ; isset($this->rules[$i]) && $this->rules[$i]['id'] !== $params['id']; $i++ );
+	    for( ; isset($this->rules[$i]) && $this->rules[$i]['id'] !== $params['id']; ++$i );
 
 	    $this->rules[$i] = array_merge( ( isset($this->rules[$i]) ? $this->rules[$i] : array() ), $params );
Index: /trunk/prototype/modules/calendar/interceptors/DBMapping.php
===================================================================
--- /trunk/prototype/modules/calendar/interceptors/DBMapping.php	(revision 7595)
+++ /trunk/prototype/modules/calendar/interceptors/DBMapping.php	(revision 7655)
@@ -1465,5 +1465,5 @@
 	$length = 6;
 	$str = null;
-	for ($p = 0; $p < $length; $p++)
+	for ($p = 0; $p < $length; ++$p)
 	    $unique .= $base{mt_rand($start, $end)};
 
Index: /trunk/prototype/modules/catalog/interceptors/CatalogDBMapping.php
===================================================================
--- /trunk/prototype/modules/catalog/interceptors/CatalogDBMapping.php	(revision 6579)
+++ /trunk/prototype/modules/catalog/interceptors/CatalogDBMapping.php	(revision 7655)
@@ -23,5 +23,5 @@
 
 		if(count($params)>0 && isset($params[0]['id'])){
-			for($i=0; $i < count($params); $i++){
+			for($i=0; $i < count($params); ++$i){
 				//Retorna o telefone e o e-mail padrao de um determinado contato
 				$sql = ' SELECT phpgw_cc_contact_conns.id_typeof_contact_connection as type, phpgw_cc_connections.connection_value as value '
@@ -55,5 +55,5 @@
 		$z = 0;
 		$count = count($params);
-		for($i=0; $i < $count; $i++){
+		for($i=0; $i < $count; ++$i){
 				//Retorna o telefone e o e-mail padrao de um determinado contato
 				$sql = 'SELECT contato.names_ordered as name, contato.id_contact as id, conexao.connection_value as value '
@@ -78,5 +78,5 @@
 						$params[$i]['contacts'][$z]['name'] = $connection['name'];							
 						$params[$i]['contacts'][$z][INDEX_EMAIL] = $connection['value'];							
-						$z++;
+						++$z;
 					}
 				}
Index: /trunk/security/security-lib.php
===================================================================
--- /trunk/security/security-lib.php	(revision 3232)
+++ /trunk/security/security-lib.php	(revision 7655)
@@ -18,5 +18,5 @@
             $tab = 'ABCDEFGHIJKLMNOPQRSTUVXYZW';
             $i = rand(0,25);
-            for($a1=0;$a1<3;$a1++)
+            for($a1=0;$a1<3;++$a1)
                 {
                     $i = rand(0,25);
Index: /trunk/security/captcha.php
===================================================================
--- /trunk/security/captcha.php	(revision 3448)
+++ /trunk/security/captcha.php	(revision 7655)
@@ -61,5 +61,5 @@
       $CharPool   = array_merge($uppercase, $numeric);
       $PoolLength = count($CharPool) - 1;
-      for ($i = 0; $i < $this->Length; $i++)
+      for ($i = 0; $i < $this->Length; ++$i)
       {
         $this->CaptchaString .= $CharPool[mt_rand(0, $PoolLength)];
@@ -108,5 +108,5 @@
 
 	/* Put some elipses */
-      for ($i=0; $i < 5; $i++)
+      for ($i=0; $i < 5; ++$i)
       {
 	      $col_ellipse = imagecolorallocate($src, rand (60,255), rand(60,255), rand(60, 255));
@@ -115,5 +115,5 @@
 
 	/* Put some vertical lines*/
-      for ($i=0; $i < 5; $i++)
+      for ($i=0; $i < 5; ++$i)
       {
 	      $xr = rand(0,130);
@@ -123,5 +123,5 @@
 
 	/*Put some horizontal lines*/
-      for ($i=0; $i < 5; $i++)
+      for ($i=0; $i < 5; ++$i)
       {
 	      $xr = rand(0,130);
Index: /trunk/security/classes/funcoes_auxiliares.php
===================================================================
--- /trunk/security/classes/funcoes_auxiliares.php	(revision 4991)
+++ /trunk/security/classes/funcoes_auxiliares.php	(revision 7655)
@@ -175,5 +175,5 @@
 	{
 		$tab_val = array('0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F');
-		for($A=0;$A<strlen($value);$A++)
+		for($A=0;$A<strlen($value);++$A)
 			{
 				$aux_parte_numerica =ord(substr($value,$A,1)) % 16;
@@ -207,5 +207,5 @@
 						$bytes = $len & 0x0f;
 						$len = 0;
-						for ($i = 0; $i < $bytes; $i++)
+						for ($i = 0; $i < $bytes; ++$i)
 							{
 								$len = ($len << 8) | ord($data[$i + 2]);
@@ -242,5 +242,5 @@
 		$n = 0;
 		$b = 0;
-		for($n = 0; $n < count($partes); $n++)
+		for($n = 0; $n < count($partes); ++$n)
 		{
 			if($n==0)
@@ -1200,5 +1200,5 @@
 						{
 							// Method works fine for small integers
-							for ($i = 0; $i < strlen($integer_data); $i++)
+							for ($i = 0; $i < strlen($integer_data); ++$i)
 							{
 								$value = ($value << 8) | ord($integer_data[$i]);
@@ -1210,5 +1210,5 @@
 							if (extension_loaded('bcmath'))
 							{
-								for ($i = 0; $i < strlen($integer_data); $i++)
+								for ($i = 0; $i < strlen($integer_data); ++$i)
 								{
 									$value = bcadd(bcmul($value, 256), ord($integer_data[$i]));
@@ -1307,5 +1307,5 @@
 							$value = 0;
 						}
-						$i++;
+						++$i;
 					}
 
@@ -1498,5 +1498,5 @@
 		if(count($partes)>1)
 			{
-				for($i=1;$i<count($partes);$i++)
+				for($i=1;$i<count($partes);++$i)
 					{
 					        //O inicio da seq pode estar a 3 ou 2 digitos antes do inicio da oid .... depende do numero de bytes usados para  tamanho da seq.
@@ -1580,5 +1580,5 @@
 		$esta_oid = $oids[$oid];
 		$p = 0;
-		for($i=1;$i < count($esta_oid) + 1; $i++)
+		for($i=1;$i < count($esta_oid) + 1; ++$i)
 			{
 				if($esta_oid[$i][1] == 0)
Index: /trunk/calendar/egroupware.org/accept_holiday.php
===================================================================
--- /trunk/calendar/egroupware.org/accept_holiday.php	(revision 2)
+++ /trunk/calendar/egroupware.org/accept_holiday.php	(revision 7655)
@@ -25,5 +25,5 @@
 			$c_holidays = count($_POST['name']);
 			$fp = fopen($file,'w');
-			for($i=0;$i<$c_holidays;$i++)
+			for($i=0;$i<$c_holidays;++$i)
 			{
 				fwrite($fp,$_POST['locale']."\t".$_POST['name'][$i]."\t".$_POST['day'][$i]."\t".$_POST['month'][$i]."\t".$_POST['occurence'][$i]."\t".$_POST['dow'][$i]."\t".$_POST['observance'][$i]."\n");
Index: /trunk/calendar/inc/class.calendar_holiday.inc.php
===================================================================
--- /trunk/calendar/inc/class.calendar_holiday.inc.php	(revision 2)
+++ /trunk/calendar/inc/class.calendar_holiday.inc.php	(revision 7655)
@@ -137,5 +137,5 @@
 			}
 			$c_lines = count($lines);
-			for($i=0;$i<$c_lines;$i++)
+			for($i=0;$i<$c_lines;++$i)
 			{
 	//			echo 'Line #'.$i.' : '.$lines[$i]."<br>\n";
@@ -204,5 +204,5 @@
 					$i = $c;
 				}
-				$i++;
+				++$i;
 			}
 			$this->holidays = $this->sort_by_date($this->holidays);
@@ -217,5 +217,5 @@
 			while($this->db->next_record())
 			{
-				$i++;
+				++$i;
 				$holidays[$i]['locale'] = $this->db->f('locale');
 				$holidays[$i]['name']   = $GLOBALS['phpgw']->strip_html($this->db->f('name'));
@@ -254,8 +254,8 @@
 		{
 			$c_holidays = count($holidays);
-			for($outer_loop=0;$outer_loop<($c_holidays - 1);$outer_loop++)
+			for($outer_loop=0;$outer_loop<($c_holidays - 1);++$outer_loop)
 			{
 				$outer_date = $holidays[$outer_loop]['date'];
-				for($inner_loop=$outer_loop;$inner_loop<$c_holidays;$inner_loop++)
+				for($inner_loop=$outer_loop;$inner_loop<$c_holidays;++$inner_loop)
 				{
 					$inner_date = $holidays[$inner_loop]['date'];
@@ -279,5 +279,5 @@
 
 			$c_holidays = count($this->holidays);
-			for($i=0;$i<$c_holidays;$i++)
+			for($i=0;$i<$c_holidays;++$i)
 			{
 				if($this->holidays[$i]['date'] > $date)
Index: /trunk/calendar/inc/class.holidaycalc_US.inc.php
===================================================================
--- /trunk/calendar/inc/class.holidaycalc_US.inc.php	(revision 2)
+++ /trunk/calendar/inc/class.holidaycalc_US.inc.php	(revision 7655)
@@ -53,5 +53,5 @@
 					if($dow == 0)
 					{
-						$i++;
+						++$i;
 						$holidays[$i]['locale'] = $holiday['locale'];
 						$holidays[$i]['name'] = $holiday['name'].' (Observed)';
@@ -65,5 +65,5 @@
 					elseif($dow == 6)
 					{
-						$i++;
+						++$i;
 						$holidays[$i]['locale'] = $holiday['locale'];
 						$holidays[$i]['name'] = $holiday['name'].' (Observed)';
Index: /trunk/calendar/inc/class.uiholiday.inc.php
===================================================================
--- /trunk/calendar/inc/class.uiholiday.inc.php	(revision 1684)
+++ /trunk/calendar/inc/class.uiholiday.inc.php	(revision 7655)
@@ -186,5 +186,5 @@
 				$end = min($total,$this->bo->start+$maxmatchs);
 				$p->set_var('rows',lang('showing %1 - %2 of %3',1+$this->bo->start,$end,$total));
-				for($i=$this->bo->start; $i < $end; $i++)
+				for($i=$this->bo->start; $i < $end; ++$i)
 				{
 					$tr_color = $GLOBALS['phpgw']->nextmatchs->alternate_row_color($tr_color);
@@ -313,5 +313,5 @@
 			);
 			$out = '';
-			for($i=0;$i<7;$i++)
+			for($i=0;$i<7;++$i)
 			{
 				$out .= '<option value="'.$i.'"'.($holiday['dow']==$i?' selected':'').'>'.$dow[$i].'</option>'."\n";
@@ -491,5 +491,5 @@
 			$c_holidays = count($holidays);
 			echo '<input type="hidden" name="locale" value="'.$this->bo->locales[0].'">'."\n";
-			for($i=0;$i<$c_holidays;$i++)
+			for($i=0;$i<$c_holidays;++$i)
 			{
 				echo '<input type="hidden" name="name[]" value="'.htmlspecialchars($holidays[$i]['name']).'">'."\n"
Index: /trunk/calendar/inc/class.bocalendar.inc.php
===================================================================
--- /trunk/calendar/inc/class.bocalendar.inc.php	(revision 7436)
+++ /trunk/calendar/inc/class.bocalendar.inc.php	(revision 7655)
@@ -912,5 +912,5 @@
                                 $endtime += $offset*$multi;
                                 $starttime <= $enddate;
-                                $i++,
+                                ++$i,
                                 $i = ($i < count($dowOffsets))?$i:0,
                                 $multi = $dowOffsets[$i],
@@ -1252,5 +1252,5 @@
 					$minparts = min($l_participants);
 					$part = Array();
-					for($i=0;$i<count($parts);$i++)
+					for($i=0;$i<count($parts);++$i)
 					{
 						if (($accept_type = substr($parts[$i],-1,1)) == '0' || (int)$accept_type > 0)
@@ -2137,5 +2137,5 @@
 			{
 				$exceptions = explode(',',$exception_str);
-				for($exception_count=0;$exception_count<count($exceptions);$exception_count++)
+				for($exception_count=0;$exception_count<count($exceptions);++$exception_count)
 				{
 					$exception[] = (int)$exceptions[$exception_count];
@@ -2196,5 +2196,5 @@
 				}
 
-				for($i=0;$i<count($this->cached_events[$date]);$i++)
+				for($i=0;$i<count($this->cached_events[$date]);++$i)
 				{
 					if($this->cached_events[$date][$i]['id'] == $event['id'] || $this->cached_events[$date][$i]['reference'] == $event['id'])
@@ -2256,5 +2256,5 @@
 			$repeated = $this->repeating_events;
 			$r_events = count($repeated);
-			for ($i=0;$i<$r_events;$i++)
+			for ($i=0;$i<$r_events;++$i)
 			{
 				$rep_events = $this->repeating_events[$i];
@@ -2460,5 +2460,5 @@
 					{
 						$emonth = 1;
-						$eyear++;
+						++$eyear;
 					}
 				}
@@ -2510,5 +2510,5 @@
 			if($c_cached_ids)
 			{
-				for($i=0;$i<$c_cached_ids;$i++)
+				for($i=0;$i<$c_cached_ids;++$i)
 				{
 					$event = $this->so->read_entry($cached_event_ids[$i]);
@@ -2525,5 +2525,5 @@
 						$start['month'] = (int)(substr($startdate,4,2));
 						$start['mday'] = (int)(substr($startdate,6,2));
-						for($j=$startdate,$k=0;$j<=$enddate;$k++,$j=(int)(date('Ymd',mktime(0,0,0,$start['month'],$start['mday'] + $k,$start['year']))))
+						for($j=$startdate,$k=0;$j<=$enddate;++$k,$j=(int)(date('Ymd',mktime(0,0,0,$start['month'],$start['mday'] + $k,$start['year']))))
 						{
 							$c_evt_day = count($this->cached_events[$j]) - 1;
@@ -2556,5 +2556,5 @@
 			if($c_cached_ids_repeating)
 			{
-				for($i=0;$i<$c_cached_ids_repeating;$i++)
+				for($i=0;$i<$c_cached_ids_repeating;++$i)
 				{
 					$this->repeating_events[$i] = $this->so->read_entry($cached_event_ids_repeating[$i]);
@@ -2575,5 +2575,5 @@
 					{
 						echo '<!-- Total events found matching '.$search_date.' = '.count($this->cached_events[$search_date]).' -->'."\n";
-						for($i=0;$i<count($this->cached_events[$search_date]);$i++)
+						for($i=0;$i<count($this->cached_events[$search_date]);++$i)
 						{
 							echo '<!-- Date: '.$search_date.' ['.$i.'] = '.$this->cached_events[$search_date][$i]['id'].' -->'."\n";
@@ -2583,5 +2583,5 @@
 			}
 			$retval = Array();
-			for($j=date('Ymd',mktime(0,0,0,$smonth,$sday,$syear)),$k=0;$j<=date('Ymd',mktime(0,0,0,$emonth,$eday,$eyear));$k++,$j=date('Ymd',mktime(0,0,0,$smonth,$sday + $k,$syear)))
+			for($j=date('Ymd',mktime(0,0,0,$smonth,$sday,$syear)),$k=0;$j<=date('Ymd',mktime(0,0,0,$emonth,$eday,$eyear));++$k,$j=date('Ymd',mktime(0,0,0,$smonth,$sday + $k,$syear)))
 			{
 				if(is_array($this->cached_events[$j]))
@@ -2765,7 +2765,7 @@
 		function prepare_matrix($interval,$increment,$part,$fulldate)
 		{
-			for($h=0;$h<24;$h++)
-			{
-				for($m=0;$m<$interval;$m++)
+			for($h=0;$h<24;++$h)
+			{
+				for($m=0;$m<$interval;++$m)
 				{
 					$index = (($h * 10000) + (($m * $increment) * 100));
@@ -2785,5 +2785,5 @@
 				$starttemp = $this->splittime("$start",False);
 				$subminute = 0;
-				for($m=0;$m<$interval;$m++)
+				for($m=0;$m<$interval;++$m)
 				{
 					$minutes = $increment * $m;
@@ -2797,5 +2797,5 @@
 				$endtemp = $this->splittime("$end",False);
 				$addminute = 0;
-				for($m=0;$m<$interval;$m++)
+				for($m=0;$m<$interval;++$m)
 				{
 					$minutes = ($increment * $m);
@@ -2809,5 +2809,5 @@
 				$endtemp = $this->splittime("$end",False);
 
-				for($h=$starttemp['hour'];$h<=$endtemp['hour'];$h++)
+				for($h=$starttemp['hour'];$h<=$endtemp['hour'];++$h)
 				{
 					$startminute = 0;
@@ -2825,5 +2825,5 @@
 					$time_display = $GLOBALS['phpgw']->common->show_date($eventstart['raw'],$this->users_timeformat).'-'.$GLOBALS['phpgw']->common->show_date($eventend['raw'],$this->users_timeformat);
 					$time_description = '('.$time_display.') '.$this->get_short_field($event,$private,'title').$this->display_status($event['participants'][$part]);
-					for($m=$startminute;$m<$endminute;$m++)
+					for($m=$startminute;$m<$endminute;++$m)
 					{
 						$index = ($hour + (($m * $increment) * 100));
@@ -2866,5 +2866,5 @@
 
 			//verifica se todos os participantes rejeitaram o evento
-			for($i = 0; $i < count($sts); $i++ ){ 
+			for($i = 0; $i < count($sts); ++$i ){
 				if( $sts[i] === "R")
 					unset( $sts[i] );
@@ -3065,5 +3065,5 @@
                     $last_space = false;
 
-                    for($i=0, $count=0; $i < $str_width; $i++, $count++)
+                    for($i=0, $count=0; $i < $str_width; ++$i, ++$count)
                     {
                         // If we're at a break
@@ -4199,5 +4199,5 @@
 		{
 			$already_moved = Array();
-			for($v=$firstday;$v<=$lastday;$v++)
+			for($v=$firstday;$v<=$lastday;++$v)
 			{
 				if (!$this->cached_events[$v])
@@ -4436,5 +4436,5 @@
 			{
 				$cal_grps = '';
-				for($i=0;$i<count($event['groups']);$i++)
+				for($i=0;$i<count($event['groups']);++$i)
 				{
 					if($GLOBALS['phpgw']->accounts->exists($event['groups'][$i]))
Index: /trunk/calendar/inc/class.boicalendar.inc.php
===================================================================
--- /trunk/calendar/inc/class.boicalendar.inc.php	(revision 6057)
+++ /trunk/calendar/inc/class.boicalendar.inc.php	(revision 7655)
@@ -1434,5 +1434,5 @@
 			//$this->debug('parse_parameters array return_value: '._debug_array($return_value,False));
 
-		for ($i = 0; $i < count($return_value); $i++) {
+		for ($i = 0; $i < count($return_value); ++$i) {
 				$name = strtolower($return_value[$i]['param']);
 				$value = $this->strip_quotes($return_value[$i]['value']);
@@ -1591,5 +1591,5 @@
 			if (!empty ($event['x_type'])) {
 					$c_x_type = count($event['x_type']);
-				for ($j = 0; $j < $c_x_type; $j++) {
+				for ($j = 0; $j < $c_x_type; ++$j) {
 					$str .= ';' . $this->build_xtype($event['x_type'][$j], '=');
 					}
@@ -1637,5 +1637,5 @@
 		if (!empty ($event['x_type'])) {
 				$c_x_type = count($event['x_type']);
-			for ($j = 0; $j < $c_x_type; $j++) {
+			for ($j = 0; $j < $c_x_type; ++$j) {
 				$str .= ';' . $this->build_xtype($event['x_type'][$j], '=');
 				}
@@ -1661,5 +1661,5 @@
 					if (!empty ($event[$value])) {
 						if ($multiples && $value != 'exdate') {
-							for ($i = 0; $i < count($event[$value]); $i++) {
+							for ($i = 0; $i < count($event[$value]); ++$i) {
 								$str .= $this->fold(strtoupper(str_replace('_', '-', $value)) . $this->build_parameters($event[$value][$i], $value));
 								}
@@ -1674,5 +1674,5 @@
 				case 'uri' :
 					if (!empty ($event[$value])) {
-						for ($i = 0; $i < count($event[$value]); $i++) {
+						for ($i = 0; $i < count($event[$value]); ++$i) {
 							$str .= $this->fold(strtoupper(str_replace('_', '-', $value)) . $this->build_parameters($event[$value][$i], $to_text));
 							}
@@ -1682,5 +1682,5 @@
 					if (!empty ($event[$value])) {
 						if ($multiples) {
-							for ($i = 0; $i < count($event[$value]); $i++) {
+							for ($i = 0; $i < count($event[$value]); ++$i) {
 								$str .= $this->fold(strtoupper(str_replace('_', '-', $value)) . $this->build_parameters($event[$value][$i], $value));
 							}
@@ -1712,5 +1712,5 @@
 						if (@ $this->parameter[$key]['type'] != 'function') {
 							if ($multiples && count($event[$value]) > 1) {
-								for ($i = 0; $i < count($event[$value]); $i++) {
+								for ($i = 0; $i < count($event[$value]); ++$i) {
 									$str .= $this->fold(strtoupper(str_replace('_', '-', $value)) . $this->build_parameters($event[$value][$i], $value));
 								}
@@ -1721,5 +1721,5 @@
 								$function = $this->parameter[$value]['function'];
 							if ($multiples) {
-								for ($i = 0; $i < count($event[$value]); $i++) {
+								for ($i = 0; $i < count($event[$value]); ++$i) {
 									$str .= $this->fold(strtoupper(str_replace('_', '-', $value)) . ':' . $this-> $function ($event[$value][$i]));
 								}
@@ -1732,5 +1732,5 @@
 				case 'cal-address' :
 					if (is_array($event[$value][0])) {
-						for ($j = 0; $j < count($event[$value]); $j++) {
+						for ($j = 0; $j < count($event[$value]); ++$j) {
 							$temp_output = $this->build_parameters($event[$value][$j], $value);
 							if ($temp_output) {
@@ -1748,5 +1748,5 @@
 			}
 		if (!empty ($event['x_type'])) {
-			for ($i = 0; $i < count($event['x_type']); $i++) {
+			for ($i = 0; $i < count($event['x_type']); ++$i) {
 				$str .= $this->build_xtype($event['x_type'][$i], ':');
 				}
@@ -1755,5 +1755,5 @@
 		if ($ical_item == 'vtimezone') {
 			if ($event['tzdata']) {
-				for ($k = 0; $k < count($event['tzdata']); $k++) {
+				for ($k = 0; $k < count($event['tzdata']); ++$k) {
 					$str .= 'BEGIN:' . strtoupper($event['tzdata'][$k]['type']) . "\r\n";
 					$str .= $this->build_card_internals(strtolower($event['tzdata'][$k]['type']), $event['tzdata'][$k]);
@@ -1763,5 +1763,5 @@
 			}
 		elseif ($event['alarm']) {
-			for ($k = 0; $k < count($event['alarm']); $k++) {
+			for ($k = 0; $k < count($event['alarm']); ++$k) {
 				$str .= 'BEGIN:VALARM' . "\r\n";
 				$str .= $this->build_card_internals('valarm', $event['alarm'][$k]);
@@ -2632,5 +2632,5 @@
 					$attendee_count = count($ical['attendee']);
 
-				for ($j = 0; $j < $attendee_count; $j++) {
+				for ($j = 0; $j < $attendee_count; ++$j) {
 					if ($this->is_owner($ical['attendee'][$j])) {
 						$so_event->add_attribute('participants', $this->switch_to_phpgw_status($ical['attendee'][$j]['partstat']), (int) $GLOBALS['phpgw_info']['user']['account_id']);
@@ -2788,5 +2788,5 @@
 
 	$c_events = count($ical['event']);
-	for ($i = 0; $i < $c_events; $i++) {
+	for ($i = 0; $i < $c_events; ++$i) {
 		$ex_participants = new exParticipants();
 
@@ -2832,5 +2832,5 @@
 						$c_attendees = count($ical['event'][$i]['attendee']);
 						$all_attendees = '';
-			for ($a = 0; $a < $c_attendees; $a++) {
+			for ($a = 0; $a < $c_attendees; ++$a) {
 				$cname = '"' . $ical['event'][$i]['attendee'][$a]['cn'] . '"';
 							$email = $ical['event'][$i]['attendee'][$a]['mailto']['user'];
Index: /trunk/calendar/inc/class.socalendar_sql.inc.php
===================================================================
--- /trunk/calendar/inc/class.socalendar_sql.inc.php	(revision 7552)
+++ /trunk/calendar/inc/class.socalendar_sql.inc.php	(revision 7655)
@@ -185,5 +185,5 @@
 							{
 								$id = 'cal:'.(int)$cal_id.':'.$n;
-								$n++;
+								++$n;
 								
 								$alarm['cal_id'] = $cal_id;		// we need the back-reference
@@ -376,5 +376,5 @@
 
 										$id = 'cal:'.(int)$cal_id.':'.$n;
-										$n++;
+										++$n;
 
 										$alarm['cal_id'] = $cal_id;		// we need the back-reference
@@ -402,5 +402,5 @@
 									}
 								}
-								$y++;
+								++$y;
 							}
 						}
@@ -426,5 +426,5 @@
 
 								$id = 'cal:'.(int)$cal_id.':'.$n;
-								$n++;
+								++$n;
 
 								$alarm['cal_id'] = $cal_id;		// we need the back-reference
@@ -467,5 +467,5 @@
 
 								$id = 'cal:'.(int)$cal_id.':'.$n;
-								$n++;
+								++$n;
 
 								$alarm['cal_id'] = $cal_id;		// we need the back-reference
@@ -597,5 +597,5 @@
 				{
 					$groups = explode(',',$this->stream->f('groups'));
-					for($j=1;$j<count($groups) - 1;$j++)
+					for($j=1;$j<count($groups) - 1;++$j)
 					{
 						$this->add_attribute('groups',$groups[$j],$j-1);
Index: /trunk/calendar/inc/class.ex_participants.inc.php
===================================================================
--- /trunk/calendar/inc/class.ex_participants.inc.php	(revision 5143)
+++ /trunk/calendar/inc/class.ex_participants.inc.php	(revision 7655)
@@ -106,5 +106,5 @@
                 $exp .= '('.$this->lang['NO ANSWER'].')';
 
-            $count++;
+            ++$count;
             $return .= $exp;
         }
Index: /trunk/calendar/inc/class.uipublicview.inc.php
===================================================================
--- /trunk/calendar/inc/class.uipublicview.inc.php	(revision 5132)
+++ /trunk/calendar/inc/class.uipublicview.inc.php	(revision 7655)
@@ -217,5 +217,5 @@
 			if($this->bo->check_perms(PHPGW_ACL_PRIVATE) == True)
 			{
-				$cols++;
+				++$cols;
 			}
 
@@ -268,11 +268,11 @@
 
 			$str = '';
-			for ($i = 0; $i < 25; $i++)
-			{
-				$m++;
+			for ($i = 0; $i < 25; ++$i)
+			{
+				++$m;
 				if ($m > 12)
 				{
 					$m = 1;
-					$y++;
+					++$y;
 				}
 				$d = mktime(0,0,0,$m,1,$y);
@@ -301,5 +301,5 @@
 
 				$str = '';
-				for ($i = -7; $i <= 7; $i++)
+				for ($i = -7; $i <= 7; ++$i)
 				{
 					$begin = $sun + (7*24*60*60 * $i) + 12*60*60;	// we use midday, that changes in daylight-saveing does not effect us
@@ -326,5 +326,5 @@
 
 			$str = '';
-			for ($i = ($this->bo->year - 3); $i < ($this->bo->year + 3); $i++)
+			for ($i = ($this->bo->year - 3); $i < ($this->bo->year + 3); ++$i)
 			{
 				$str .= '<option value="'.$i.'"'.($i == $this->bo->year?' selected':'').'>'.$i.'</option>'."\n";
@@ -356,5 +356,5 @@
 				$date_str .= '    <input type="hidden" name="year" value="'.$this->bo->year.'">'."\n";
 
-				for($i=1; $i<=6; $i++)
+				for($i=1; $i<=6; ++$i)
 				{
 					$str .= '<option value="'.$i.'"'.($i == $this->bo->num_months?' selected':'').'>'.$i.'</option>'."\n";
@@ -521,5 +521,5 @@
 
 			$description = $this->bo->get_short_field($event,$is_private,'description');
-			for($i=0;$i<count($picture);$i++)
+			for($i=0;$i<count($picture);++$i)
 			{
 				$var = Array(
@@ -617,5 +617,5 @@
 			}
 
-			for($i=0;$i<7;$i++)
+			for($i=0;$i<7;++$i)
 			{
 				$p->set_var('col_title',lang($GLOBALS['phpgw']->datetime->days[$i]));
@@ -870,5 +870,5 @@
 		function set_week_array($startdate,$cellcolor,$weekly)
 		{
-			for ($j=0,$datetime=$startdate;$j<7;$j++,$datetime += 86400)
+			for ($j=0,$datetime=$startdate;$j<7;++$j,$datetime += 86400)
 			{
 				$date = date('Ymd',$datetime + (60 * 60 * 2)); // +2h to be save when switching to and from dst, $datetime is alreay + TZ-Offset
@@ -946,5 +946,5 @@
 				if($holidays)
 				{
-					for($k=0;$k<count($holidays);$k++)
+					for($k=0;$k<count($holidays);++$k)
 					{
 						$holiday_name[] = $holidays[$k]['name'];
Index: /trunk/calendar/inc/class.uicalendar.inc.php
===================================================================
--- /trunk/calendar/inc/class.uicalendar.inc.php	(revision 6057)
+++ /trunk/calendar/inc/class.uicalendar.inc.php	(revision 7655)
@@ -282,5 +282,5 @@
 			if(!$mini_cal_tpl->get_var('daynames'))
 			{
-				for($i=0;$i<7;$i++)
+				for($i=0;$i<7;++$i)
 				{
 					$var = Array(
@@ -328,5 +328,5 @@
 					);
 				}
-				for($l=0;$l<count($var);$l++)
+				for($l=0;$l<count($var);++$l)
 				{
 					$this->output_template_array($mini_cal_tpl,'monthweek_day','mini_day',$var[$l]);
@@ -742,5 +742,5 @@
 			$p->set_var($var);
 
-			for($i=1;$i<=12;$i++)
+			for($i=1;$i<=12;++$i)
 			{
 				if(($i % 3) == 1)
@@ -1331,5 +1331,5 @@
 			$str = '';
 
-			for($i=0;$i<count($event['recur_exception']);$i++)
+			for($i=0;$i<count($event['recur_exception']);++$i)
 			{
 				$str .= '    <option value="'.$i.'">'.$GLOBALS['phpgw']->common->show_date($event['recur_exception'][$i]).'</option>'."\n";
@@ -1457,5 +1457,5 @@
 				// Add participants
 				$participants = explode(";", $GLOBALS['phpgw']->session->appsession("participants") );
-				for($_f_part=0; $_f_part<count($participants); $_f_part++)
+				for($_f_part=0; $_f_part<count($participants); ++$_f_part)
 				{
 					$this->bo->add_attribute('participants','A',$participants[$_f_part]);
@@ -1800,7 +1800,7 @@
 				. '<tr><td height="1" colspan="'.((11 * $interval) + 1).'" bgcolor="black"><img src="'.$pix.'"></td></tr>'
 				. '<tr><td width="15%"><font color="'.$this->theme['bg_text'].'" face="'.$this->theme['font'].'" size="-2">'.lang('Participant').'</font></td>';
-			for($i=8;$i<19;$i++)
-			{
-				for($j=0;$j<$interval;$j++)
+			for($i=8;$i<19;++$i)
+			{
+				for($j=0;$j<$interval;++$j)
 				{
 					$k = ($j == 0 ? sprintf('%02d',$i).'<br>':'').sprintf('%02d',$j*$increment);
@@ -1854,7 +1854,7 @@
 				if(!$this->bo->cached_events[$date['full']])
 				{
-					for($j=8;$j<19;$j++)
+					for($j=8;$j<19;++$j)
 					{
-						for($k=0;$k<$interval;$k++)
+						for($k=0;$k<$interval;++$k)
 						{
 //							$helper_name = $k*
@@ -1867,8 +1867,8 @@
 				{
 					$time_slice = $this->bo->prepare_matrix($interval,$increment,$part,$date['full']);
-					for($h=8;$h<19;$h++)
+					for($h=8;$h<19;++$h)
 					{
 						$hour = $h * 10000;
-						for($m=0;$m<$interval;$m++)
+						for($m=0;$m<$interval;++$m)
 						{
 							$index = ($hour + (($m * $increment) * 100));
@@ -2267,5 +2267,5 @@
 			$y = $this->bo->year;
 			$this->bo->read_holidays($y);
-			for ($i=1; $i<=$this->bo->num_months; $i++,$m++)
+			for ($i=1; $i<=$this->bo->num_months; ++$i,++$m)
 			{
 				if ($m == 13)
@@ -2296,5 +2296,5 @@
 					);
 				}
-				for ($d=1; $d<=$days; $d++)
+				for ($d=1; $d<=$days; ++$d)
 				{
 					$dayname = substr(lang(date('D',mktime(0,0,0,$m,$d,$y))),0,2);
@@ -2601,5 +2601,5 @@
 				if ($end_cell == $start_cell && $end_cell < $last_cell)
 				{
-					$end_cell++;	// min. width 1 interval
+					++$end_cell;	// min. width 1 interval
 				}
 			}
@@ -2736,5 +2736,5 @@
 			// process all events within observed interval
 			//
-			for($v=$this->planner_firstday;$v<=$this->planner_lastday;$v++)
+			for($v=$this->planner_firstday;$v<=$this->planner_lastday;++$v)
 			{
 				$daily = $this->bo->cached_events[$v];
@@ -2809,5 +2809,5 @@
 			$accounts = $GLOBALS['phpgw']->acl->get_ids_for_location('run',1,'calendar');
 			$users = Array();
-			for($i=0;$i<count($accounts);$i++)
+			for($i=0;$i<count($accounts);++$i)
 			{
 				$user = $accounts[$i];
@@ -2820,5 +2820,5 @@
 						if($group_members != False)
 						{
-							for($j=0;$j<count($group_members);$j++)
+							for($j=0;$j<count($group_members);++$j)
 							{
 								if(!isset($users[$group_members[$j]]))
@@ -2861,5 +2861,5 @@
 			);
 
-			for($i=0;$i<count($var);$i++)
+			for($i=0;$i<count($var);++$i)
 			{
 				$this->output_template_array($p,'rows','list',$var[$i]);
@@ -3155,5 +3155,5 @@
 			if($this->bo->check_perms(PHPGW_ACL_PRIVATE) == True)
 			{
-				$cols++;
+				++$cols;
 			}
 
@@ -3229,10 +3229,10 @@
 			/* Bloco adicionado para receber o dia a partir do qual a versao para impressao sera gerada */
 			$str_ini = '';
- 			for ($i = 1; $i <= ($GLOBALS['phpgw']->datetime->days_in_month($m, $y)); $i++)
+ 			for ($i = 1; $i <= ($GLOBALS['phpgw']->datetime->days_in_month($m, $y)); ++$i)
 			{
 				$str_ini .= '<option value="'.$i.'"'.($i == $day?' selected':'').'>'.$i.'</option>'."\n";
 			}
 			$str_qtd = '<option value="'.''.'"'.($i == $_POST['qtd_dias']?' selected':'').'>'.''.'</option>'."\n";
-			for ($i = 1; $i <= 45; $i++)
+			for ($i = 1; $i <= 45; ++$i)
 			{
 				$str_qtd .= '<option value="'.$i.'"'.($i == $_POST['qtd_dias']?' selected':'').'>'.$i.'</option>'."\n";
@@ -3272,11 +3272,11 @@
 
 			$str = '';
-			for ($i = 0; $i < 20; $i++)
-			{
-				$m++;
+			for ($i = 0; $i < 20; ++$i)
+			{
+				++$m;
 				if ($m > 12)
 				{
 					$m = 1;
-					$y++;
+					++$y;
 				}
 				$d = mktime(0,0,0,$m,1,$y);
@@ -3304,5 +3304,5 @@
 
 				$str = '';
-				for ($i = -7; $i <= 7; $i++)
+				for ($i = -7; $i <= 7; ++$i)
 				{
 					$begin = $sun + (7*24*60*60 * $i) + 12*60*60;	// we use midday, that changes in daylight-saveing does not effect us
@@ -3329,5 +3329,5 @@
 
 			$str = '';
-			for ($i = ($this->bo->year - 3); $i < ($this->bo->year + 3); $i++)
+			for ($i = ($this->bo->year - 3); $i < ($this->bo->year + 3); ++$i)
 			{
 				$str .= '<option value="'.$i.'"'.($i == $this->bo->year?' selected':'').'>'.$i.'</option>'."\n";
@@ -3358,5 +3358,5 @@
 				$date_str .= '    <input type="hidden" name="year" value="'.$this->bo->year.'">'."\n";
 
-				for($i=1; $i<=6; $i++)
+				for($i=1; $i<=6; ++$i)
 				{
 					$str .= '<option value="'.$i.'"'.($i == $this->bo->num_months?' selected':'').'>'.$i.'</option>'."\n";
@@ -3607,5 +3607,5 @@
 
 			$description = $this->bo->get_short_field($event,$is_private,'description');
-			for($i=0;$i<count($picture);$i++)
+			for($i=0;$i<count($picture);++$i)
 			{
 				$var = Array(
@@ -3797,5 +3797,5 @@
 
 			$description = $this->bo->get_short_field($event,$is_private,'description');
-			for($i=0;$i<count($picture);$i++)
+			for($i=0;$i<count($picture);++$i)
 			{
 				$var = Array(
@@ -3868,5 +3868,5 @@
 
 			$overlap = '';
-			for($i=0;$i<count($overlapping_events);$i++)
+			for($i=0;$i<count($overlapping_events);++$i)
 			{
 				$overlapped_event = $this->bo->read_entry($overlapping_events[$i],True);
@@ -4056,5 +4056,5 @@
 			}
 
-			for($i=0;$i<7;$i++)
+			for($i=0;$i<7;++$i)
 			{
 				$p->set_var('col_title',lang($GLOBALS['phpgw']->datetime->days[$i]));
@@ -4536,5 +4536,5 @@
 			$tstop = $tstart + 604800;
 			$original_owner = $this->bo->so->owner;
-			for($i=0;$i<$counter;$i++)
+			for($i=0;$i<$counter;++$i)
 			{
 				$this->bo->so->owner = $owners_array[$i];
@@ -4877,7 +4877,7 @@
 				. '<tr><td height="1" colspan="'.((24 * $interval) + 1).'" bgcolor="black"><img src="'.$pix.'"></td></tr>'
 				. '<tr><td width="15%"><font color="'.$this->theme['bg_text'].'" face="'.$this->theme['font'].'" size="-2">'.lang('Participant').'</font></td>';
-			for($i=0;$i<24;$i++)
-			{
-				for($j=0;$j<$interval;$j++)
+			for($i=0;$i<24;++$i)
+			{
+				for($j=0;$j<$interval;++$j)
 				{
 					$k = ($j == 0 ? sprintf('%02d',$i).'<br>':'').sprintf('%02d',$j*$increment);
@@ -4916,7 +4916,7 @@
 				if(!$this->bo->cached_events[$date['full']])
 				{
-					for($j=0;$j<24;$j++)
+					for($j=0;$j<24;++$j)
 					{
-						for($k=0;$k<$interval;$k++)
+						for($k=0;$k<$interval;++$k)
 						{
 							$str .= '<td height="1" align="left" bgcolor="'.$this->theme['bg_color'].'" color="#999999">&nbsp;</td>';
@@ -4928,5 +4928,5 @@
 				{
 					$time_slice = $this->bo->prepare_matrix($interval,$increment,$part,$date['full']);
-					for($h=0;$h<24;$h++)
+					for($h=0;$h<24;++$h)
 					{
 						$hour = $h * 10000;
@@ -5479,5 +5479,5 @@
 				// days
 				$dout = '<select name="cal[alarmdays]">'."\n";
-				for($i=0;$i<32;$i++)
+				for($i=0;$i<32;++$i)
 				{
 					$dout .= '<option value="'.$i.'"'.($i==$days?' selected':'').'>'.$i.'</option>'."\n";
@@ -5486,5 +5486,5 @@
 				// hours
 				$hout = '<select name="cal[alarmhours]">'."\n";
-				for($i=0;$i<25;$i++)
+				for($i=0;$i<25;++$i)
 				{
 					$hout .= '<option value="'.$i.'"'.($i==$hours?' selected':'').'>'.$i.'</option>'."\n";
@@ -5493,5 +5493,5 @@
 				// minutes
 				$mout = '<select name="cal[alarmminutes]">'."\n";
-				for($i=0;$i<61;$i++)
+				for($i=0;$i<61;++$i)
 				{
 					$mout .= '<option value="'.$i.'"'.($i==$min?' selected':'').'>'.$i.'</option>'."\n";
@@ -5734,5 +5734,5 @@
 			}
 
-			for ($i=0; $i<count($control_data['part']); $i++)
+			for ($i=0; $i<count($control_data['part']); ++$i)
 			{
 				$id = $control_data['part'][$i];
@@ -5745,5 +5745,5 @@
 			if ($control_data['action'] == lang('Delete selected contacts'))
 			{
-				for ($i=0; $i<count($control_data['delete']); $i++)
+				for ($i=0; $i<count($control_data['delete']); ++$i)
 				{
 					$id = $control_data['delete'][$i];
@@ -5773,5 +5773,5 @@
 				$p->set_var('ckbox_delete_participant',$contact['name']);
 				$p->parse('V_partlist','B_partlist',True);
-				$total_contacts++;
+				++$total_contacts;
 			}
 
@@ -5894,5 +5894,5 @@
 		{
 			$data = date("m");
-			for ($j=0,$datetime=$startdate;$j<7;$j++,$datetime += 86400)
+			for ($j=0,$datetime=$startdate;$j<7;++$j,$datetime += 86400)
 			{
 				$date = date('Ymd',$datetime + (60 * 60 * 2)); // +2h to be save when switching to and from dst, $datetime is alreay + TZ-Offset
@@ -5970,5 +5970,5 @@
 				if($holidays)
 				{
-					for($k=0;$k<count($holidays);$k++)
+					for($k=0;$k<count($holidays);++$k)
 					{
 						$holiday_name[] = $holidays[$k]['name'];
Index: /trunk/calendar/inc/class.boholiday.inc.php
===================================================================
--- /trunk/calendar/inc/class.boholiday.inc.php	(revision 5132)
+++ /trunk/calendar/inc/class.boholiday.inc.php	(revision 7655)
@@ -145,5 +145,5 @@
 				$c_holidays = count($_POST['name']);
 				$fp = fopen($file,'w');
-				for($i=0;$i<$c_holidays;$i++)
+				for($i=0;$i<$c_holidays;++$i)
 				{
 					fwrite($fp,$this->locales[0]."\t".$_POST['name'][$i]."\t".$_POST['day'][$i]."\t".$_POST['month'][$i]."\t".$_POST['occurence'][$i]."\t".$_POST['dow'][$i]."\t".$_POST['observance'][$i]."\n");
@@ -262,5 +262,5 @@
 				}
 				$c_lines = count($lines);
-				for($i=0;$i<$c_lines;$i++)
+				for($i=0;$i<$c_lines;++$i)
 				{
 //					echo 'Line #'.$i.' : '.$lines[$i]."<br>\n";
@@ -346,7 +346,7 @@
 		{
 			$c_holidays = count($holidays);
-			for($outer_loop=0;$outer_loop<($c_holidays - 1);$outer_loop++)
-			{
-				for($inner_loop=$outer_loop;$inner_loop<$c_holidays;$inner_loop++)
+			for($outer_loop=0;$outer_loop<($c_holidays - 1);++$outer_loop)
+			{
+				for($inner_loop=$outer_loop;$inner_loop<$c_holidays;++$inner_loop)
 				{
 					if($holidays[$outer_loop]['date'] > $holidays[$inner_loop]['date'])
@@ -364,5 +364,5 @@
 		{
 			$new_holidays = Array();
-			for($i=0;$i<count($holidays);$i++)
+			for($i=0;$i<count($holidays);++$i)
 			{
 //	echo "Setting Holidays Date : ".date('Ymd',$holidays[$i]['date'])."<br>\n";
@@ -386,5 +386,5 @@
 
 			$temp_locale = $GLOBALS['phpgw_info']['user']['preferences']['common']['country'];
-			for($i=0;$i<count($holidays);$i++)
+			for($i=0;$i<count($holidays);++$i)
 			{
 				$c = $i;
Index: /trunk/calendar/inc/class.socalendar.inc.php
===================================================================
--- /trunk/calendar/inc/class.socalendar.inc.php	(revision 6057)
+++ /trunk/calendar/inc/class.socalendar.inc.php	(revision 7655)
@@ -179,5 +179,5 @@
 			$events = $this->list_events($startYear,$startMonth,$startDay,$endYear,$endMonth,$endDay);
 			$events_cached = Array();
-			for($i=0;$i<count($events);$i++)
+			for($i=0;$i<count($events);++$i)
 			{
 				$events_cached[] = $this->read_entry($events[$i]);
Index: /trunk/calendar/csv_import.php
===================================================================
--- /trunk/calendar/csv_import.php	(revision 6057)
+++ /trunk/calendar/csv_import.php	(revision 7655)
@@ -485,5 +485,5 @@
 					{
 						$calendar->add_attribute('participants',$status,$part);
-						$participants++;
+						++$participants;
 					}
 				}
Index: /trunk/calendar/templates/classic/listUsers.php
===================================================================
--- /trunk/calendar/templates/classic/listUsers.php	(revision 5132)
+++ /trunk/calendar/templates/classic/listUsers.php	(revision 7655)
@@ -85,5 +85,5 @@
 		{
 			$sector_space = '';
-			for ($i=1; $i < $sector->sector_level; $i++)
+			for ($i=1; $i < $sector->sector_level; ++$i)
 				$sector_space = '---'.$sector_space;
 			$sector->sector_name = $sector_space.' '.$sector->sector_name;
@@ -114,10 +114,10 @@
 		$sr=ldap_list($ds, $user_context, ("(&(cn=*)(phpgwaccounttype=g))"));
 		$info = ldap_get_entries($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);
 
 		$sr=ldap_list($ds, $user_context, ("(&(cn=*)(phpgwaccounttype=u)(!(cn=lista*)))"));
 		$info = ldap_get_entries($ds, $sr);
-		for ($i=0; $i<$info["count"]; $i++)
+		for ($i=0; $i<$info["count"]; ++$i)
 		{
 			if ($info[$i]["phpgwaccountvisible"][0] == '-1')
Index: /trunk/calendar/templates/classic/header.inc.php
===================================================================
--- /trunk/calendar/templates/classic/header.inc.php	(revision 27)
+++ /trunk/calendar/templates/classic/header.inc.php	(revision 7655)
@@ -105,5 +105,5 @@
 		if(isset($GLOBALS['HTTP_POST_VARS']['participants']) && $GLOBALS['HTTP_POST_VARS']['participants'])
 		{
-			for ($i=0;$i<count($GLOBALS['HTTP_POST_VARS']['participants']);$i++)
+			for ($i=0;$i<count($GLOBALS['HTTP_POST_VARS']['participants']);++$i)
 			{
 				$base_hidden_vars .= '    <input type="hidden" name="participants[]" value="'.$GLOBALS['HTTP_POST_VARS']['participants'][$i].'">'."\n";
Index: /trunk/calendar/templates/default/listUsers.php
===================================================================
--- /trunk/calendar/templates/default/listUsers.php	(revision 5509)
+++ /trunk/calendar/templates/default/listUsers.php	(revision 7655)
@@ -93,5 +93,5 @@
 		{
 			$sector_space = '';
-			for ($i=1; $i < $sector->sector_level; $i++)
+			for ($i=1; $i < $sector->sector_level; ++$i)
 				$sector_space = '---'.$sector_space;
 			$sector->sector_name = $sector_space.' '.$sector->sector_name;
@@ -122,10 +122,10 @@
 		$sr=ldap_list($ds, $user_context, ("(&(cn=*)(phpgwaccounttype=g))"));
 		$info = ldap_get_entries($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);
 
 		$sr=ldap_list($ds, $user_context, ("(&(cn=*)(phpgwaccounttype=u)(!(cn=lista*)))"));
 		$info = ldap_get_entries($ds, $sr);
-		for ($i=0; $i<$info["count"]; $i++)
+		for ($i=0; $i<$info["count"]; ++$i)
 		{
 			if ($info[$i]["phpgwaccountvisible"][0] == '-1')
Index: /trunk/calendar/templates/default/header.inc.php
===================================================================
--- /trunk/calendar/templates/default/header.inc.php	(revision 4711)
+++ /trunk/calendar/templates/default/header.inc.php	(revision 7655)
@@ -105,5 +105,5 @@
 		if(isset($GLOBALS['HTTP_POST_VARS']['participants']) && $GLOBALS['HTTP_POST_VARS']['participants'])
 		{
-			for ($i=0;$i<count($GLOBALS['HTTP_POST_VARS']['participants']);$i++)
+			for ($i=0;$i<count($GLOBALS['HTTP_POST_VARS']['participants']);++$i)
 			{
 				$base_hidden_vars .= '    <input type="hidden" name="participants[]" value="'.$GLOBALS['HTTP_POST_VARS']['participants'][$i].'">'."\n";
Index: /trunk/workflow/controller.php
===================================================================
--- /trunk/workflow/controller.php	(revision 3167)
+++ /trunk/workflow/controller.php	(revision 7655)
@@ -30,5 +30,5 @@
  			$count_files = $_POST['countFiles'];
 			$array_files = array(); 		
- 			for($idx = 1; $idx <= $count_files; $idx++) { 		
+ 			for($idx = 1; $idx <= $count_files; ++$idx) {
  				if($_FILES['file_'.$idx] && !$_FILES['file_'.$idx]['error'])
  					$array_files[] = $_FILES['file_'.$idx]; 					 
Index: /trunk/workflow/inc/local/functions/function.wf_get_uploaded_files.php
===================================================================
--- /trunk/workflow/inc/local/functions/function.wf_get_uploaded_files.php	(revision 795)
+++ /trunk/workflow/inc/local/functions/function.wf_get_uploaded_files.php	(revision 7655)
@@ -25,5 +25,5 @@
 	}
 	else
-		for ($i = 0; $i < $numberOfFiles; $i++)
+		for ($i = 0; $i < $numberOfFiles; ++$i)
 		{
 			foreach ($fileAtributes as $atribute)
Index: /trunk/workflow/inc/local/functions/function.wf_debug.php
===================================================================
--- /trunk/workflow/inc/local/functions/function.wf_debug.php	(revision 795)
+++ /trunk/workflow/inc/local/functions/function.wf_debug.php	(revision 7655)
@@ -14,5 +14,6 @@
 	/* prepare the backtrace array */
 	$importantBacktrace = array();
-	for ($i = 0; $i < count($backTrace); $i++)
+    $backTrace_count = count($backTrace);
+	for ($i = 0; $i < $backTrace_count; ++$i)
 	{
 		if (strpos($backTrace[$i]['file'], 'class.run_activity.inc.php') !== false)
Index: /trunk/workflow/inc/local/classes/class.wf_crypt.php
===================================================================
--- /trunk/workflow/inc/local/classes/class.wf_crypt.php	(revision 795)
+++ /trunk/workflow/inc/local/classes/class.wf_crypt.php	(revision 7655)
@@ -63,5 +63,5 @@
 		$iv = $this->_generate_iv();		
 		$out = '';		
-		for($c=0;$c < $this->hash_length;$c++) {
+		for($c=0;$c < $this->hash_length;++$c) {
 			$out .= chr(ord($iv[$c]) ^ ord($this->hash_key[$c]));
 		}
@@ -73,5 +73,5 @@
 			}
 			$out .= chr(ord($key[$c % $this->hash_length]) ^ ord($string[$c]));
-			$c++;
+			++$c;
 		}
 		if($this->base64) $out = base64_encode($out);
@@ -90,5 +90,5 @@
 		$string = substr($string,$this->hash_length,strlen($string) - $this->hash_length);
 		$iv = $out = '';
-		for($c=0;$c < $this->hash_length;$c++) {
+		for($c=0;$c < $this->hash_length;++$c) {
 			$iv .= chr(ord($tmp_iv[$c]) ^ ord($this->hash_key[$c]));
 		}
@@ -100,5 +100,5 @@
 			}
 			$out .= chr(ord($key[$c % $this->hash_length]) ^ ord($string[$c]));
-			$c++;
+			++$c;
 		}
 		return $out;
Index: /trunk/workflow/inc/local/classes/class.wf_paging.php
===================================================================
--- /trunk/workflow/inc/local/classes/class.wf_paging.php	(revision 795)
+++ /trunk/workflow/inc/local/classes/class.wf_paging.php	(revision 7655)
@@ -215,7 +215,9 @@
 	{
 		$output = parent::paginationResult();
-		if (isset($this->originalRequest['s_co']) && isset($this->originalRequest['s_so']))
-			for ($i = 0; $i < count($output); $i++)
+		if (isset($this->originalRequest['s_co']) && isset($this->originalRequest['s_so'])){
+            $output_count = count($output);
+			for ($i = 0; $i < $output_count; ++$i)
 				$output[$i]['link'] .= "&amp;s_co=" . $this->storage['s_co'] . "&amp;s_so=" . $this->storage['s_so'];
+        }
 		return $output;
 	}
Index: /trunk/workflow/inc/local/classes/class.wf_date.php
===================================================================
--- /trunk/workflow/inc/local/classes/class.wf_date.php	(revision 5921)
+++ /trunk/workflow/inc/local/classes/class.wf_date.php	(revision 7655)
@@ -213,15 +213,15 @@
 		// Adiciona os anos
 		$years = intval($years);
-		for ($i = 1; $i <= $years; $i++) {
-			$year++;
+		for ($i = 1; $i <= $years; ++$i) {
+			++$year;
 			$daysInc += ($this->isLeapYear($year)) ? 366 : 365;
 		}
 		// Adiciona os meses de acordo com o número de dias em cada um
 		$months = intval($months);
-		for ($i = 1; $i <= $months; $i++) {
+		for ($i = 1; $i <= $months; ++$i) {
 			$mTemp = $i % 12 - 1;
 			$yTemp = intval($i / 12);
 			if (($month + $mTemp) > 12) {
-				$yTemp++;
+				++$yTemp;
 				$mTemp = ($month + $mTemp) - 12;
 			} else {
@@ -286,5 +286,5 @@
 		$daysDec = 0;
 		// Adiciona os anos
-		for ($i = 1; $i <= $years; $i++) {
+		for ($i = 1; $i <= $years; ++$i) {
 			$s = ($this->isLeapYear($year)) ? 366 : 365;
 			$daysDec += ($this->isLeapYear($year)) ? 366 : 365;
@@ -292,9 +292,9 @@
 		}		
 		// Adiciona os meses de acordo com os dias de cada mês
-		for ($i = 1; $i <= $months; $i++) {
+		for ($i = 1; $i <= $months; ++$i) {
 			$mTemp = $i % 12;
 			$yTemp = intval($i / 12);
 			if (($month - $mTemp) <= 0) {
-				$yTemp++;
+				++$yTemp;
 				$mTemp = 12 + ($month - $mTemp);
 			} else {
@@ -611,5 +611,5 @@
             if ($year++ == 99) {
                 $year = 0;
-                $century++;
+                ++$century;
             }
         }
Index: /trunk/workflow/inc/local/classes/class.wf_ldap.php
===================================================================
--- /trunk/workflow/inc/local/classes/class.wf_ldap.php	(revision 3167)
+++ /trunk/workflow/inc/local/classes/class.wf_ldap.php	(revision 7655)
@@ -142,5 +142,5 @@
 		/* prepara a saída */
 		$output = array();
-		for ($i = 0; $i < $result['count']; $i++)
+		for ($i = 0; $i < $result['count']; ++$i)
 			$output[] = array(
 				'id' => $result[$i]['uidnumber'][0],
Index: /trunk/workflow/inc/class.powergraphic.inc.php
===================================================================
--- /trunk/workflow/inc/class.powergraphic.inc.php	(revision 6037)
+++ /trunk/workflow/inc/class.powergraphic.inc.php	(revision 7655)
@@ -405,5 +405,5 @@
 
             unset($temp[$index]);
-            $i++;
+            ++$i;
         }
 
@@ -464,5 +464,5 @@
             imagestring($this->img, 3, ($this->graphic_area_x1-$less-7), ($higher_value_y-7), $this->higher_value_str, $this->color['axis_values']);
 
-            for ($i = 1; $i < 10; $i++)
+            for ($i = 1; $i < 10; ++$i)
             {
                 $dec_y = $i * ($higher_value_size / 10);
@@ -503,5 +503,5 @@
             imagestring($this->img, 3, (($this->graphic_area_x1+$higher_value_size) - ($this->string_width($this->higher_value, 3)/2)), ($this->graphic_area_y2+2), $this->higher_value_str, $this->color['axis_values']);
 
-            for ($i = 1, $alt = 15; $i < 10; $i++)
+            for ($i = 1, $alt = 15; $i < 10; ++$i)
             {
                 $dec_x = number_format(round($i * ($higher_value_size  / 10), 1), 1, ".", "");
@@ -561,5 +561,5 @@
                 $y2   = $this->graphic_area_y2 - 1;
                 $x   += $this->space_between_bars;
-                $num++;
+                ++$num;
 
                 imageline($this->img, ($x1+1), ($y1-1), $x2, ($y1-1), $this->color['bars_shadow']);
@@ -950,5 +950,5 @@
                 imagestring($this->img, 2, ($x2-$less), ($y-2), $percent, $this->color['axis_values']);
                 $y += 14;
-                $num++;
+                ++$num;
             }
         }
@@ -1281,5 +1281,5 @@
     <span style="margin-left: 40px;">Parameter</span> 
     <span style="margin-left: 50px;">Value 1</span>  <span id="value_2" style="display: none; margin-left: 25px;">Value 2</span>';
-        for ($i = 0; $i <= 4; $i++) {
+        for ($i = 0; $i <= 4; ++$i) {
             echo '<div style="margin-left: 8px;"> '.($i+1).'. <input type="text" name="x'.$i.'" id="x'.$i.'" size="20" /> ';
             echo ' <input type="text" name="y'.$i.'" id="y'.$i.'" size="10" onkeypress="return numbers();" /> ';
Index: /trunk/workflow/inc/class.utils.string.php
===================================================================
--- /trunk/workflow/inc/class.utils.string.php	(revision 5934)
+++ /trunk/workflow/inc/class.utils.string.php	(revision 7655)
@@ -481,5 +481,5 @@
 		if (!empty($str)) {
 			$w = preg_split("/\s+/", $str);
-			for ($i=0, $s=sizeof($w); $i<$s; $i++) {
+			for ($i=0, $s=sizeof($w); $i<$s; ++$i) {
 				if (empty($w[$i]))
 					continue;
@@ -631,5 +631,5 @@
 		$processed = '';
 		$paragraphs = explode("\n", $str);
-		for ($i=0; $i<sizeof($paragraphs); $i++) {
+		for ($i=0; $i<sizeof($paragraphs); ++$i) {
 			$processed .= $this->wrapLine($paragraphs[$i], $num, $breakString) . $breakString;
 		}
@@ -656,5 +656,5 @@
 		$indent = max($width, $indent);
 		// gera a numeraï¿œï¿œo de linhas da string
-		for ($i = 0; $i < $size; $i++) {
+		for ($i = 0; $i < $size; ++$i) {
 			$line[$i] = str_pad((string)($i + $start), $indent, ' ', STR_PAD_LEFT) . $afterNumberChar . ' ' . trim($line[$i]);
 		}
Index: /trunk/workflow/inc/class.workflow_processmanager.inc.php
===================================================================
--- /trunk/workflow/inc/class.workflow_processmanager.inc.php	(revision 3167)
+++ /trunk/workflow/inc/class.workflow_processmanager.inc.php	(revision 7655)
@@ -390,5 +390,6 @@
 			$transitions=Array();
 			$jobs = array();
-			for($i=0;$i<count($this->tree[1]['children']);$i++) {
+            $tree_count = count($this->tree[1]['children']);
+			for($i=0;$i<$tree_count;++$i) {
 			  // Process attributes
 			  $z=$this->tree[1]['children'][$i];
@@ -397,10 +398,12 @@
 			  //config values
 			  if ($name=='configs') {
-				for($j=0;$j<count($this->tree[$z]['children']);$j++) {
+                $tree_z_count = count($this->tree[$z]['children']);
+				for($j=0;$j<$tree_z_count;++$j) {
 				  $z2 = $this->tree[$z]['children'][$j];
 				  // this is a config $name = $this->tree[$z2]['name'];
 				  $aux = Array();
 				  if($this->tree[$z2]['name']=='config') {
-					for($k=0;$k<count($this->tree[$z2]['children']);$k++) {
+                    $tree_z_count = count($this->tree[$z2]['children']);
+					for($k=0;$k<$tree_z_count;++$k) {
 					  $z3 = $this->tree[$z2]['children'][$k];
 					  $name = trim($this->tree[$z3]['name']);
@@ -414,10 +417,12 @@
 			  //activities
 			  elseif($name=='activities') {
-				for($j=0;$j<count($this->tree[$z]['children']);$j++) {
+                $tree_z_count = count($this->tree[$z]['children']);
+				for($j=0;$j<$tree_z_count;++$j) {
 				  $z2 = $this->tree[$z]['children'][$j];
 				  // this is an activity $name = $this->tree[$z2]['name'];
 				  $aux = Array();
 				  if($this->tree[$z2]['name']=='activity') {
-					for($k=0;$k<count($this->tree[$z2]['children']);$k++) {
+                    $tree_z2_count = count($this->tree[$z2]['children']);
+					for($k=0;$k<$tree_z2_count;++$k) {
 					  $z3 = $this->tree[$z2]['children'][$k];
 					  $name = trim($this->tree[$z3]['name']);
@@ -425,5 +430,6 @@
 					  if($name=='roles') {
 						$roles=Array();
-						for($l=0;$l<count($this->tree[$z3]['children']);$l++) {
+                        $tree_z3_count = count($this->tree[$z3]['children']);
+						for($l=0;$l<$tree_z3_count;++$l) {
 						  $z4 = $this->tree[$z3]['children'][$l];
 						  $name = trim($this->tree[$z4]['name']);
@@ -445,5 +451,6 @@
 					  {
 						$agents=Array();
-						for($l=0;$l<count($this->tree[$z3]['children']);$l++) 
+                        $tree_z3_count = count($this->tree[$z3]['children']);
+						for($l=0;$l<$tree_z3_count;++$l)
 						{
 						  $z4 = $this->tree[$z3]['children'][$l];
@@ -453,5 +460,6 @@
 						  {
 							$agent = array();
-							for($m=0;$m<count($this->tree[$z4]['children']);$m++)
+                            $tree_z4_count = count($this->tree[$z4]['children']);
+							for($m=0;$m<$tree_z4_count;++$m)
 							{
 							  $z5 = $this->tree[$z4]['children'][$m];
@@ -466,5 +474,6 @@
 							  elseif ($name=='agent_datas') 
 							  {
-								for($n=0;$n<count($this->tree[$z5]['children']);$n++)
+                                $tree_z5_count = count($this->tree[$z5]['children']);
+								for($n=0;$n<$tree_z5_count;++$n)
 								{
 								  $z6 = $this->tree[$z5]['children'][$n];
@@ -474,5 +483,6 @@
 								  if ($name=='agent_data')
 								  {
-									for($o=0;$o<count($this->tree[$z6]['children']);$o++)
+                                    $tree_z6_count = count($this->tree[$z6]['children']);
+									for($o=0;$o<$tree_z6_count;++$o)
 									{
 									  $z7 = $this->tree[$z6]['children'][$o];
@@ -510,10 +520,12 @@
 				}
 			  } elseif($name=='transitions') {
-				for($j=0;$j<count($this->tree[$z]['children']);$j++) {
+                $tree_z_count = count($this->tree[$z]['children']);
+				for($j=0;$j<$tree_z_count;++$j) {
 				  $z2 = $this->tree[$z]['children'][$j];
 				  // this is an activity $name = $this->tree[$z2]['name'];
 				  $aux=Array();
 				  if($this->tree[$z2]['name']=='transition') {
-					for($k=0;$k<count($this->tree[$z2]['children']);$k++) {
+                    $tree_z2_count = count($this->tree[$z2]['children']);
+					for($k=0;$k<$tree_z2_count;++$k) {
 					  $z3 = $this->tree[$z2]['children'][$k];
 					  $name = trim($this->tree[$z3]['name']);
@@ -527,10 +539,12 @@
 				}
 			  } elseif($name=='includes') {
-				for($j=0;$j<count($this->tree[$z]['children']);$j++) {
+                $tree_z_count = count($this->tree[$z]['children']);
+				for($j=0;$j<$tree_z_count;++$j) {
 				  $z2 = $this->tree[$z]['children'][$j];
 				  // this is an activity $name = $this->tree[$z2]['name'];
 				  $aux=Array();
 				  if($this->tree[$z2]['name']=='include') {
-					for($k=0;$k<count($this->tree[$z2]['children']);$k++) {
+                    $tree_z2_count = count($this->tree[$z2]['children']);
+					for($k=0;$k<$tree_z2_count;++$k) {
 					  $z3 = $this->tree[$z2]['children'][$k];
 					  $name = trim($this->tree[$z3]['name']);
@@ -542,10 +556,12 @@
 				}
 			  } elseif($name=='templates') {
-				for($j=0;$j<count($this->tree[$z]['children']);$j++) {
+                $tree_z_count = count($this->tree[$z]['children']);
+				for($j=0;$j<$tree_z_count;++$j) {
 				  $z2 = $this->tree[$z]['children'][$j];
 				  // this is an activity $name = $this->tree[$z2]['name'];
 				  $aux=Array();
 				  if($this->tree[$z2]['name']=='template') {
-					for($k=0;$k<count($this->tree[$z2]['children']);$k++) {
+                    $tree_z2_count = count($this->tree[$z2]['children']);
+					for($k=0;$k<$tree_z2_count;++$k) {
 					  $z3 = $this->tree[$z2]['children'][$k];
 					  $name = trim($this->tree[$z3]['name']);
@@ -557,10 +573,12 @@
 				}
 			  } elseif($name=='resources') {
-				for($j=0;$j<count($this->tree[$z]['children']);$j++) {
+                $tree_z_count = count($this->tree[$z]['children']);
+				for($j=0;$j<$tree_z_count;++$j) {
 				  $z2 = $this->tree[$z]['children'][$j];
 				  // this is an activity $name = $this->tree[$z2]['name'];
 				  $aux=Array();
 				  if($this->tree[$z2]['name']=='resource') {
-					for($k=0;$k<count($this->tree[$z2]['children']);$k++) {
+                    $tree_z2_count = count($this->tree[$z2]['children']);
+					for($k=0;$k<$tree_z2_count;++$k) {
 					  $z3 = $this->tree[$z2]['children'][$k];
 					  $name = trim($this->tree[$z3]['name']);
@@ -572,20 +590,21 @@
 				}
 			  }
-			  elseif ($name == 'jobs')
-			  {
-          for ($j = 0; $j < count($this->tree[$z]['children']); $j++)
-          {
-            $job = array();
-				    $jobIndex = $this->tree[$z]['children'][$j];
-            if($this->tree[$jobIndex]['name'] == 'job')
-            {
-              for ($k = 0; $k < count($this->tree[$jobIndex]['children']); $k++)
-              {
-                $propertyIndex = $this->tree[$jobIndex]['children'][$k];
-                $job[trim($this->tree[$propertyIndex]['name'])] = trim($this->tree[$propertyIndex]['data']);
-              }
-            }
-            $jobs[] = $job;
-          }
+			  elseif ($name == 'jobs'){
+                  $tree_z_count = count($this->tree[$z]['children']);
+                  for ($j = 0; $j < $tree_z_count; ++$j)
+                  {
+                    $job = array();
+                            $jobIndex = $this->tree[$z]['children'][$j];
+                    if($this->tree[$jobIndex]['name'] == 'job')
+                    {
+                      $tree_jobIndex_count = count($this->tree[$jobIndex]['children']);
+                      for ($k = 0; $k < $tree_jobIndex_count; ++$k)
+                      {
+                        $propertyIndex = $this->tree[$jobIndex]['children'][$k];
+                        $job[trim($this->tree[$propertyIndex]['name'])] = trim($this->tree[$propertyIndex]['data']);
+                      }
+                    }
+                    $jobs[] = $job;
+                  }
 			  }
 			  else {
Index: /trunk/workflow/inc/natural/class.natural.php
===================================================================
--- /trunk/workflow/inc/natural/class.natural.php	(revision 3167)
+++ /trunk/workflow/inc/natural/class.natural.php	(revision 7655)
@@ -391,5 +391,5 @@
 	 {
 	 	//$rows = explode("%NAT_SEP%", wordwrap($this->dataParameter, $lineSize, "%NAT_SEP%"));
-	 	for ($i=0; $i < strlen($this->dataParameter)/$lineSize; $i++){
+	 	for ($i=0; $i < strlen($this->dataParameter)/$lineSize; ++$i){
 	 		$rows[] = substr($this->dataParameter, $lineSize*$i , $lineSize);
 	 	}
Index: /trunk/workflow/inc/natural/pos_string.php
===================================================================
--- /trunk/workflow/inc/natural/pos_string.php	(revision 795)
+++ /trunk/workflow/inc/natural/pos_string.php	(revision 7655)
@@ -122,5 +122,5 @@
 					}
 					$dataS .= $this->mountString($fieldDef['fields'], $value);
-					$iz++;
+					++$iz;
 				}
 			}
@@ -178,5 +178,5 @@
 						$data[$fieldName][$iz] = $this->mountResult($fieldDef['fields'], $string, $pt);
 					}
-					$iz++;
+					++$iz;
 				}
 			}
Index: /trunk/workflow/inc/class.utils.type.php
===================================================================
--- /trunk/workflow/inc/class.utils.type.php	(revision 795)
+++ /trunk/workflow/inc/class.utils.type.php	(revision 7655)
@@ -104,5 +104,5 @@
 					return TRUE;
 				}
-				$i++;
+				++$i;
 			}
 		}
Index: /trunk/workflow/inc/class.ui_adminprocesses.inc.php
===================================================================
--- /trunk/workflow/inc/class.ui_adminprocesses.inc.php	(revision 3167)
+++ /trunk/workflow/inc/class.ui_adminprocesses.inc.php	(revision 7655)
@@ -428,5 +428,5 @@
 
 					reset($config_type);
-					for($i = 0; ($current =& each($config_type) != null); $i++){
+					for($i = 0; ($current =& each($config_type) != null); ++$i){
 						$this->t->set_var(array(
 							'config_option_name'		=> $current['value'],
Index: /trunk/workflow/inc/log/Log.php
===================================================================
--- /trunk/workflow/inc/log/Log.php	(revision 3167)
+++ /trunk/workflow/inc/log/Log.php	(revision 7655)
@@ -481,5 +481,5 @@
         $class = isset($bt[$depth+1]['class']) ? $bt[$depth+1]['class'] : null;
         if ($class !== null && strcasecmp($class, 'Log_composite') == 0) {
-            $depth++;
+            ++$depth;
             $class = isset($bt[$depth + 1]) ? $bt[$depth + 1]['class'] : null;
         }
Index: /trunk/workflow/inc/log/examples/error_log.php
===================================================================
--- /trunk/workflow/inc/log/examples/error_log.php	(revision 795)
+++ /trunk/workflow/inc/log/examples/error_log.php	(revision 7655)
@@ -4,5 +4,5 @@
 
 $logger = &Log::singleton('error_log', PEAR_LOG_TYPE_SYSTEM, 'ident');
-for ($i = 0; $i < 10; $i++) {
+for ($i = 0; $i < 10; ++$i) {
     $logger->log("Log entry $i");
 }
Index: /trunk/workflow/inc/log/examples/null.php
===================================================================
--- /trunk/workflow/inc/log/examples/null.php	(revision 795)
+++ /trunk/workflow/inc/log/examples/null.php	(revision 7655)
@@ -4,5 +4,5 @@
 
 $logger = &Log::singleton('null');
-for ($i = 0; $i < 10; $i++) {
+for ($i = 0; $i < 10; ++$i) {
     $logger->log("Log entry $i");
 }
Index: /trunk/workflow/inc/log/examples/win.php
===================================================================
--- /trunk/workflow/inc/log/examples/win.php	(revision 795)
+++ /trunk/workflow/inc/log/examples/win.php	(revision 7655)
@@ -5,5 +5,5 @@
 $conf = array('title' => 'Sample Log Output');
 $logger = &Log::singleton('win', 'LogWindow', 'ident', $conf);
-for ($i = 0; $i < 10; $i++) {
+for ($i = 0; $i < 10; ++$i) {
     $logger->log("Log entry $i");
 }
Index: /trunk/workflow/inc/log/examples/file.php
===================================================================
--- /trunk/workflow/inc/log/examples/file.php	(revision 795)
+++ /trunk/workflow/inc/log/examples/file.php	(revision 7655)
@@ -5,5 +5,5 @@
 $conf = array('mode' => 0600, 'timeFormat' => '%X %x');
 $logger = &Log::singleton('file', '/tmp/out.log', 'ident', $conf);
-for ($i = 0; $i < 10; $i++) {
+for ($i = 0; $i < 10; ++$i) {
     $logger->log("Log entry $i");
 }
Index: /trunk/workflow/inc/log/examples/sql.php
===================================================================
--- /trunk/workflow/inc/log/examples/sql.php	(revision 795)
+++ /trunk/workflow/inc/log/examples/sql.php	(revision 7655)
@@ -5,5 +5,5 @@
 $conf = array('dsn' => 'pgsql://jon@localhost+unix/logs');
 $logger = &Log::singleton('sql', 'log_table', 'ident', $conf);
-for ($i = 0; $i < 10; $i++) {
+for ($i = 0; $i < 10; ++$i) {
     $logger->log("Log entry $i");
 }
Index: /trunk/workflow/inc/log/examples/syslog.php
===================================================================
--- /trunk/workflow/inc/log/examples/syslog.php	(revision 795)
+++ /trunk/workflow/inc/log/examples/syslog.php	(revision 7655)
@@ -4,5 +4,5 @@
 
 $logger = &Log::singleton('syslog', LOG_LOCAL0, 'ident');
-for ($i = 0; $i < 10; $i++) {
+for ($i = 0; $i < 10; ++$i) {
     $logger->log("Log entry $i");
 }
Index: /trunk/workflow/inc/log/examples/console.php
===================================================================
--- /trunk/workflow/inc/log/examples/console.php	(revision 795)
+++ /trunk/workflow/inc/log/examples/console.php	(revision 7655)
@@ -4,5 +4,5 @@
 
 $logger = &Log::singleton('console', '', 'ident');
-for ($i = 0; $i < 10; $i++) {
+for ($i = 0; $i < 10; ++$i) {
     $logger->log("Log entry $i");
 }
Index: /trunk/workflow/inc/log/examples/mail.php
===================================================================
--- /trunk/workflow/inc/log/examples/mail.php	(revision 795)
+++ /trunk/workflow/inc/log/examples/mail.php	(revision 7655)
@@ -5,5 +5,5 @@
 $conf = array('subject' => 'Important Log Events');
 $logger = &Log::singleton('mail', 'webmaster@example.com', 'ident', $conf);
-for ($i = 0; $i < 10; $i++) {
+for ($i = 0; $i < 10; ++$i) {
     $logger->log("Log entry $i");
 }
Index: /trunk/workflow/inc/log/examples/firebug.php
===================================================================
--- /trunk/workflow/inc/log/examples/firebug.php	(revision 795)
+++ /trunk/workflow/inc/log/examples/firebug.php	(revision 7655)
@@ -8,5 +8,5 @@
                           PEAR_LOG_DEBUG);
 
-for ($i = 0; $i < 10; $i++) {
+for ($i = 0; $i < 10; ++$i) {
     $logger->log("Log entry $i");
 }
Index: /trunk/workflow/inc/log/examples/display.php
===================================================================
--- /trunk/workflow/inc/log/examples/display.php	(revision 795)
+++ /trunk/workflow/inc/log/examples/display.php	(revision 7655)
@@ -6,5 +6,5 @@
               'error_append'  => '</tt></font>');
 $logger = &Log::singleton('display', '', '', $conf, PEAR_LOG_DEBUG);
-for ($i = 0; $i < 10; $i++) {
+for ($i = 0; $i < 10; ++$i) {
     $logger->log("Log entry $i");
 }
Index: /trunk/workflow/inc/class.utils.xml.php
===================================================================
--- /trunk/workflow/inc/class.utils.xml.php	(revision 795)
+++ /trunk/workflow/inc/class.utils.xml.php	(revision 7655)
@@ -203,5 +203,5 @@
 		static $attrLevel = -1;
 		static $fnstAttr = TRUE;
-		$attrLevel++;
+		++$attrLevel;
 		// built $this->track;
 		$this->track[] = $tag;
Index: /trunk/workflow/inc/engine/class.ajax_ldap.inc.php
===================================================================
--- /trunk/workflow/inc/engine/class.ajax_ldap.inc.php	(revision 3167)
+++ /trunk/workflow/inc/engine/class.ajax_ldap.inc.php	(revision 7655)
@@ -155,6 +155,7 @@
 
 			$members = array();
+            $security_equals_count = count($security_equals);
 
-			for ($idx=0; $idx<count($security_equals); $idx++)
+			for ($idx=0; $idx<$security_equals_count; ++$idx)
 			{
 				$name = $this->id2name((int)$security_equals[$idx]);
Index: /trunk/workflow/inc/engine/src/GUI/GUI.php
===================================================================
--- /trunk/workflow/inc/engine/src/GUI/GUI.php	(revision 3167)
+++ /trunk/workflow/inc/engine/src/GUI/GUI.php	(revision 7655)
@@ -645,5 +645,5 @@
     {
       $result->Move($offset);
-      for ($i = 0; $i < $realMaxRecords; $i++)
+      for ($i = 0; $i < $realMaxRecords; ++$i)
       {
         $res = $result->fetchRow();
Index: /trunk/workflow/inc/engine/src/common/Base.php
===================================================================
--- /trunk/workflow/inc/engine/src/common/Base.php	(revision 3167)
+++ /trunk/workflow/inc/engine/src/common/Base.php	(revision 7655)
@@ -331,5 +331,5 @@
 			$qe = explode("?", $query);
 			$query = '';
-			for ($i = 0; $i < sizeof($qe) - 1; $i++) {
+			for ($i = 0; $i < sizeof($qe) - 1; ++$i) {
 				$query .= $qe[$i] . ":" . $i;
 			}
Index: /trunk/workflow/inc/engine/src/API/Instance.php
===================================================================
--- /trunk/workflow/inc/engine/src/API/Instance.php	(revision 3167)
+++ /trunk/workflow/inc/engine/src/API/Instance.php	(revision 7655)
@@ -906,5 +906,6 @@
     if(empty($theuser)) $theuser='*';
     $found = false;
-    for($i=0;$i<count($this->activities);$i++) {
+    $activities_count = count($this->activities);
+    for($i=0;$i<$activities_count;++$i) {
       if($this->activities[$i]['wf_activity_id']==$activityId) {
         // here we are in the good activity
@@ -944,5 +945,6 @@
    */
   function getActivityUser($activityId) {
-    for($i=0;$i<count($this->activities);$i++) {
+    $activities_count = count($this->activities);
+    for($i=0;$i<$activities_count;++$i) {
       if($this->activities[$i]['wf_activity_id']==$activityId) {
         return $this->activities[$i]['wf_user'];
@@ -967,5 +969,6 @@
       return false;
     }
-    for($i=0;$i<count($this->activities);$i++) 
+    $activities_count = count($this->activities);
+    for($i=0;$i<$activities_count;++$i)
     {
       if($this->activities[$i]['wf_activity_id']==$activityId) 
@@ -990,5 +993,6 @@
    */
   function getActivityStatus($activityId) {
-    for($i=0;$i<count($this->activities);$i++) {
+    $activities_count = count($this->activities);
+    for($i=0;$i<$activities_count;++$i) {
       if($this->activities[$i]['wf_activity_id']==$activityId) {
         return $this->activities[$i]['wf_status'];
@@ -1008,5 +1012,6 @@
   function setActivityStarted($activityId) {
     $now = date("U");
-    for($i=0;$i<count($this->activities);$i++) {
+    $activities_count = count($this->activities);
+    for($i=0;$i<$activities_count;++$i) {
       if($this->activities[$i]['wf_activity_id']==$activityId) {
         $this->activities[$i]['wf_started']=$now;
@@ -1028,5 +1033,6 @@
    */
   function getActivityStarted($activityId) {
-    for($i=0;$i<count($this->activities);$i++) {
+    $activities_count = count($this->activities);
+    for($i=0;$i<$activities_count;++$i) {
       if($this->activities[$i]['wf_activity_id']==$activityId) {
         return $this->activities[$i]['wf_started'];
@@ -1047,5 +1053,6 @@
   function _get_instance_activity($activityId) 
   {
-    for($i=0;$i<count($this->activities);$i++) {
+    $activities_count = count($this->activities);
+    for($i=0;$i<$activities_count;$i++) {
       if($this->activities[$i]['wf_activity_id']==$activityId) {
         return $this->activities[$i];
@@ -1295,5 +1302,5 @@
     else 
     {
-        $max++;
+        ++$max;
     }
     if($activity_type=='start')
@@ -1378,5 +1385,5 @@
         $this->unsetNextUser($cand);
         $this->sync();
-        $i++;
+        ++$i;
       }
       $this->unsetNextUser('*' . $activityId);
Index: /trunk/workflow/inc/engine/src/ProcessManager/ProcessManager.php
===================================================================
--- /trunk/workflow/inc/engine/src/ProcessManager/ProcessManager.php	(revision 5921)
+++ /trunk/workflow/inc/engine/src/ProcessManager/ProcessManager.php	(revision 7655)
@@ -299,5 +299,6 @@
 		$activities=Array();
 		$transitions=Array();
-		for($i=0;$i<count($this->tree[1]['children']);$i++) {
+        $tree_count = count($this->tree[1]['children']);
+		for($i=0;$i<$tree_count;++$i) {
 			// Process attributes
 			$z=$this->tree[1]['children'][$i];
@@ -306,10 +307,12 @@
 			//config values
 			if ($name=='configs') {
-				for($j=0;$j<count($this->tree[$z]['children']);$j++) {
+                $tree_z_count = count($this->tree[$z]['children']);
+				for($j=0;$j<$tree_z_count;++$j) {
 					$z2 = $this->tree[$z]['children'][$j];
 					// this is a config $name = $this->tree[$z2]['name'];
 					$aux = Array();
 					if($this->tree[$z2]['name']=='config') {
-						for($k=0;$k<count($this->tree[$z2]['children']);$k++) {
+                        $tree_z2_count = count($this->tree[$z2]['children']);
+						for($k=0;$k<$tree_z2_count;++$k) {
 							$z3 = $this->tree[$z2]['children'][$k];
 							$name = trim($this->tree[$z3]['name']);
@@ -323,10 +326,12 @@
 			//activities
 			elseif($name=='activities') {
-				for($j=0;$j<count($this->tree[$z]['children']);$j++) {
+                $tree_z_count = count($this->tree[$z]['children']);
+				for($j=0;$j<$tree_z_count;++$j) {
 					$z2 = $this->tree[$z]['children'][$j];
 					// this is an activity $name = $this->tree[$z2]['name'];
 					$aux = Array();
 					if($this->tree[$z2]['name']=='activity') {
-						for($k=0;$k<count($this->tree[$z2]['children']);$k++) {
+                        $tree_z2_count = count($this->tree[$z2]['children']);
+						for($k=0;$k<$tree_z2_count;++$k) {
 							$z3 = $this->curre[$z2]['children'][$k];
 							$name = trim($this->tree[$z3]['name']);
@@ -334,5 +339,6 @@
 							if($name=='roles') {
 								$roles=Array();
-								for($l=0;$l<count($this->tree[$z3]['children']);$l++) {
+                                $tree_z3_count = count($this->tree[$z3]['children']);
+								for($l=0;$l<$tree_z3_count;++$l) {
 									$z4 = $this->tree[$z3]['children'][$l];
 									$name = trim($this->tree[$z4]['name']);
@@ -354,5 +360,6 @@
 							{
 								$agents=Array();
-								for($l=0;$l<count($this->tree[$z3]['children']);$l++)
+                                $tree_z3_count = count($this->tree[$z3]['children']);
+								for($l=0;$l<$tree_z3_count;$l++)
 								{
 									$z4 = $this->tree[$z3]['children'][$l];
@@ -362,5 +369,6 @@
 									{
 										$agent = array();
-										for($m=0;$m<count($this->tree[$z4]['children']);$m++)
+                                        $tree_z4_count = count($this->tree[$z4]['children']);
+										for($m=0;$m<$tree_z4_count;++$m)
 										{
 											$z5 = $this->tree[$z4]['children'][$m];
@@ -375,5 +383,6 @@
 											elseif ($name=='agent_datas')
 											{
-												for($n=0;$n<count($this->tree[$z5]['children']);$n++)
+                                                $tree_z5_count = count($this->tree[$z5]['children']);
+												for($n=0;$n<$tree_z5_count;++$n)
 												{
 													$z6 = $this->tree[$z5]['children'][$n];
@@ -383,5 +392,6 @@
 													if ($name=='agent_data')
 													{
-														for($o=0;$o<count($this->tree[$z6]['children']);$o++)
+                                                        $tree_z6_count = count($this->tree[$z6]['children']);
+														for($o=0;$o<$tree_z6_count;++$o)
 														{
 															$z7 = $this->tree[$z6]['children'][$o];
@@ -419,10 +429,12 @@
 				}
 			} elseif($name=='transitions') {
-				for($j=0;$j<count($this->tree[$z]['children']);$j++) {
+                $tree_z_count = count($this->tree[$z]['children']);
+				for($j=0;$j<$tree_z_count;++$j) {
 					$z2 = $this->tree[$z]['children'][$j];
 					// this is an activity $name = $this->tree[$z2]['name'];
 					$aux=Array();
 					if($this->tree[$z2]['name']=='transition') {
-						for($k=0;$k<count($this->tree[$z2]['children']);$k++) {
+                        $tree_z2_count = count($this->tree[$z2]['children']);
+						for($k=0;$k<$tree_z2_count;++$k) {
 							$z3 = $this->tree[$z2]['children'][$k];
 							$name = trim($this->tree[$z3]['name']);
@@ -573,5 +585,5 @@
 							if ($key)
 							{
-								$countfields++;
+								++$countfields;
 								$query .= "$key = ? ,";
 								$bindvars[] = $value;
@@ -729,5 +741,5 @@
 					if ($key)
 					{
-						$countfields++;
+						++$countfields;
 						$query .= "$key = ? ,";
 						$bindvars[] = $value;
@@ -1084,5 +1096,6 @@
 		} else {
 			$parts[0]++;
-			for ($i = 1; $i < count($parts); $i++) {
+            $parts_count = count($parts);
+			for ($i = 1; $i < $parts_count; ++$i) {
 				$parts[$i] = 0;
 			}
Index: /trunk/workflow/inc/engine/src/ProcessManager/ActivityManager.php
===================================================================
--- /trunk/workflow/inc/engine/src/ProcessManager/ActivityManager.php	(revision 3167)
+++ /trunk/workflow/inc/engine/src/ProcessManager/ActivityManager.php	(revision 7655)
@@ -539,5 +539,6 @@
     
     while($this->_list_has_unvisited_nodes($nodes) && !$this->_node_in_list($start_node,$nodes)) {
-      for($i=0;$i<count($nodes);$i++) {
+      $nodes_count = count($nodes);
+      for($i=0;$i<$nodes_count;++$i) {
         $node=&$nodes[$i];
         if(!$node['visited']) {
Index: /trunk/workflow/inc/hook_home.inc.php
===================================================================
--- /trunk/workflow/inc/hook_home.inc.php	(revision 3167)
+++ /trunk/workflow/inc/hook_home.inc.php	(revision 7655)
@@ -34,5 +34,5 @@
 	}
 	$extra_data .=  "<td align=center style='valign:top;width:10em;padding:2px'><a target='_blank' href='".$external["wf_ext_link"]."' nowrap><img width='32px' height='32px' align='center' src='".$external["image"]."'/><br>".$external["name"]."</a></td>";
-	$next_br++;
+	++$next_br;
 	if($next_br == 3){
 		$extra_data .= "</tr>";
Index: /trunk/workflow/inc/class.JobScheduler.inc.php
===================================================================
--- /trunk/workflow/inc/class.JobScheduler.inc.php	(revision 4728)
+++ /trunk/workflow/inc/class.JobScheduler.inc.php	(revision 7655)
@@ -111,5 +111,5 @@
 		{
 			$active = false;
-			for ($i = 0; ($i < $numerOfJobs) && !$active; $i++)
+			for ($i = 0; ($i < $numerOfJobs) && !$active; ++$i)
 				$active = $active || $runningJobs[$i]->isActive();
 			usleep($timeStep);
@@ -120,5 +120,5 @@
 		while ($active);
 
-		for ($i = 0; $i < $numerOfJobs; $i++)
+		for ($i = 0; $i < $numerOfJobs; ++$i)
 		{
 			if (!$runningJobs[$i]->isActive())
Index: /trunk/workflow/inc/class.so_orgchart.inc.php
===================================================================
--- /trunk/workflow/inc/class.so_orgchart.inc.php	(revision 7495)
+++ /trunk/workflow/inc/class.so_orgchart.inc.php	(revision 7655)
@@ -152,6 +152,6 @@
 
 		$output = $result->GetArray(-1);
-		for ($i = 0; $i < count($output); $i++)
-			for ($j = 0; $j < $result->_numOfFields; $j++)
+		for ($i = 0; $i < count($output); ++$i)
+			for ($j = 0; $j < $result->_numOfFields; ++$j)
 				unset($output[$i][$j]);
 
@@ -308,6 +308,6 @@
 
 		$output = $result->GetArray(-1);
-		for ($i = 0; $i < count($output); $i++)
-			for ($j = 0; $j < $result->_numOfFields; $j++)
+		for ($i = 0; $i < count($output); ++$i)
+			for ($j = 0; $j < $result->_numOfFields; ++$j)
 				unset($output[$i][$j]);
 
@@ -385,6 +385,6 @@
 
 		$output = $result->GetArray(-1);
-		for ($i = 0; $i < count($output); $i++)
-			for ($j = 0; $j < $result->_numOfFields; $j++)
+		for ($i = 0; $i < count($output); ++$i)
+			for ($j = 0; $j < $result->_numOfFields; ++$j)
 				unset($output[$i][$j]);
 
@@ -462,6 +462,6 @@
 
 		$output = $result->GetArray(-1);
-		for ($i = 0; $i < count($output); $i++)
-			for ($j = 0; $j < $result->_numOfFields; $j++)
+		for ($i = 0; $i < count($output); ++$i)
+			for ($j = 0; $j < $result->_numOfFields; ++$j)
 				unset($output[$i][$j]);
 
@@ -541,6 +541,6 @@
 
 		$output = $result->GetArray(-1);
-		for ($i = 0; $i < count($output); $i++)
-			for ($j = 0; $j < $result->_numOfFields; $j++)
+		for ($i = 0; $i < count($output); ++$i)
+			for ($j = 0; $j < $result->_numOfFields; ++$j)
 				unset($output[$i][$j]);
 
@@ -623,6 +623,6 @@
 
 		$output = $result->GetArray(-1);
-		for ($i = 0; $i < count($output); $i++){
-			for ($j = 0; $j < $result->_numOfFields; $j++)
+		for ($i = 0; $i < count($output); ++$i){
+			for ($j = 0; $j < $result->_numOfFields; ++$j)
 				unset($output[$i][$j]);
 			$output[$i]['centro_custo_id'] = empty($output[$i]['centro_custo_id']) ? 'NULL' : $output[$i]['centro_custo_id'];
@@ -714,5 +714,5 @@
 		$cachedLDAP = Factory::newInstance('CachedLDAP');
 		$cachedLDAP->setOperationMode($cachedLDAP->OPERATION_MODE_LDAP_DATABASE);
-		for ($i = 0; $i < count($output); $i++)
+		for ($i = 0; $i < count($output); ++$i)
 		{
 			$output[$i]['funcionario_id_desc'] = '';
@@ -771,5 +771,5 @@
 			die(serialize("O sistema de busca não pode ser utilizado nesta organização."));
 		$entries = ldap_get_entries($ldap, $list);
-		for ($i=0; $i < $entries['count']; $i++)
+		for ($i=0; $i < $entries['count']; ++$i)
 			$unifiedResult[$entries[$i]['uidnumber'][0]] = array('name' => $entries[$i]['cn'][0], 'uid' => $entries[$i]['uid'][0], 'removed' => false);
 
@@ -790,7 +790,7 @@
 
 		$output = $result->GetArray(-1);
-		for ($i = 0; $i < count($output); $i++)
-		{
-			for ($j = 0; $j < $result->_numOfFields; $j++)
+		for ($i = 0; $i < count($output); ++$i)
+		{
+			for ($j = 0; $j < $result->_numOfFields; ++$j)
 				unset($output[$i][$j]);
 			$output[$i]['funcionario_id_desc'] = $unifiedResult[$output[$i]['funcionario_id']]['name'];
@@ -964,5 +964,5 @@
 		while ($row = $result->fetchRow(DB_FETCHMODE_ASSOC))
 		{
-			for ($j = 0; $j < $result->_numOfFields; $j++)
+			for ($j = 0; $j < $result->_numOfFields; ++$j)
 				unset($row[$j]);
 			$row['substituto_funcionario_id_desc'] = ($row['substituto_funcionario_id'] != '') ? $ldap->getName($row['substituto_funcionario_id']) : '';
@@ -1003,7 +1003,7 @@
 
 		$output = $result->GetArray(-1);
-		for ($i = 0; $i < count($output); $i++)
-		{
-			for ($j = 0; $j < $result->_numOfFields; $j++)
+		for ($i = 0; $i < count($output); ++$i)
+		{
+			for ($j = 0; $j < $result->_numOfFields; ++$j)
 				unset($output[$i][$j]);
 
@@ -1384,6 +1384,6 @@
 
 		$output = $result->GetArray(-1);
-		for ($i = 0; $i < count($output); $i++)
-			for ($j = 0; $j < $result->_numOfFields; $j++)
+		for ($i = 0; $i < count($output); ++$i)
+			for ($j = 0; $j < $result->_numOfFields; ++$j)
 				unset($output[$i][$j]);
 
@@ -1586,6 +1586,6 @@
 
 		$output = $result->GetArray(-1);
-		for ($i = 0; $i < count($output); $i++) {
-			for ($j = 0; $j < $result->_numOfFields; $j++)
+		for ($i = 0; $i < count($output); ++$i) {
+			for ($j = 0; $j < $result->_numOfFields; ++$j)
 				unset($output[$i][$j]);
 
Index: /trunk/workflow/inc/class.so_adminaccess.inc.php
===================================================================
--- /trunk/workflow/inc/class.so_adminaccess.inc.php	(revision 7495)
+++ /trunk/workflow/inc/class.so_adminaccess.inc.php	(revision 7655)
@@ -226,5 +226,5 @@
 		$tmpBin = decbin($number);
 		$tmpSize = strlen($tmpBin);
-		for ($i = 0; $i < $tmpSize; $i++)
+		for ($i = 0; $i < $tmpSize; ++$i)
 			$levelList[$tmpSize - $i - 1] = ($tmpBin[$i] == '0') ? false : true;
 
@@ -244,5 +244,5 @@
 
 		$text = "";
-		for ($i = 0; $i < $this->numberOfPermissions; $i++)
+		for ($i = 0; $i < $this->numberOfPermissions; ++$i)
 			if (isset($list[$i]))
 				$text = (($list[$i] == true) ? '1' : '0') . $text;
Index: /trunk/workflow/inc/class.utils.php
===================================================================
--- /trunk/workflow/inc/class.utils.php	(revision 5934)
+++ /trunk/workflow/inc/class.utils.php	(revision 7655)
@@ -143,5 +143,5 @@
 				if ($i < ($size-1) && !is_array($base))
 					return $fallback;
-				$i++;
+				++$i;
 			}
 			return $base;
Index: /trunk/workflow/inc/class.external_bridge.inc.php
===================================================================
--- /trunk/workflow/inc/class.external_bridge.inc.php	(revision 3167)
+++ /trunk/workflow/inc/class.external_bridge.inc.php	(revision 7655)
@@ -150,5 +150,5 @@
 		/* encode the form before submission */
 		$encodedForm = '';
-		for ($i = 0; $i < strlen($generatedForm); $i++)
+		for ($i = 0; $i < strlen($generatedForm); ++$i)
 			$encodedForm .= '%' . bin2hex($generatedForm[$i]);
 		$encodedForm = '<script type="text/javascript">eval(unescape(\'' . $encodedForm . '\'))</script>';
Index: /trunk/workflow/inc/class.utils.security.php
===================================================================
--- /trunk/workflow/inc/class.utils.security.php	(revision 5928)
+++ /trunk/workflow/inc/class.utils.security.php	(revision 7655)
@@ -68,6 +68,6 @@
 	function SecurityUtils($tagsArray = array(), $attrArray = array(), $tagsMethod = 0, $attrMethod = 0, $xssAuto = 1) {
 		// make sure user defined arrays are in lowercase
-		for ($i = 0; $i < count($tagsArray); $i++) $tagsArray[$i] = strtolower($tagsArray[$i]);
-		for ($i = 0; $i < count($attrArray); $i++) $attrArray[$i] = strtolower($attrArray[$i]);
+		for ($i = 0; $i < count($tagsArray); ++$i) $tagsArray[$i] = strtolower($tagsArray[$i]);
+		for ($i = 0; $i < count($attrArray); ++$i) $attrArray[$i] = strtolower($attrArray[$i]);
 		// assign to member vars
 		$this->tagsArray = (array) $tagsArray;
@@ -110,5 +110,5 @@
 		while($source != $this->filterTags($source)) {
 			$source = $this->filterTags($source);
-			$loopCounter++;
+			++$loopCounter;
 		}
 		return $source;
@@ -135,5 +135,5 @@
 		$newSet = array();
 		// process attributes
-		for ($i = 0; $i <count($attrSet); $i++) {
+		for ($i = 0; $i <count($attrSet); ++$i) {
 			// skip blank spaces in tag
 			if (!$attrSet[$i]) continue;
Index: /trunk/workflow/inc/class.BrowserInfo.inc.php
===================================================================
--- /trunk/workflow/inc/class.BrowserInfo.inc.php	(revision 5934)
+++ /trunk/workflow/inc/class.BrowserInfo.inc.php	(revision 7655)
@@ -304,5 +304,5 @@
 		$required = explode('.', $version);
 		$current = explode('.', $this->getBrowserVersion());
-		for ($i = 0; $i < count($required); $i++)
+		for ($i = 0; $i < count($required); ++$i)
 		{
 			$subRequired = (int) $required[$i];
Index: /trunk/workflow/inc/class.so_userinterface.inc.php
===================================================================
--- /trunk/workflow/inc/class.so_userinterface.inc.php	(revision 6535)
+++ /trunk/workflow/inc/class.so_userinterface.inc.php	(revision 7655)
@@ -63,5 +63,5 @@
 		$octets = explode('.', $ip);
 		$output = array();
-		for ($i = 0; $i < 4; $i++)
+		for ($i = 0; $i < 4; ++$i)
 		{
 			if ($bits >= 8)
@@ -123,10 +123,10 @@
 
 			/* keep only associative elments and check if the user can access an intranet application */
-			for ($i = 0; $i < count($preOutput); $i++)
+			for ($i = 0; $i < count($preOutput); ++$i)
 			{
 				if (($preOutput[$i]['intranet_only'] == '1') && (!$showIntranetApplications))
 					continue;
 
-				for ($j = 0; $j < $result->_numOfFields; $j++)
+				for ($j = 0; $j < $result->_numOfFields; ++$j)
 					unset($preOutput[$i][$j]);
 				$output[] = $preOutput[$i];
@@ -152,5 +152,5 @@
 			return false;
 
-		for ($i = 0; $i < $result->_numOfFields; $i++)
+		for ($i = 0; $i < $result->_numOfFields; ++$i)
 			unset($output[$i]);
 
@@ -169,6 +169,6 @@
 
 		$output = $result->GetArray(-1);
-		for ($i = 0; $i < count($output); $i++)
-			for ($j = 0; $j < $result->_numOfFields; $j++)
+		for ($i = 0; $i < count($output); ++$i)
+			for ($j = 0; $j < $result->_numOfFields; ++$j)
 				unset($output[$i][$j]);
 
@@ -196,7 +196,7 @@
 
 		$output = $result->GetArray(-1);
-		for ($i = 0; $i < count($output); $i++)
-		{
-			for ($j = 0; $j < $result->_numOfFields; $j++)
+		for ($i = 0; $i < count($output); ++$i)
+		{
+			for ($j = 0; $j < $result->_numOfFields; ++$j)
 				unset($output[$i][$j]);
 
@@ -218,6 +218,6 @@
 
 		$output = $result->GetArray(-1);
-		for ($i = 0; $i < count($output); $i++)
-			for ($j = 0; $j < $result->_numOfFields; $j++)
+		for ($i = 0; $i < count($output); ++$i)
+			for ($j = 0; $j < $result->_numOfFields; ++$j)
 				unset($output[$i][$j]);
 
@@ -296,8 +296,8 @@
 		$cachedLDAP->setOperationMode($cachedLDAP->OPERATION_MODE_NORMAL);
 		$categoriesCount = array();
-		for ($i = 0; $i < count($employees); $i++)
+		for ($i = 0; $i < count($employees); ++$i)
 		{
 			/* remove numeric fields */
-			for ($j = 0; $j < $result->_numOfFields; $j++)
+			for ($j = 0; $j < $result->_numOfFields; ++$j)
 				unset($employees[$i][$j]);
 			if (!$this->authorized || !isset($employees[$i]['funcao']))
@@ -396,8 +396,8 @@
 		$cachedLDAP = Factory::newInstance('CachedLDAP');
 		$cachedLDAP->setOperationMode($cachedLDAP->OPERATION_MODE_NORMAL);
-		for ($i = 0; $i < count($employees); $i++)
+		for ($i = 0; $i < count($employees); ++$i)
 		{
 			/* remove numeric fields */
-			for ($j = 0; $j < $result->_numOfFields; $j++)
+			for ($j = 0; $j < $result->_numOfFields; ++$j)
 				unset($employees[$i][$j]);
 
@@ -434,5 +434,5 @@
 
 		if (count($searchTermExploded) > 0){
-			for ($i=1; $i<count($searchTermExploded); $i++) {
+			for ($i=1; $i<count($searchTermExploded); ++$i) {
 				if (strlen($searchTermExploded[$i]) > 2) {
 					$fullSearch = true;
@@ -454,5 +454,5 @@
 		$ldapResult = array();
 
-		for ($i = 0; $i < $entries['count']; $i++)
+		for ($i = 0; $i < $entries['count']; ++$i)
 			$ldapResult[$entries[$i]['uidnumber'][0]] = array('cn' => $entries[$i]['cn'][0], 'telephoneNumber' => $entries[$i]['telephonenumber'][0]);
 
@@ -481,5 +481,5 @@
 
 		/* filling return array with employee's information */
-		for ($i = 0; $i < count($result); $i++) {
+		for ($i = 0; $i < count($result); ++$i) {
 			$employees []= array(
 					'area'	 			=> $result[$i]['area'],
@@ -536,5 +536,5 @@
 		/* creating the ldap query */
 		$ldap_query = '(&(|';
-		for ($i = 0; $i < count($result); $i++) {
+		for ($i = 0; $i < count($result); ++$i) {
 			$ldap_query .= '(uidNumber=' . $result[$i]['funcionario_id'] . ')';
 		}
@@ -547,5 +547,5 @@
 		/* parsing result */
 		$ldapResult = array();
-		for ($i = 0; $i < $entries['count']; $i++)
+		for ($i = 0; $i < $entries['count']; ++$i)
 			$ldapResult[$entries[$i]['uidnumber'][0]] = array('cn' => $entries[$i]['cn'][0], 'telephoneNumber' => $entries[$i]['telephonenumber'][0]);
 
@@ -556,5 +556,5 @@
 		/* filling return array with employee's information */
 		$employees = array();
-		for ($i = 0; $i < count($result); $i++) {
+		for ($i = 0; $i < count($result); ++$i) {
 
 			$employee = array();
@@ -615,5 +615,5 @@
 		$ldapResult = array();
 
-		for ($i = 0; $i < $entries['count']; $i++)
+		for ($i = 0; $i < $entries['count']; ++$i)
 			$ldapResult[$entries[$i]['uidnumber'][0]] = array('cn' => $entries[$i]['cn'][0], 'telephoneNumber' => $entries[$i]['telephonenumber'][0]);
 
@@ -642,5 +642,5 @@
 
 		/* filling return array with employee's information */
-		for ($i = 0; $i < count($result); $i++) {
+		for ($i = 0; $i < count($result); ++$i) {
 			$employees []= array(
 					'area'	 			=> $result[$i]['area'],
@@ -707,6 +707,6 @@
 
 		$output = $result->GetArray(-1);
-		for ($i = 0; $i < count($output); $i++)
-			for ($j = 0; $j < $result->_numOfFields; $j++)
+		for ($i = 0; $i < count($output); ++$i)
+			for ($j = 0; $j < $result->_numOfFields; ++$j)
 				unset($output[$i][$j]);
 
@@ -728,7 +728,7 @@
 
 		$output = $result->GetArray(-1);
-		for ( $i = 0; $i < count($output); $i++ )
-		{
-			for ($j = 0; $j < $result->_numOfFields; $j++)
+		for ( $i = 0; $i < count($output); ++$i )
+		{
+			for ($j = 0; $j < $result->_numOfFields; ++$j)
 				unset($output[$i][$j]);
 
@@ -759,6 +759,6 @@
 
 		$output = $result->GetArray( -1 );
-		for ( $i = 0; $i < count($output); $i++ )
-			for ($j = 0; $j < $result->_numOfFields; $j++)
+		for ( $i = 0; $i < count($output); ++$i )
+			for ($j = 0; $j < $result->_numOfFields; ++$j)
 				unset($output[$i][$j]);
 
@@ -795,8 +795,8 @@
 
 		$categoriesCount = array( );
-		for ( $i = 0; $i < count( $employees ); $i++ )
+		for ( $i = 0; $i < count( $employees ); ++$i )
 		{
 			// remove numeric fields
-			for ( $j = 0; $j < $result -> _numOfFields; $j++ )
+			for ( $j = 0; $j < $result -> _numOfFields; ++$j )
 				unset( $employees[ $i ][ $j ] );
 
@@ -867,8 +867,8 @@
 
 		$categoriesCount = array( );
-		for ( $i = 0; $i < count( $employees ); $i++ )
+		for ( $i = 0; $i < count( $employees ); ++$i )
 		{
 			// remove numeric fields
-			for ( $j = 0; $j < $result -> _numOfFields; $j++ )
+			for ( $j = 0; $j < $result -> _numOfFields; ++$j )
 				unset( $employees[ $i ][ $j ] );
 
@@ -893,5 +893,5 @@
 
 		// count the number of employees in each category
-		for ( $i = 0; $i < count( $employees ); $i++ )
+		for ( $i = 0; $i < count( $employees ); ++$i )
 		{
 			$categoryID = $employees[ $i ][ 'funcionario_categoria_id' ];
Index: /trunk/workflow/inc/report/downloads.php
===================================================================
--- /trunk/workflow/inc/report/downloads.php	(revision 5307)
+++ /trunk/workflow/inc/report/downloads.php	(revision 7655)
@@ -16,5 +16,5 @@
 
 $fileDown = '';
-for($i = 1; $i < (count($pathPartes)); $i++){
+for($i = 1; $i < (count($pathPartes)); ++$i){
    $fileDown = ($fileDown != '') ? $fileDown . '/' : $fileDown ;
    $fileDown .= $pathPartes[$i];
Index: /trunk/workflow/inc/report/includes/classes/Listagem.class.php
===================================================================
--- /trunk/workflow/inc/report/includes/classes/Listagem.class.php	(revision 6413)
+++ /trunk/workflow/inc/report/includes/classes/Listagem.class.php	(revision 7655)
@@ -1388,5 +1388,5 @@
 
 
-            for ($qtd_reg = 1;$qtd_reg <= $qtd_registros; $qtd_reg++) {
+            for ($qtd_reg = 1;$qtd_reg <= $qtd_registros; ++$qtd_reg) {
 
                 if ($this->_isarray) {
@@ -1458,5 +1458,5 @@
                                                  if ($cntcheckspan) {
                                                  	if ($this->_temarquivocsv) {
-	                                                 	for ($j=1; $j<= $cntcheckspan; $j++) {
+	                                                 	for ($j=1; $j<= $cntcheckspan; ++$j) {
 	                                                 		if ($j == $cntcheckspan) {
 	                                                 			$this->_txtarquivo .= $txtarquivotexto;
@@ -1729,5 +1729,5 @@
 
                          	if ($this->_temarquivocsv) {
-                             	for ($j=1; $j<= $cntcheckspan; $j++) {
+                             	for ($j=1; $j<= $cntcheckspan; ++$j) {
                              		if ($j == $cntcheckspan) {
                              			$this->_txtarquivo .= $txtarquivotexto;
@@ -1803,5 +1803,5 @@
                          if ($cntcheckspan) {
                             if ($this->_temarquivocsv) {
-                                for ($j=1; $j<= $cntcheckspan; $j++) {
+                                for ($j=1; $j<= $cntcheckspan; ++$j) {
                                     if ($j == $cntcheckspan) {
                                         $this->_txtarquivo .= $txtarquivotexto;
@@ -2158,5 +2158,5 @@
     public function autoAdicionarColunas() {
     	$i = pg_num_fields($this->dados);
-        for ($j = 0; $j < $i; $j++) {
+        for ($j = 0; $j < $i; ++$j) {
             $fieldname = pg_field_name($this->dados, $j);
             $tipo = pg_field_type($this->dados, $j);
Index: /trunk/workflow/inc/report/includes/classes/SqlParser.class.php
===================================================================
--- /trunk/workflow/inc/report/includes/classes/SqlParser.class.php	(revision 5307)
+++ /trunk/workflow/inc/report/includes/classes/SqlParser.class.php	(revision 7655)
@@ -118,5 +118,5 @@
     protected function getQuantidadeIfs($texto) {
         $qtd = 0;
-        for ($i = 0;  $i <= strlen($texto); $i++) {
+        for ($i = 0;  $i <= strlen($texto); ++$i) {
             if (strtolower(substr($texto,$i,3)) == "#if") {
                 $qtd = $qtd + 1;
@@ -128,5 +128,5 @@
     protected function numerarCondicao($texto,$num) {
         $qtd = 0;
-        for ($i = 0;  $i <= strlen($texto); $i++) {
+        for ($i = 0;  $i <= strlen($texto); ++$i) {
             if (strtolower(substr($texto,$i,3)) == "#if") {
                 $qtd = $qtd + 1;
@@ -134,5 +134,5 @@
                 $condicoesfechadas = 0;
                 if ($qtd == $num) {
-                    for ($j = $i+1;  $j <= strlen($texto); $j++) {
+                    for ($j = $i+1;  $j <= strlen($texto); ++$j) {
                         
                         if ((strtolower(substr($texto,$j,5)) == "#/if#")) {
Index: /trunk/workflow/inc/report/includes/classes/FormularioUtil.class.php
===================================================================
--- /trunk/workflow/inc/report/includes/classes/FormularioUtil.class.php	(revision 5307)
+++ /trunk/workflow/inc/report/includes/classes/FormularioUtil.class.php	(revision 7655)
@@ -88,5 +88,5 @@
 		$resu = pg_query($conn,$sql);
 		if (pg_num_rows($resu)>0) {
-	        for ($x=0;$x<pg_num_rows($resu);$x++)  {
+	        for ($x=0;$x<pg_num_rows($resu);++$x)  {
 	            $arrSelectValues[pg_fetch_result($resu,$x,$id)] = pg_fetch_result($resu,$x,$value);
 	        }
@@ -111,5 +111,5 @@
 		$resu = pg_query($conn,$sql);	
 		if (pg_num_rows($resu)>0) {
-	        for ($x=0;$x<pg_num_rows($resu);$x++)  {
+	        for ($x=0;$x<pg_num_rows($resu);++$x)  {
 	            $arrSelectChecks[] = array(pg_fetch_result($resu,$x,$oid), pg_fetch_result($resu,$x,$descricao), false);
 	        }
@@ -122,5 +122,5 @@
 		$resu = pg_query($conn,$sql);	
 		if (pg_num_rows($resu)>0) {
-	        for ($x=0;$x<pg_num_rows($resu);$x++)  {
+	        for ($x=0;$x<pg_num_rows($resu);++$x)  {
 	            $arrSelectChecks[] = array(pg_fetch_result($resu,$x,$oid), pg_fetch_result($resu,$x,$descricao), false);
 	        }
Index: /trunk/workflow/inc/report/xajax/xajaxResponse.inc.php
===================================================================
--- /trunk/workflow/inc/report/xajax/xajaxResponse.inc.php	(revision 5307)
+++ /trunk/workflow/inc/report/xajax/xajaxResponse.inc.php	(revision 7655)
@@ -257,5 +257,5 @@
 		if ($queryStart !== FALSE)
 		{
-			$queryStart++;
+			++$queryStart;
 			$queryEnd = strpos($sURL, '#', $queryStart);
 			if ($queryEnd === FALSE)
Index: /trunk/workflow/inc/report/xajax/xajax.inc.php
===================================================================
--- /trunk/workflow/inc/report/xajax/xajax.inc.php	(revision 5307)
+++ /trunk/workflow/inc/report/xajax/xajax.inc.php	(revision 7655)
@@ -608,5 +608,5 @@
 		if ($bFoundFunction)
 		{
-			for ($i = 0; $i < sizeof($aArgs); $i++)
+			for ($i = 0; $i < sizeof($aArgs); ++$i)
 			{
 				// If magic quotes is on, then we need to strip the slashes from the args
Index: /trunk/workflow/inc/report/xajax/xajaxCompress.php
===================================================================
--- /trunk/workflow/inc/report/xajax/xajaxCompress.php	(revision 5307)
+++ /trunk/workflow/inc/report/xajax/xajaxCompress.php	(revision 7655)
@@ -58,6 +58,7 @@
 	$escaped = false;
 	$quoteChar = "";
-	
-	for($i=0;$i<count($lines);$i++)
+    $lines_count = count($lines);
+
+	for($i=0;$i<$lines_count;++$i)
 	{
 		$line = $lines[$i];
@@ -65,5 +66,5 @@
 	
 		//loop through line's characters and take out any literal strings, replace them with ___i___ where i is the index of this string
-		for($j=0;$j<strlen($line);$j++)
+		for($j=0;$j<strlen($line);++$j)
 		{
 			$c = substr($line,$j,1);
@@ -89,5 +90,5 @@
 					$quoteChar = $d;
 					$literal = $d;	
-					$j++;	
+					++$j;
 				}
 				else if($d=="//") //ignore string markers that are found inside comments
@@ -126,5 +127,5 @@
 					array_push($literal_strings,$literal);
 	
-					$j++;
+					++$j;
 				}
 				else if($c == "\\" && !$escaped)
@@ -143,5 +144,6 @@
 	
 	//now process each line at a time
-	for($i=0;$i<count($lines);$i++)
+    $lines_count = count($lines);
+	for($i=0;$i<$lines_count;++$i)
 	{
 		$line = $lines[$i];
@@ -175,5 +177,6 @@
 	
 	//finally loop through and replace all the literal strings:
-	for($i=0;$i<count($literal_strings);$i++)
+    $literal_strings_count = count($literal_strings);
+	for($i=0;$i<$literal_strings_count;++$i)
 		$sJS = str_replace("___".$i."___",$literal_strings[$i],$sJS);
 	
Index: /trunk/workflow/inc/class.ui_adminactivities.inc.php
===================================================================
--- /trunk/workflow/inc/class.ui_adminactivities.inc.php	(revision 3167)
+++ /trunk/workflow/inc/class.ui_adminactivities.inc.php	(revision 7655)
@@ -647,5 +647,5 @@
 	{
 		$num_activities = count($process_activities['data']);
-		for ($i=0; $i < $num_activities; $i++)
+		for ($i=0; $i < $num_activities; ++$i)
 		{
 			$act_id = $process_activities['data'][$i]['wf_activity_id'];
@@ -695,5 +695,5 @@
 	function search_transitions_act(&$process_activities, $act_id)
 	{
-		for ($i=0; $i < $process_activities['cant']; $i++)
+		for ($i=0; $i < $process_activities['cant']; ++$i)
 		{
 			$id = $process_activities['data'][$i]['wf_activity_id'];
Index: /trunk/workflow/inc/class.WorkflowLDAP.inc.php
===================================================================
--- /trunk/workflow/inc/class.WorkflowLDAP.inc.php	(revision 3729)
+++ /trunk/workflow/inc/class.WorkflowLDAP.inc.php	(revision 7655)
@@ -171,8 +171,8 @@
 		{
 			$attributes = ldap_get_attributes($this->dataSource, $entry);
-			for ($i = 0; $i < $attributes['count']; $i++)
+			for ($i = 0; $i < $attributes['count']; ++$i)
 				$output[$counter][$attributes[$i]] = ldap_get_values_len($this->dataSource, $entry, $attributes[$i]);
 
-			$counter++;
+			++$counter;
 		} while ($entry = ldap_next_entry($this->dataSource, $entry));
 
@@ -201,5 +201,5 @@
 
 		$output = array();
-		for ($i = 0; $i < $result['count']; $i++)
+		for ($i = 0; $i < $result['count']; ++$i)
 		{
 			$output[] = array(
@@ -249,5 +249,5 @@
 		$resourceIdentifier = ldap_search($this->dataSource, $this->groupContext, "(&(phpgwaccounttype=g)(memberuid={$userLogin}))", array('gidnumber'));
 		$result = ldap_get_entries($this->dataSource, $resourceIdentifier);
-		for ($i = 0; $i < $result['count']; $i++)
+		for ($i = 0; $i < $result['count']; ++$i)
 			$output[] = $result[$i]['gidnumber'][0];
 
@@ -295,5 +295,5 @@
 		$output = array();
 		$userCount = count($result);
-		for ($i = 0; $i < $userCount; $i++)
+		for ($i = 0; $i < $userCount; ++$i)
 			$output[] = array(
 				'account_id' => $result[$i]['uidnumber'][0],
@@ -356,5 +356,5 @@
 		/* collect the data */
 		$output = array();
-		for ($i = 0; $i < $result['count']; $i++)
+		for ($i = 0; $i < $result['count']; ++$i)
 		{
 			$output[] = array(
@@ -572,5 +572,5 @@
 		$output = array();
 		$entityCount = count($result);
-		for ($i = 0; $i < $entityCount; $i++)
+		for ($i = 0; $i < $entityCount; ++$i)
 			$output[] = array(
 				'id' => ($result[$i]['phpgwaccounttype'][0] == 'g') ? $result[$i]['gidnumber'][0] : $result[$i]['uidnumber'][0],
@@ -631,5 +631,5 @@
 
 		$output = array();
-		for ($i = 0; $i < $result['count']; $i++)
+		for ($i = 0; $i < $result['count']; ++$i)
 			$output[] = array(
 				'id' => ($result[$i]['phpgwaccounttype'][0] == 'g') ? $result[$i]['gidnumber'][0] : $result[$i]['uidnumber'][0],
Index: /trunk/workflow/inc/fpdf/fpdf.php
===================================================================
--- /trunk/workflow/inc/fpdf/fpdf.php	(revision 795)
+++ /trunk/workflow/inc/fpdf/fpdf.php	(revision 7655)
@@ -431,5 +431,5 @@
 	$w=0;
 	$l=strlen($s);
-	for($i=0;$i<$l;$i++)
+	for($i=0;$i<$l;++$i)
 		$w+=$cw[$s{$i}];
 	return $w*$this->FontSize/1000;
@@ -486,5 +486,5 @@
 		$d=0;
 		$nb=count($this->diffs);
-		for($i=1;$i<=$nb;$i++)
+		for($i=1;$i<=$nb;++$i)
 		{
 			if($this->diffs[$i]==$diff)
@@ -750,10 +750,10 @@
 			}
 			$this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill);
-			$i++;
+			++$i;
 			$sep=-1;
 			$j=$i;
 			$l=0;
 			$ns=0;
-			$nl++;
+			++$nl;
 			if($border && $nl==2)
 				$b=$b2;
@@ -764,5 +764,5 @@
 			$sep=$i;
 			$ls=$l;
-			$ns++;
+			++$ns;
 		}
 		$l+=$cw[$c];
@@ -773,5 +773,5 @@
 			{
 				if($i==$j)
-					$i++;
+					++$i;
 				if($this->ws>0)
 				{
@@ -795,10 +795,10 @@
 			$l=0;
 			$ns=0;
-			$nl++;
+			++$nl;
 			if($border && $nl==2)
 				$b=$b2;
 		}
 		else
-			$i++;
+			++$i;
 	}
 	//Last chunk
@@ -835,5 +835,5 @@
 			//Explicit line break
 			$this->Cell($w,$h,substr($s,$j,$i-$j),0,2,'',0,$link);
-			$i++;
+			++$i;
 			$sep=-1;
 			$j=$i;
@@ -845,5 +845,5 @@
 				$wmax=($w-2*$this->cMargin)*1000/$this->FontSize;
 			}
-			$nl++;
+			++$nl;
 			continue;
 		}
@@ -863,10 +863,10 @@
 					$w=$this->w-$this->rMargin-$this->x;
 					$wmax=($w-2*$this->cMargin)*1000/$this->FontSize;
-					$i++;
-					$nl++;
+					++$i;
+					++$nl;
 					continue;
 				}
 				if($i==$j)
-					$i++;
+					++$i;
 				$this->Cell($w,$h,substr($s,$j,$i-$j),0,2,'',0,$link);
 			}
@@ -885,8 +885,8 @@
 				$wmax=($w-2*$this->cMargin)*1000/$this->FontSize;
 			}
-			$nl++;
+			++$nl;
 		}
 		else
-			$i++;
+			++$i;
 	}
 	//Last chunk
@@ -1089,5 +1089,5 @@
 	{
 		//Replace number of pages
-		for($n=1;$n<=$nb;$n++)
+		for($n=1;$n<=$nb;++$n)
 			$this->pages[$n]=str_replace($this->AliasNbPages,$nb,$this->pages[$n]);
 	}
@@ -1103,5 +1103,5 @@
 	}
 	$filter=($this->compress) ? '/Filter /FlateDecode ' : '';
-	for($n=1;$n<=$nb;$n++)
+	for($n=1;$n<=$nb;++$n)
 	{
 		//Page
@@ -1145,5 +1145,5 @@
 	$this->_out('<</Type /Pages');
 	$kids='/Kids [';
-	for($i=0;$i<$nb;$i++)
+	for($i=0;$i<$nb;++$i)
 		$kids.=(3+2*$i).' 0 R ';
 	$this->_out($kids.']');
@@ -1245,5 +1245,5 @@
 			$cw=&$font['cw'];
 			$s='[';
-			for($i=32;$i<=255;$i++)
+			for($i=32;$i<=255;++$i)
 				$s.=$cw[chr($i)].' ';
 			$this->_out($s.']');
@@ -1299,5 +1299,6 @@
 		{
 			$trns='';
-			for($i=0;$i<count($info['trns']);$i++)
+            $info_count = count($info['trns']);
+			for($i=0;$i<$info_count;++$i)
 				$trns.=$info['trns'][$i].' '.$info['trns'][$i].' ';
 			$this->_out('/Mask ['.$trns.']');
@@ -1420,5 +1421,5 @@
 	$this->_out('0 '.($this->n+1));
 	$this->_out('0000000000 65535 f ');
-	for($i=1;$i<=$this->n;$i++)
+	for($i=1;$i<=$this->n;++$i)
 		$this->_out(sprintf('%010d 00000 n ',$this->offsets[$i]));
 	//Trailer
Index: /trunk/workflow/inc/fpdf/font/makefont/makefont.php
===================================================================
--- /trunk/workflow/inc/fpdf/font/makefont/makefont.php	(revision 5928)
+++ /trunk/workflow/inc/fpdf/font/makefont/makefont.php	(revision 7655)
@@ -24,5 +24,5 @@
 		}
 	}
-	for($i=0;$i<=255;$i++)
+	for($i=0;$i<=255;++$i)
 	{
 		if(!isset($cc2gn[$i]))
@@ -118,5 +118,5 @@
 			$widths['Delta']=$widths['increment'];
 		//Order widths according to map
-		for($i=0;$i<=255;$i++)
+		for($i=0;$i<=255;++$i)
 		{
 			if(!isset($widths[$map[$i]]))
@@ -189,5 +189,5 @@
 	$s="array(\n\t";
 	$cw=$fm['Widths'];
-	for($i=0;$i<=255;$i++)
+	for($i=0;$i<=255;++$i)
 	{
 		if(chr($i)=="'")
@@ -215,5 +215,5 @@
 	$s='';
 	$last=0;
-	for($i=32;$i<=255;$i++)
+	for($i=32;$i<=255;++$i)
 	{
 		if($map[$i]!=$ref[$i])
@@ -261,5 +261,5 @@
 	//Seek OS/2 table
 	$found=false;
-	for($i=0;$i<$nb;$i++)
+	for($i=0;$i<$nb;++$i)
 	{
 		if(fread($f,4)=='OS/2')
Index: /trunk/workflow/inc/fpdf/font/courier.php
===================================================================
--- /trunk/workflow/inc/fpdf/font/courier.php	(revision 795)
+++ /trunk/workflow/inc/fpdf/font/courier.php	(revision 7655)
@@ -1,4 +1,4 @@
 <?php
-for($i=0;$i<=255;$i++)
+for($i=0;$i<=255;++$i)
 	$fpdf_charwidths['courier'][chr($i)]=600;
 $fpdf_charwidths['courierB']=$fpdf_charwidths['courier'];
Index: /trunk/workflow/inc/smarty/internals/core.write_compiled_include.php
===================================================================
--- /trunk/workflow/inc/smarty/internals/core.write_compiled_include.php	(revision 795)
+++ /trunk/workflow/inc/smarty/internals/core.write_compiled_include.php	(revision 7655)
@@ -38,5 +38,5 @@
 
     $this_varname = ((double)phpversion() >= 5.0) ? '_smarty' : 'this';
-    for ($_i = 0, $_for_max = count($_match_source); $_i < $_for_max; $_i++) {
+    for ($_i = 0, $_for_max = count($_match_source); $_i < $_for_max; ++$_i) {
         $_match =& $_match_source[$_i];
         $source = $_match[4];
@@ -57,5 +57,5 @@
             }
 
-            for ($i=0, $count = count($tokens); $i < $count; $i++) {
+            for ($i=0, $count = count($tokens); $i < $count; ++$i) {
                 if (is_array($tokens[$i])) {
                     if ($tokens[$i][0] == T_VARIABLE && $tokens[$i][1] == '$this') {
Index: /trunk/workflow/inc/smarty/internals/core.write_cache_file.php
===================================================================
--- /trunk/workflow/inc/smarty/internals/core.write_cache_file.php	(revision 795)
+++ /trunk/workflow/inc/smarty/internals/core.write_cache_file.php	(revision 7655)
@@ -44,5 +44,5 @@
         $level = 0;
         $j = 0;
-        for ($i=0, $results_count = count($results); $i < $results_count && $j < $match_count; $i++) {
+        for ($i=0, $results_count = count($results); $i < $results_count && $j < $match_count; ++$i) {
             if ($results[$i] == $match[0][$j]) {
                 // nocache tag
@@ -53,5 +53,5 @@
                     if ($level++ > 0) unset($results[$i]);
                 }
-                $j++;
+                ++$j;
             } elseif ($level > 0) {
                 unset($results[$i]);
Index: /trunk/workflow/inc/smarty/internals/core.process_cached_inserts.php
===================================================================
--- /trunk/workflow/inc/smarty/internals/core.process_cached_inserts.php	(revision 795)
+++ /trunk/workflow/inc/smarty/internals/core.process_cached_inserts.php	(revision 7655)
@@ -18,5 +18,5 @@
     list($cached_inserts, $insert_args) = $match;
 
-    for ($i = 0, $for_max = count($cached_inserts); $i < $for_max; $i++) {
+    for ($i = 0, $for_max = count($cached_inserts); $i < $for_max; ++$i) {
         if ($smarty->debugging) {
             $_params = array();
Index: /trunk/workflow/inc/smarty/plugins/modifier.escape.php
===================================================================
--- /trunk/workflow/inc/smarty/plugins/modifier.escape.php	(revision 795)
+++ /trunk/workflow/inc/smarty/plugins/modifier.escape.php	(revision 7655)
@@ -42,5 +42,5 @@
             // escape every character into hex
             $return = '';
-            for ($x=0; $x < strlen($string); $x++) {
+            for ($x=0; $x < strlen($string); ++$x) {
                 $return .= '%' . bin2hex($string[$x]);
             }
@@ -49,5 +49,5 @@
         case 'hexentity':
             $return = '';
-            for ($x=0; $x < strlen($string); $x++) {
+            for ($x=0; $x < strlen($string); ++$x) {
                 $return .= '&#x' . bin2hex($string[$x]) . ';';
             }
@@ -56,5 +56,5 @@
         case 'decentity':
             $return = '';
-            for ($x=0; $x < strlen($string); $x++) {
+            for ($x=0; $x < strlen($string); ++$x) {
                 $return .= '&#' . ord($string[$x]) . ';';
             }
@@ -72,5 +72,5 @@
            // escape non-standard chars, such as ms document quotes
            $_res = '';
-           for($_i = 0, $_len = strlen($string); $_i < $_len; $_i++) {
+           for($_i = 0, $_len = strlen($string); $_i < $_len; ++$_i) {
                $_ord = ord(substr($string, $_i, 1));
                // non-standard char, escape it
Index: /trunk/workflow/inc/smarty/plugins/block.textformat.php
===================================================================
--- /trunk/workflow/inc/smarty/plugins/block.textformat.php	(revision 795)
+++ /trunk/workflow/inc/smarty/plugins/block.textformat.php	(revision 7655)
@@ -76,5 +76,5 @@
     $_output = '';
 
-    for($_x = 0, $_y = count($_paragraphs); $_x < $_y; $_x++) {
+    for($_x = 0, $_y = count($_paragraphs); $_x < $_y; ++$_x) {
         if ($_paragraphs[$_x] == '') {
             continue;
Index: /trunk/workflow/inc/smarty/plugins/outputfilter.trimwhitespace.php
===================================================================
--- /trunk/workflow/inc/smarty/plugins/outputfilter.trimwhitespace.php	(revision 795)
+++ /trunk/workflow/inc/smarty/plugins/outputfilter.trimwhitespace.php	(revision 7655)
@@ -65,5 +65,5 @@
     $_len = strlen($search_str);
     $_pos = 0;
-    for ($_i=0, $_count=count($replace); $_i<$_count; $_i++)
+    for ($_i=0, $_count=count($replace); $_i<$_count; ++$_i)
         if (($_pos=strpos($subject, $search_str, $_pos))!==false)
             $subject = substr_replace($subject, $replace[$_i], $_pos, $_len);
Index: /trunk/workflow/inc/smarty/plugins/function.html_table.php
===================================================================
--- /trunk/workflow/inc/smarty/plugins/function.html_table.php	(revision 795)
+++ /trunk/workflow/inc/smarty/plugins/function.html_table.php	(revision 7655)
@@ -128,5 +128,5 @@
         $output .= "<thead><tr>\n";
 
-        for ($r=0; $r<$cols_count; $r++) {
+        for ($r=0; $r<$cols_count; ++$r) {
             $output .= '<th' . smarty_function_html_table_cycle('th', $th_attr, $r) . '>';
             $output .= $cols[$r];
@@ -137,9 +137,9 @@
 
     $output .= "<tbody>\n";
-    for ($r=0; $r<$rows; $r++) {
+    for ($r=0; $r<$rows; ++$r) {
         $output .= "<tr" . smarty_function_html_table_cycle('tr', $tr_attr, $r) . ">\n";
         $rx =  ($vdir == 'down') ? $r*$cols_count : ($rows-1-$r)*$cols_count;
 
-        for ($c=0; $c<$cols_count; $c++) {
+        for ($c=0; $c<$cols_count; ++$c) {
             $x =  ($hdir == 'right') ? $rx+$c : $rx+$cols_count-1-$c;
             if ($inner!='cols') {
Index: /trunk/workflow/inc/smarty/plugins/function.html_select_time.php
===================================================================
--- /trunk/workflow/inc/smarty/plugins/function.html_select_time.php	(revision 795)
+++ /trunk/workflow/inc/smarty/plugins/function.html_select_time.php	(revision 7655)
@@ -85,5 +85,5 @@
         $hours       = $use_24_hours ? range(0, 23) : range(1, 12);
         $hour_fmt = $use_24_hours ? '%H' : '%I';
-        for ($i = 0, $for_max = count($hours); $i < $for_max; $i++)
+        for ($i = 0, $for_max = count($hours); $i < $for_max; ++$i)
             $hours[$i] = sprintf('%02d', $hours[$i]);
         $html_result .= '<select name=';
Index: /trunk/workflow/inc/smarty/plugins/function.mailto.php
===================================================================
--- /trunk/workflow/inc/smarty/plugins/function.mailto.php	(revision 795)
+++ /trunk/workflow/inc/smarty/plugins/function.mailto.php	(revision 7655)
@@ -89,5 +89,6 @@
 
     $mail_parm_vals = '';
-    for ($i=0; $i<count($mail_parms); $i++) {
+    $mail_parms_count = count($mail_parms);
+    for ($i=0; $i<$mail_parms_count; ++$i) {
         $mail_parm_vals .= (0==$i) ? '?' : '&';
         $mail_parm_vals .= $mail_parms[$i];
@@ -105,5 +106,5 @@
 
         $js_encode = '';
-        for ($x=0; $x < strlen($string); $x++) {
+        for ($x=0; $x < strlen($string); ++$x) {
             $js_encode .= '%' . bin2hex($string[$x]);
         }
@@ -114,5 +115,5 @@
         $string = '<a href="mailto:'.$address.'" '.$extra.'>'.$text.'</a>';
 
-        for($x = 0, $y = strlen($string); $x < $y; $x++ ) {
+        for($x = 0, $y = strlen($string); $x < $y; ++$x ) {
             $ord[] = ord($string[$x]);   
         }
@@ -138,5 +139,5 @@
         }
         $address_encode = '';
-        for ($x=0; $x < strlen($address); $x++) {
+        for ($x=0; $x < strlen($address); ++$x) {
             if(preg_match('!\w!',$address[$x])) {
                 $address_encode .= '%' . bin2hex($address[$x]);
@@ -146,5 +147,5 @@
         }
         $text_encode = '';
-        for ($x=0; $x < strlen($text); $x++) {
+        for ($x=0; $x < strlen($text); ++$x) {
             $text_encode .= '&#x' . bin2hex($text[$x]).';';
         }
Index: /trunk/workflow/inc/smarty/plugins/function.html_select_date.php
===================================================================
--- /trunk/workflow/inc/smarty/plugins/function.html_select_date.php	(revision 795)
+++ /trunk/workflow/inc/smarty/plugins/function.html_select_date.php	(revision 7655)
@@ -181,5 +181,5 @@
     $field_separator_count = -1;
     if ($display_months) {
-    	$field_separator_count++;
+    	++$field_separator_count;
         $month_names = array();
         $month_values = array();
@@ -188,5 +188,5 @@
             $month_values[''] = '';
         }
-        for ($i = 1; $i <= 12; $i++) {
+        for ($i = 1; $i <= 12; ++$i) {
             $month_names[$i] = strftime($month_format, mktime(0, 0, 0, $i, 1, 2000));
             $month_values[$i] = strftime($month_value_format, mktime(0, 0, 0, $i, 1, 2000));
@@ -225,5 +225,5 @@
             $day_values[''] = '';
         }
-        for ($i = 1; $i <= 31; $i++) {
+        for ($i = 1; $i <= 31; ++$i) {
             $days[] = sprintf($day_format, $i);
             $day_values[] = sprintf($day_value_format, $i);
@@ -255,5 +255,5 @@
 
     if ($display_years) {
-    	$field_separator_count++;
+    	++$field_separator_count;
         if (null !== $field_array){
             $year_name = $field_array . '[' . $prefix . 'Year]';
@@ -303,5 +303,5 @@
 
     // Loop thru the field_order field
-    for ($i = 0; $i <= 2; $i++){
+    for ($i = 0; $i <= 2; ++$i){
         $c = substr($field_order, $i, 1);
         switch ($c){
Index: /trunk/workflow/inc/smarty/plugins/function.config_load.php
===================================================================
--- /trunk/workflow/inc/smarty/plugins/function.config_load.php	(revision 795)
+++ /trunk/workflow/inc/smarty/plugins/function.config_load.php	(revision 7655)
@@ -121,5 +121,5 @@
                 $smarty->_config[1]['files'][$_file] = true;
         } else if ($_scope == 'global') {
-            for ($i = 1, $for_max = count($smarty->_config); $i < $for_max; $i++) {
+            for ($i = 1, $for_max = count($smarty->_config); $i < $for_max; ++$i) {
                 $smarty->_config[$i]['vars'] = @array_merge($smarty->_config[$i]['vars'], $_config_vars);
                 $smarty->_config[$i]['files'][$_file] = true;
Index: /trunk/workflow/inc/smarty/Smarty_Compiler.class.php
===================================================================
--- /trunk/workflow/inc/smarty/Smarty_Compiler.class.php	(revision 795)
+++ /trunk/workflow/inc/smarty/Smarty_Compiler.class.php	(revision 7655)
@@ -277,5 +277,5 @@
 
         /* loop through text blocks */
-        for ($curr_tb = 0, $for_max = count($text_blocks); $curr_tb < $for_max; $curr_tb++) {
+        for ($curr_tb = 0, $for_max = count($text_blocks); $curr_tb < $for_max; ++$curr_tb) {
             /* match anything resembling php tags */
             if (preg_match_all('~(<\?(?:\w+|=)?|\?>|language\s*=\s*[\"\']?\s*php\s*[\"\']?)~is', $text_blocks[$curr_tb], $sp_match)) {
@@ -283,9 +283,9 @@
                 $sp_match[1] = array_unique($sp_match[1]);
                 usort($sp_match[1], '_smarty_sort_length');
-                for ($curr_sp = 0, $for_max2 = count($sp_match[1]); $curr_sp < $for_max2; $curr_sp++) {
+                for ($curr_sp = 0, $for_max2 = count($sp_match[1]); $curr_sp < $for_max2; ++$curr_sp) {
                     $text_blocks[$curr_tb] = str_replace($sp_match[1][$curr_sp],'%%%SMARTYSP'.$curr_sp.'%%%',$text_blocks[$curr_tb]);
                 }
                 /* process each one */
-                for ($curr_sp = 0, $for_max2 = count($sp_match[1]); $curr_sp < $for_max2; $curr_sp++) {
+                for ($curr_sp = 0, $for_max2 = count($sp_match[1]); $curr_sp < $for_max2; ++$curr_sp) {
                     if ($this->php_handling == SMARTY_PHP_PASSTHRU) {
                         /* echo php contents */
@@ -308,5 +308,5 @@
         /* Compile the template tags into PHP code. */
         $compiled_tags = array();
-        for ($i = 0, $for_max = count($template_tags); $i < $for_max; $i++) {
+        for ($i = 0, $for_max = count($template_tags); $i < $for_max; ++$i) {
             $this->_current_line_no += substr_count($text_blocks[$i], "\n");
             $compiled_tags[] = $this->_compile_tag($template_tags[$i]);
@@ -331,5 +331,5 @@
             if ($strip) {
                 /* strip all $text_blocks before the next '/strip' */
-                for ($j = $i + 1; $j < $for_max; $j++) {
+                for ($j = $i + 1; $j < $for_max; ++$j) {
                     /* remove leading and trailing whitespaces of each line */
                     $text_blocks[$j] = preg_replace('![\t ]*[\r\n]+[\t ]*!', '', $text_blocks[$j]);
@@ -354,5 +354,5 @@
         
         /* Interleave the compiled contents and text blocks to get the final result. */
-        for ($i = 0, $for_max = count($compiled_tags); $i < $for_max; $i++) {
+        for ($i = 0, $for_max = count($compiled_tags); $i < $for_max; ++$i) {
             if ($compiled_tags[$i] == '') {
                 // tag result empty, remove first newline from following text block
@@ -1279,6 +1279,7 @@
 
         $is_arg_stack = array();
-
-        for ($i = 0; $i < count($tokens); $i++) {
+        $tokens_count = count($tokens);
+        
+        for ($i = 0; $i < $tokens_count; ++$i) {
 
             $token = &$tokens[$i];
@@ -1470,5 +1471,5 @@
             case 'even':
                 if (isset($tokens[$expr_end]) && $tokens[$expr_end] == 'by') {
-                    $expr_end++;
+                    ++$expr_end;
                     $expr_arg = $tokens[$expr_end++];
                     $expr = "!(1 & ($is_arg / " . $this->_parse_var_props($expr_arg) . "))";
@@ -1479,5 +1480,5 @@
             case 'odd':
                 if (isset($tokens[$expr_end]) && $tokens[$expr_end] == 'by') {
-                    $expr_end++;
+                    ++$expr_end;
                     $expr_arg = $tokens[$expr_end++];
                     $expr = "(1 & ($is_arg / " . $this->_parse_var_props($expr_arg) . "))";
@@ -1488,5 +1489,5 @@
             case 'div':
                 if (@$tokens[$expr_end] == 'by') {
-                    $expr_end++;
+                    ++$expr_end;
                     $expr_arg = $tokens[$expr_end++];
                     $expr = "!($is_arg % " . $this->_parse_var_props($expr_arg) . ")";
@@ -1843,5 +1844,5 @@
         $this->_parse_vars_props($match);
         $replace = array();
-        for ($i = 0, $count = count($match); $i < $count; $i++) {
+        for ($i = 0, $count = count($match); $i < $count; ++$i) {
             $replace[$orig_vals[$i]] = $match[$i];
         }
@@ -1905,5 +1906,5 @@
         list(, $_modifiers, $modifier_arg_strings) = $_match;
 
-        for ($_i = 0, $_for_max = count($_modifiers); $_i < $_for_max; $_i++) {
+        for ($_i = 0, $_for_max = count($_modifiers); $_i < $_for_max; ++$_i) {
             $_modifier_name = $_modifiers[$_i];
 
Index: /trunk/workflow/inc/smarty/Config_File.class.php
===================================================================
--- /trunk/workflow/inc/smarty/Config_File.class.php	(revision 795)
+++ /trunk/workflow/inc/smarty/Config_File.class.php	(revision 7655)
@@ -282,5 +282,5 @@
         preg_match_all('!^.*\r?\n?!m', $contents, $match);
         $lines = $match[0];
-        for ($i=0, $count=count($lines); $i<$count; $i++) {
+        for ($i=0, $count=count($lines); $i<$count; ++$i) {
             $line = $lines[$i];
             if (empty($line)) continue;
Index: /trunk/workflow/inc/class.bo_userinterface.inc.php
===================================================================
--- /trunk/workflow/inc/class.bo_userinterface.inc.php	(revision 5921)
+++ /trunk/workflow/inc/class.bo_userinterface.inc.php	(revision 7655)
@@ -846,5 +846,5 @@
 
 		$areas = $this->so->getAreaList($this->organizationInfo['organizacao_id']);
-		for ($i = 0; $i < count($areas); $i++)
+		for ($i = 0; $i < count($areas); ++$i)
 		{
 			$areas[$i]['children'] = false;
Index: /trunk/workflow/inc/class.so_external_applications.inc.php
===================================================================
--- /trunk/workflow/inc/class.so_external_applications.inc.php	(revision 3167)
+++ /trunk/workflow/inc/class.so_external_applications.inc.php	(revision 7655)
@@ -148,6 +148,6 @@
 
 		$output = $result->GetArray(-1);
-		for ($i = 0; $i < count($output); $i++)
-			for ($j = 0; $j < $result->_numOfFields; $j++)
+		for ($i = 0; $i < count($output); ++$i)
+			for ($j = 0; $j < $result->_numOfFields; ++$j)
 				unset($output[$i][$j]);
 
@@ -170,6 +170,6 @@
 
 		$output = $result->GetArray(-1);
-		for ($i = 0; $i < count($output); $i++)
-			for ($j = 0; $j < $result->_numOfFields; $j++)
+		for ($i = 0; $i < count($output); ++$i)
+			for ($j = 0; $j < $result->_numOfFields; ++$j)
 				unset($output[$i][$j]);
 
Index: /trunk/workflow/inc/class.bo_adminsource.inc.php
===================================================================
--- /trunk/workflow/inc/class.bo_adminsource.inc.php	(revision 3167)
+++ /trunk/workflow/inc/class.bo_adminsource.inc.php	(revision 7655)
@@ -80,5 +80,5 @@
 		{
 			$value /= 1024.0;
-			$unitSelect++;
+			++$unitSelect;
 		}
 
Index: /trunk/workflow/inc/nano/JSON.php
===================================================================
--- /trunk/workflow/inc/nano/JSON.php	(revision 795)
+++ /trunk/workflow/inc/nano/JSON.php	(revision 7655)
@@ -714,5 +714,5 @@
                             // found a comment start, and we are in an array, object, or slice
                             array_push($stk, array('what' => SERVICES_JSON_IN_CMT, 'where' => $c, 'delim' => false));
-                            $c++;
+                            ++$c;
                             //print("Found start of comment at {$c}\n");
 
@@ -720,5 +720,5 @@
                             // found a comment end, and we're in one now
                             array_pop($stk);
-                            $c++;
+                            ++$c;
 
                             for ($i = $top['where']; $i <= $c; ++$i)
Index: /trunk/workflow/inc/class.bo_monitors.inc.php
===================================================================
--- /trunk/workflow/inc/class.bo_monitors.inc.php	(revision 5921)
+++ /trunk/workflow/inc/class.bo_monitors.inc.php	(revision 7655)
@@ -349,5 +349,5 @@
 		$instanceCount = count($output['data']);
 		$cachedLDAP = &Factory::getInstance('CachedLDAP');
-		for ($i = 0; $i < $instanceCount; $i++)
+		for ($i = 0; $i < $instanceCount; ++$i)
 		{
 			/* get the user name */
@@ -489,5 +489,5 @@
 		$userMapping = array();
 		$instanceCount = count($output['data']);
-		for ($i = 0; $i < $instanceCount; $i++)
+		for ($i = 0; $i < $instanceCount; ++$i)
 		{
 			/* get the user name */
@@ -727,5 +727,5 @@
 			foreach ($rawData['data'] as $instance)
 				if ($this->processMonitor->remove_instance($instance['wf_instance_id']))
-					$instanceCount++;
+					++$instanceCount;
 		return $instanceCount;
 	}
@@ -1202,7 +1202,7 @@
 			{
 				if ($this->instanceManager->set_instance_user($instance['wf_instance_id'], $instance['wf_activity_id'], $newUser))
-					$OKCount++;
+					++$OKCount;
 				else
-					$errorCount++;
+					++$errorCount;
 			}
 		}
@@ -1431,5 +1431,5 @@
 			$phpMailer->AddAddress($email['to'], $email['username']);
 			if ($phpMailer->Send())
-				$count++;
+				++$count;
 		}
 		return $count;
Index: /trunk/workflow/inc/phplot/phplot_data.php
===================================================================
--- /trunk/workflow/inc/phplot/phplot_data.php	(revision 795)
+++ /trunk/workflow/inc/phplot/phplot_data.php	(revision 7655)
@@ -49,7 +49,7 @@
         // Put maximum of the maxima in $maxmax
         $maxmax = 0;
-        for($i=0; $i < $this->num_data_rows; $i++) {
+        for($i=0; $i < $this->num_data_rows; ++$i) {
             $rowsize = count($this->data[$i]);
-            for ($j=$offset; $j < $rowsize; $j++) {
+            for ($j=$offset; $j < $rowsize; ++$j) {
                 if ($this->data[$i][$j] > @ $max[$j])
                     $max[$j] = $this->data[$i][$j];
@@ -61,5 +61,5 @@
         // determine amplification factor $amplify
         $end = count($max) + $offset;
-        for ($i=$offset; $i < $end; $i++) {
+        for ($i=$offset; $i < $end; ++$i) {
             if ($max[$i] == 0 || $max[$i] == $maxmax) {
                 $amplify[$i] = 1;  // no divide by zero
@@ -86,7 +86,7 @@
         // On my machine, running 1000 iterations over 1000 rows of 12 elements each,
         // the for loops were 43.2% faster (MBD)
-        for ($i = 0; $i < $this->num_data_rows; $i++) {
+        for ($i = 0; $i < $this->num_data_rows; ++$i) {
             $rowsize = count($this->data[$i]);
-            for ($j=$offset; $j < $rowsize; $j++) {
+            for ($j=$offset; $j < $rowsize; ++$j) {
                 $this->data[$i][$j] *= $amplify[$j];
             }
@@ -135,5 +135,5 @@
             // Ok. No need to set the offset to skip more records.
         } elseif ($this->data_type == 'data-data') {
-            $off++;             // first Y value at $data[][2]
+            ++$off;             // first Y value at $data[][2]
         } else {
             $this->DrawError('DoMovingAverage(): wrong data type!!');
@@ -159,5 +159,5 @@
 
         $datarow += $off;
-        for ($i = 0; $i < $this->num_data_rows; $i++) {
+        for ($i = 0; $i < $this->num_data_rows; ++$i) {
             $storage[$i % $interval] = @ $this->data[$i][$datarow];
             $ma = array_sum($storage);
@@ -180,5 +180,5 @@
     {
         if ($this->data_type == 'text-data') {
-            $datarow++;
+            ++$datarow;
         } elseif ($this->data_type != 'data-data') {
             $this->DrawError('DoWeightedMovingAverage(): wrong data type!!');
@@ -191,5 +191,5 @@
 
         $storage[0] = $this->data[0][$datarow];
-        for ($i=1;$i < $this->num_data_rows; $i++) {
+        for ($i=1;$i < $this->num_data_rows; ++$i) {
             $storage[$i] = @ $storage[$i-1] + $perc * ($this->data[$i][$datarow] - $storage[$i-1]);
             $ma = array_sum($storage);
@@ -208,5 +208,5 @@
         $offset = 1;
         if ($this->data_type == 'data-data') {
-            $offset++;
+            ++$offset;
         } elseif ($this->data_type != 'text-data') {
             $this->DrawError('wrong data type!!');
@@ -237,5 +237,5 @@
         $offset = 1;
         if ($this->data_type == 'data-data') {
-            $offset++;
+            ++$offset;
         } elseif ($this->data_type != 'text-data') {
             $this->DrawError('wrong data type!!');
Index: /trunk/workflow/inc/phplot/phplot.php
===================================================================
--- /trunk/workflow/inc/phplot/phplot.php	(revision 6057)
+++ /trunk/workflow/inc/phplot/phplot.php	(revision 7655)
@@ -549,5 +549,5 @@
             $this->ndx_data_colors[$i] = $this->SetIndexColor($col);
             $this->ndx_data_dark_colors[$i] = $this->SetIndexDarkColor($col);
-            $i++;
+            ++$i;
         }
 
@@ -574,5 +574,5 @@
         foreach($this->data_border_colors as $col) {
             $this->ndx_data_border_colors[$i] = $this->SetIndexColor($col);
-            $i++;
+            ++$i;
         }
     } // function SetDataBorderColors()
@@ -595,5 +595,5 @@
         foreach($this->error_bar_colors as $col) {
             $this->ndx_error_bar_colors[$i] = $this->SetIndexColor($col);
-            $i++;
+            ++$i;
         }
         return TRUE;
@@ -628,5 +628,5 @@
                 $this->default_dashed_style .= str_repeat('IMG_COLOR_TRANSPARENT,', $s);
             }
-            $t++;
+            ++$t;
         }
         // Remove trailing comma and add closing parenthesis
@@ -959,5 +959,5 @@
 
                 $ypos = $which_ypos;
-                for($i = 0; $i < $nlines; $i++) {
+                for($i = 0; $i < $nlines; ++$i) {
                     // Center the text vertically around $which_ypos (each line)
                     if ($which_valign == 'center')
@@ -983,5 +983,5 @@
 
                 $xpos = $which_xpos;
-                for($i = 0; $i < $nlines; $i++) {
+                for($i = 0; $i < $nlines; ++$i) {
                     // center the text around $which_xpos
                     if ($which_halign == 'center')
@@ -1710,5 +1710,5 @@
 
         // Fix odd point sizes for point shapes which need it
-        for ($i = 0; $i < $pt; $i++) {
+        for ($i = 0; $i < $pt; ++$i) {
             if ($this->point_shapes[$i] == 'diamond' or $this->point_shapes[$i] == 'triangle') {
                 if ($this->point_sizes[$i] % 2 != 0) {
@@ -1762,5 +1762,5 @@
         $this->total_records = 0;               // Perform some useful calculations.
         $this->records_per_group = 1;
-        for ($i = 0, $recs = 0; $i < $this->num_data_rows; $i++) {
+        for ($i = 0, $recs = 0; $i < $this->num_data_rows; ++$i) {
             // Copy
             $this->data[$i] = array_values($which_dv[$i]);   // convert to numerical indices.
@@ -1842,5 +1842,5 @@
 
         // Process each row of data
-        for ($i=0; $i < $this->num_data_rows; $i++) {
+        for ($i=0; $i < $this->num_data_rows; ++$i) {
             $j=0;
             // Extract maximum text label length
@@ -1858,5 +1858,5 @@
                     $miny = $maxy;
                 }
-                for (; $j < $this->num_recs[$i]; $j++) {
+                for (; $j < $this->num_recs[$i]; ++$j) {
                     $val = (double)$this->data[$i][$j];
                     if ($this->plot_type == 'stackedbars') {
@@ -1876,5 +1876,5 @@
                 $miny = $maxy = (double)$this->data[$i][$j++];
                 // $numrecs = @ count($this->data[$i]);
-                for (; $j < $this->num_recs[$i]; $j++) {
+                for (; $j < $this->num_recs[$i]; ++$j) {
                     $val = (double)$this->data[$i][$j];
                     $maxy = ($val > $maxy) ? $val : $maxy;
@@ -3180,5 +3180,5 @@
             $y_pos += $char_h + $this->line_spacing;
 
-            $color_index++;
+            ++$color_index;
             if ($color_index > $max_color_index)
                 $color_index = 0;
@@ -3222,6 +3222,6 @@
         // Get sum of each column? One pie slice per column
         if ($this->data_type === 'text-data') {
-            for ($i = 0; $i < $this->num_data_rows; $i++) {
-                for ($j = 1; $j < $this->num_recs[$i]; $j++) {      // Label ($row[0]) unused in these pie charts
+            for ($i = 0; $i < $this->num_data_rows; ++$i) {
+                for ($j = 1; $j < $this->num_recs[$i]; ++$j) {      // Label ($row[0]) unused in these pie charts
                     @ $sumarr[$j] += abs($this->data[$i][$j]);      // NOTE!  sum > 0 to make pie charts
                 }
@@ -3230,5 +3230,5 @@
         // Or only one column per row, one pie slice per row?
         else if ($this->data_type == 'text-data-single') {
-            for ($i = 0; $i < $this->num_data_rows; $i++) {
+            for ($i = 0; $i < $this->num_data_rows; ++$i) {
                 $legend[$i] = $this->data[$i][0];                   // Set the legend to column labels
                 $sumarr[$i] = $this->data[$i][1];
@@ -3236,6 +3236,6 @@
         }
         else if ($this->data_type == 'data-data') {
-            for ($i = 0; $i < $this->num_data_rows; $i++) {
-                for ($j = 2; $j < $this->num_recs[$i]; $j++) {
+            for ($i = 0; $i < $this->num_data_rows; ++$i) {
+                for ($j = 2; $j < $this->num_recs[$i]; ++$j) {
                     @ $sumarr[$j] += abs($this->data[$i][$j]);
                 }
@@ -3304,5 +3304,5 @@
                                     $label_txt, 'center', 'center');
                 }
-                $color_index++;
+                ++$color_index;
                 $color_index = $color_index % $max_data_colors;
             }   // end for
@@ -3325,5 +3325,5 @@
         $do_labels = ($this->plot_type != 'linepoints');
 
-        for($row = 0, $cnt = 0; $row < $this->num_data_rows; $row++) {
+        for($row = 0, $cnt = 0; $row < $this->num_data_rows; ++$row) {
             $record = 1;                                // Skip record #0 (title)
 
@@ -3337,5 +3337,5 @@
 
             // Now go for Y, E+, E-
-            for ($idx = 0; $record < $this->num_recs[$row]; $idx++) {
+            for ($idx = 0; $record < $this->num_recs[$row]; ++$idx) {
                     // Y:
                     $y_now = $this->data[$row][$record++];
@@ -3367,5 +3367,5 @@
         $do_labels = ($this->plot_type != 'linepoints');
 
-        for ($row = 0, $cnt = 0; $row < $this->num_data_rows; $row++) {
+        for ($row = 0, $cnt = 0; $row < $this->num_data_rows; ++$row) {
             $rec = 1;                    // Skip record #0 (data label)
 
@@ -3383,5 +3383,5 @@
 
             // Proceed with Y values
-            for($idx = 0;$rec < $this->num_recs[$row]; $rec++, $idx++) {
+            for($idx = 0;$rec < $this->num_recs[$row]; ++$rec, ++$idx) {
                 if (is_numeric($this->data[$row][$rec])) {              // Allow for missing Y data
                     $this->DrawDot($x_now, $this->data[$row][$rec],
@@ -3400,5 +3400,5 @@
         $this->CheckOption($this->data_type, 'text-data, data-data', __FUNCTION__);
 
-        for ($row = 0, $cnt = 0; $row < $this->num_data_rows; $row++) {
+        for ($row = 0, $cnt = 0; $row < $this->num_data_rows; ++$row) {
             $rec = 1;                    // Skip record #0 (data label)
 
@@ -3416,5 +3416,5 @@
 
             // Proceed with Y values
-            for($idx = 0;$rec < $this->num_recs[$row]; $rec++, $idx++) {
+            for($idx = 0;$rec < $this->num_recs[$row]; ++$rec, ++$idx) {
                 if (is_numeric($this->data[$row][$rec])) {              // Allow for missing Y data
                     ImageSetThickness($this->img, $this->line_widths[$idx]);
@@ -3545,5 +3545,5 @@
         $incomplete_data_defaults_to_x_axis = FALSE;        // TODO: make this configurable
 
-        for ($row = 0, $cnt = 0; $row < $this->num_data_rows; $row++) {
+        for ($row = 0, $cnt = 0; $row < $this->num_data_rows; ++$row) {
             $rec = 1;                                       // Skip record #0 (data label)
 
@@ -3561,5 +3561,5 @@
             // Proceed with Y values
             // Create array of points for imagefilledpolygon()
-            for($idx = 0; $rec < $this->num_recs[$row]; $rec++, $idx++) {
+            for($idx = 0; $rec < $this->num_recs[$row]; ++$rec, ++$idx) {
                 if (is_numeric($this->data[$row][$rec])) {              // Allow for missing Y data
                     $y_now_pixels = $this->ytr($this->data[$row][$rec]);
@@ -3582,5 +3582,5 @@
 
         $end = count($posarr);
-        for ($i = 0; $i < $end; $i++) {
+        for ($i = 0; $i < $end; ++$i) {
             // Prepend initial points. X = first point's X, Y = x_axis_y_pixels
             $x = $posarr[$i][0];
@@ -3618,5 +3618,5 @@
         }
 
-        for ($row = 0, $cnt = 0; $row < $this->num_data_rows; $row++) {
+        for ($row = 0, $cnt = 0; $row < $this->num_data_rows; ++$row) {
             $record = 1;                                    // Skip record #0 (data label)
 
@@ -3631,5 +3631,5 @@
                 $this->DrawXDataLabel($this->data[$row][0], $x_now_pixels, $row);
 
-            for ($idx = 0; $record < $this->num_recs[$row]; $record++, $idx++) {
+            for ($idx = 0; $record < $this->num_recs[$row]; ++$record, ++$idx) {
                 if (($line_style = $this->line_styles[$idx]) == 'none')
                     continue; //Allow suppressing entire line, useful with linepoints
@@ -3679,5 +3679,5 @@
         $start_lines = array_fill(0, $this->records_per_group, FALSE);
 
-        for ($row = 0, $cnt = 0; $row < $this->num_data_rows; $row++) {
+        for ($row = 0, $cnt = 0; $row < $this->num_data_rows; ++$row) {
             $record = 1;                                    // Skip record #0 (data label)
 
@@ -3691,5 +3691,5 @@
 
             // Now go for Y, E+, E-
-            for ($idx = 0; $record < $this->num_recs[$row]; $idx++) {
+            for ($idx = 0; $record < $this->num_recs[$row]; ++$idx) {
                 if (($line_style = $this->line_styles[$idx]) == 'none')
                     continue; //Allow suppressing entire line, useful with linepoints
@@ -3749,5 +3749,5 @@
         }
 
-        for ($row = 0, $cnt = 0; $row < $this->num_data_rows; $row++) {
+        for ($row = 0, $cnt = 0; $row < $this->num_data_rows; ++$row) {
             $record = 1;                                    // Skip record #0 (data label)
 
@@ -3763,5 +3763,5 @@
 
             // Draw Lines
-            for ($idx = 0; $record < $this->num_recs[$row]; $record++, $idx++) {
+            for ($idx = 0; $record < $this->num_recs[$row]; ++$record, ++$idx) {
                 if (is_numeric($this->data[$row][$record])) {               // Allow for missing Y data
                     $y_now_pixels = $this->ytr($this->data[$row][$record]);
@@ -3813,5 +3813,5 @@
         $x_first_bar = (($this->records_per_group - 1) * $this->record_bar_width) / 2 - $this->bar_adjust_gap;
 
-        for ($row = 0; $row < $this->num_data_rows; $row++) {
+        for ($row = 0; $row < $this->num_data_rows; ++$row) {
             $record = 1;                                    // Skip record #0 (data label)
 
@@ -3825,5 +3825,5 @@
 
             // Draw the bars in the group:
-            for ($idx = 0; $record < $this->num_recs[$row]; $record++, $idx++) {
+            for ($idx = 0; $record < $this->num_recs[$row]; ++$record, ++$idx) {
                 if (is_numeric($this->data[$row][$record])) {       // Allow for missing Y data
                     $x2 = $x1 + $this->actual_bar_width;
@@ -3892,5 +3892,5 @@
         $x_first_bar = $this->record_bar_width / 2 - $this->bar_adjust_gap;
 
-        for ($row = 0; $row < $this->num_data_rows; $row++) {
+        for ($row = 0; $row < $this->num_data_rows; ++$row) {
             $record = 1;                                    // Skip record #0 (data label)
 
@@ -3906,5 +3906,5 @@
             // Draw the bars
             $oldv = 0;
-            for ($idx = 0; $record < $this->num_recs[$row]; $record++, $idx++) {
+            for ($idx = 0; $record < $this->num_recs[$row]; $record++, ++$idx) {
                 if (is_numeric($this->data[$row][$record])) {       // Allow for missing Y data
 
Index: /trunk/workflow/inc/class.Paging.inc.php
===================================================================
--- /trunk/workflow/inc/class.Paging.inc.php	(revision 795)
+++ /trunk/workflow/inc/class.Paging.inc.php	(revision 7655)
@@ -124,5 +124,5 @@
 			$end = min($start + $this->itemsPerPage, $totalItems);
 			$this->items = array();
-			for ($i = $start; $i < $end; $i++)
+			for ($i = $start; $i < $end; ++$i)
 				$this->items[] = $pItems[$i];
 		}
@@ -147,5 +147,5 @@
 		$charSeparator = empty($this->newRequest) ? "" : "&amp;";
 
-		for ($i = 0; $i < $this->numberOfPages; $i++)
+		for ($i = 0; $i < $this->numberOfPages; ++$i)
 		{
 			$page = $i;
@@ -178,5 +178,5 @@
 		$firstPage = max(0, $this->currentPage - $numberOfLinks);
 		$lastPage = min($this->currentPage + $numberOfLinks, $this->numberOfPages);
-		for ($i = $firstPage; $i < $lastPage; $i++)
+		for ($i = $firstPage; $i < $lastPage; ++$i)
 			$output[] = $allPaginationResults[$i];
 
@@ -225,5 +225,5 @@
 		}
 
-		for ($i = 0; $i < count($paginationLinks); $i++)
+		for ($i = 0; $i < count($paginationLinks); ++$i)
 		{
 			$tmp = $paginationLinks[$i];
Index: /trunk/workflow/inc/class.ui_orgchart.inc.php
===================================================================
--- /trunk/workflow/inc/class.ui_orgchart.inc.php	(revision 3255)
+++ /trunk/workflow/inc/class.ui_orgchart.inc.php	(revision 7655)
@@ -152,7 +152,7 @@
 
 			$ldap = &Factory::getInstance('WorkflowLDAP');
-			for ($i = 0; $i < count($output); $i++)
+			for ($i = 0; $i < count($output); ++$i)
 			{
-				for ($j = 0; $j < $result->_numOfFields; $j++)
+				for ($j = 0; $j < $result->_numOfFields; ++$j)
 					unset($output[$i][$j]);
 				if ($output[$i]['titular_funcionario_id'] != '')
@@ -162,5 +162,5 @@
 					$supervisorArray = explode(' ', $supervisor);
 					$supervisorName = '';
-					for ($j = 0; $j < count($supervisorArray); $j++)
+					for ($j = 0; $j < count($supervisorArray); ++$j)
 						$supervisorName .= (($j == 0) || ($j == count($supervisorArray) - 1)) ? $supervisorArray[$j] . ' ' : $supervisorArray[$j][0] . '. ';
 					$supervisorName = trim(str_replace("Junior", "Jr", $supervisorName));
Index: /trunk/expressoMail1_2/index.php
===================================================================
--- /trunk/expressoMail1_2/index.php	(revision 7625)
+++ /trunk/expressoMail1_2/index.php	(revision 7655)
@@ -238,5 +238,5 @@
     // gera paramero com tokens suportados ....
     $var_tokens = '';
-    for($ii = 1; $ii < 11; $ii++)
+    for($ii = 1; $ii < 11; ++$ii)
     {
         if($GLOBALS['phpgw_info']['server']['test_token' . $ii . '1'])
Index: /trunk/expressoMail1_2/login_offline.php
===================================================================
--- /trunk/expressoMail1_2/login_offline.php	(revision 5934)
+++ /trunk/expressoMail1_2/login_offline.php	(revision 7655)
@@ -196,5 +196,5 @@
 		$organizations = $obj_organization->organization_search($GLOBALS['phpgw_info']['server']['ldap_context']);
 		
-		for ($i=0; $i<count($organizations); $i++)
+		for ($i=0; $i<count($organizations); ++$i)
 		{
 			$tmp_array[strtolower($organizations[$i])] = $organizations[$i];	
Index: /trunk/expressoMail1_2/spell_checker/spell_checker.php
===================================================================
--- /trunk/expressoMail1_2/spell_checker/spell_checker.php	(revision 6057)
+++ /trunk/expressoMail1_2/spell_checker/spell_checker.php	(revision 7655)
@@ -211,5 +211,5 @@
 
 	//this loop looks through the words array and splits any lines of text that aren't html tags on space, preserving the spaces.
-	for($i=0; $i<$numResults; $i++){
+	for($i=0; $i<$numResults; ++$i){
 		// Words alternate between real words and html tags, starting with words.
 		if(($i & 1) == 0) // Even-numbered entries are word sets.
@@ -219,5 +219,5 @@
 			// Now go through each word and link up the misspelled ones.
 			$numWords = count($words[$i]);
-			for($j=0; $j<$numWords; $j++)
+			for($j=0; $j<$numWords; ++$j)
 			{
                                // $word = utf8_decode($words[$i][$j]);
@@ -242,5 +242,5 @@
                                             $words[$i][$j] = str_replace($tmpWord, "<span " . $onClick . " id=\"" . $varName . "_" . $misspelledCount . "_" . $tmpWord . "\" class=\"highlight\">" . stripslashes($tmpWord) . "</span>", $words[$i][$j]); 
 
-                                        $misspelledCount++;
+                                        ++$misspelledCount;
 
 				}
Index: /trunk/expressoMail1_2/spell_checker/cpaint/json.php
===================================================================
--- /trunk/expressoMail1_2/spell_checker/cpaint/json.php	(revision 3400)
+++ /trunk/expressoMail1_2/spell_checker/cpaint/json.php	(revision 7655)
@@ -126,5 +126,5 @@
           $s = '"';
                 
-          for ($i = 0; $i < $l; $i++) {
+          for ($i = 0; $i < $l; ++$i) {
             $c = $arg{$i};
                     
Index: /trunk/expressoMail1_2/spell_checker/cpaint/cpaint2.backend-debugger.php
===================================================================
--- /trunk/expressoMail1_2/spell_checker/cpaint/cpaint2.backend-debugger.php	(revision 3400)
+++ /trunk/expressoMail1_2/spell_checker/cpaint/cpaint2.backend-debugger.php	(revision 7655)
@@ -72,5 +72,5 @@
 	$scriptName = $_SERVER['SCRIPT_FILENAME'];
 	$fileLines = file($scriptName);
-	for ($i=0; $i < sizeof($fileLines); $i++) {
+	for ($i=0; $i < sizeof($fileLines); ++$i) {
 		$line = trim($fileLines[$i]);
 		if (substr($line, 0, 9) == "FUNCTION " || substr($line,0,9) == "function ") {
@@ -78,5 +78,5 @@
 		}		
 	}
-	for ($i = 0; $i < sizeof($match); $i++) {
+	for ($i = 0; $i < sizeof($match); ++$i) {
 		$line = str_replace("function ", "", $match[$i]);
 		$line = str_replace("FUNCTION ", "", $line);
Index: /trunk/expressoMail1_2/spell_checker/cpaint/cpaint2.inc.php
===================================================================
--- /trunk/expressoMail1_2/spell_checker/cpaint/cpaint2.inc.php	(revision 3400)
+++ /trunk/expressoMail1_2/spell_checker/cpaint/cpaint2.inc.php	(revision 7655)
@@ -846,5 +846,5 @@
 
       // now encode non-printable characters
-      for ($i = 0; $i < 32; $i++) {
+      for ($i = 0; $i < 32; ++$i) {
         $return_value = str_replace(chr($i), '\u00' . sprintf('%02x', $i), $return_value);
       } // end: for
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 .= ' - ';
 			
Index: /trunk/expressoMail1_2/controller.php
===================================================================
--- /trunk/expressoMail1_2/controller.php	(revision 7186)
+++ /trunk/expressoMail1_2/controller.php	(revision 7655)
@@ -16,5 +16,5 @@
  			$count_files = $_POST['countFiles'];
 			$array_files = array(); 		
- 			for($idx = 1; $idx <= $count_files; $idx++) { 		
+ 			for($idx = 1; $idx <= $count_files; ++$idx) {
  				if(array_key_exists('file_'.$idx , $_FILES) && $_FILES['file_'.$idx] && !$_FILES['file_'.$idx]['error'])
  					$array_files[] = $_FILES['file_'.$idx]; 					 
Index: /trunk/home.php
===================================================================
--- /trunk/home.php	(revision 6528)
+++ /trunk/home.php	(revision 7655)
@@ -109,5 +109,5 @@
         $user_apps = $GLOBALS['phpgw_info']['user']['apps']; 
         @reset($user_apps);     
-        for($i = 0; $i < count($default_apps);$i++) {
+        for($i = 0; $i < count($default_apps);++$i) {
                 if(array_key_exists($default_apps[$i], $user_apps)){
                         $sorted_apps[] = $default_apps[$i];
@@ -177,5 +177,5 @@
                                 print '</tr>';
                         }
-                        $idx++;
+                        ++$idx;
                         $neworder[] = $appname;
                 }
