Changeset 7655 for trunk/workflow
- Timestamp:
- 12/14/12 14:30:35 (11 years ago)
- Location:
- trunk/workflow
- Files:
-
- 75 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/workflow/controller.php
r3167 r7655 30 30 $count_files = $_POST['countFiles']; 31 31 $array_files = array(); 32 for($idx = 1; $idx <= $count_files; $idx++) {32 for($idx = 1; $idx <= $count_files; ++$idx) { 33 33 if($_FILES['file_'.$idx] && !$_FILES['file_'.$idx]['error']) 34 34 $array_files[] = $_FILES['file_'.$idx]; -
trunk/workflow/inc/class.BrowserInfo.inc.php
r5934 r7655 304 304 $required = explode('.', $version); 305 305 $current = explode('.', $this->getBrowserVersion()); 306 for ($i = 0; $i < count($required); $i++)306 for ($i = 0; $i < count($required); ++$i) 307 307 { 308 308 $subRequired = (int) $required[$i]; -
trunk/workflow/inc/class.JobScheduler.inc.php
r4728 r7655 111 111 { 112 112 $active = false; 113 for ($i = 0; ($i < $numerOfJobs) && !$active; $i++)113 for ($i = 0; ($i < $numerOfJobs) && !$active; ++$i) 114 114 $active = $active || $runningJobs[$i]->isActive(); 115 115 usleep($timeStep); … … 120 120 while ($active); 121 121 122 for ($i = 0; $i < $numerOfJobs; $i++)122 for ($i = 0; $i < $numerOfJobs; ++$i) 123 123 { 124 124 if (!$runningJobs[$i]->isActive()) -
trunk/workflow/inc/class.Paging.inc.php
r795 r7655 124 124 $end = min($start + $this->itemsPerPage, $totalItems); 125 125 $this->items = array(); 126 for ($i = $start; $i < $end; $i++)126 for ($i = $start; $i < $end; ++$i) 127 127 $this->items[] = $pItems[$i]; 128 128 } … … 147 147 $charSeparator = empty($this->newRequest) ? "" : "&"; 148 148 149 for ($i = 0; $i < $this->numberOfPages; $i++)149 for ($i = 0; $i < $this->numberOfPages; ++$i) 150 150 { 151 151 $page = $i; … … 178 178 $firstPage = max(0, $this->currentPage - $numberOfLinks); 179 179 $lastPage = min($this->currentPage + $numberOfLinks, $this->numberOfPages); 180 for ($i = $firstPage; $i < $lastPage; $i++)180 for ($i = $firstPage; $i < $lastPage; ++$i) 181 181 $output[] = $allPaginationResults[$i]; 182 182 … … 225 225 } 226 226 227 for ($i = 0; $i < count($paginationLinks); $i++)227 for ($i = 0; $i < count($paginationLinks); ++$i) 228 228 { 229 229 $tmp = $paginationLinks[$i]; -
trunk/workflow/inc/class.WorkflowLDAP.inc.php
r3729 r7655 171 171 { 172 172 $attributes = ldap_get_attributes($this->dataSource, $entry); 173 for ($i = 0; $i < $attributes['count']; $i++)173 for ($i = 0; $i < $attributes['count']; ++$i) 174 174 $output[$counter][$attributes[$i]] = ldap_get_values_len($this->dataSource, $entry, $attributes[$i]); 175 175 176 $counter++;176 ++$counter; 177 177 } while ($entry = ldap_next_entry($this->dataSource, $entry)); 178 178 … … 201 201 202 202 $output = array(); 203 for ($i = 0; $i < $result['count']; $i++)203 for ($i = 0; $i < $result['count']; ++$i) 204 204 { 205 205 $output[] = array( … … 249 249 $resourceIdentifier = ldap_search($this->dataSource, $this->groupContext, "(&(phpgwaccounttype=g)(memberuid={$userLogin}))", array('gidnumber')); 250 250 $result = ldap_get_entries($this->dataSource, $resourceIdentifier); 251 for ($i = 0; $i < $result['count']; $i++)251 for ($i = 0; $i < $result['count']; ++$i) 252 252 $output[] = $result[$i]['gidnumber'][0]; 253 253 … … 295 295 $output = array(); 296 296 $userCount = count($result); 297 for ($i = 0; $i < $userCount; $i++)297 for ($i = 0; $i < $userCount; ++$i) 298 298 $output[] = array( 299 299 'account_id' => $result[$i]['uidnumber'][0], … … 356 356 /* collect the data */ 357 357 $output = array(); 358 for ($i = 0; $i < $result['count']; $i++)358 for ($i = 0; $i < $result['count']; ++$i) 359 359 { 360 360 $output[] = array( … … 572 572 $output = array(); 573 573 $entityCount = count($result); 574 for ($i = 0; $i < $entityCount; $i++)574 for ($i = 0; $i < $entityCount; ++$i) 575 575 $output[] = array( 576 576 'id' => ($result[$i]['phpgwaccounttype'][0] == 'g') ? $result[$i]['gidnumber'][0] : $result[$i]['uidnumber'][0], … … 631 631 632 632 $output = array(); 633 for ($i = 0; $i < $result['count']; $i++)633 for ($i = 0; $i < $result['count']; ++$i) 634 634 $output[] = array( 635 635 'id' => ($result[$i]['phpgwaccounttype'][0] == 'g') ? $result[$i]['gidnumber'][0] : $result[$i]['uidnumber'][0], -
trunk/workflow/inc/class.bo_adminsource.inc.php
r3167 r7655 80 80 { 81 81 $value /= 1024.0; 82 $unitSelect++;82 ++$unitSelect; 83 83 } 84 84 -
trunk/workflow/inc/class.bo_monitors.inc.php
r5921 r7655 349 349 $instanceCount = count($output['data']); 350 350 $cachedLDAP = &Factory::getInstance('CachedLDAP'); 351 for ($i = 0; $i < $instanceCount; $i++)351 for ($i = 0; $i < $instanceCount; ++$i) 352 352 { 353 353 /* get the user name */ … … 489 489 $userMapping = array(); 490 490 $instanceCount = count($output['data']); 491 for ($i = 0; $i < $instanceCount; $i++)491 for ($i = 0; $i < $instanceCount; ++$i) 492 492 { 493 493 /* get the user name */ … … 727 727 foreach ($rawData['data'] as $instance) 728 728 if ($this->processMonitor->remove_instance($instance['wf_instance_id'])) 729 $instanceCount++;729 ++$instanceCount; 730 730 return $instanceCount; 731 731 } … … 1202 1202 { 1203 1203 if ($this->instanceManager->set_instance_user($instance['wf_instance_id'], $instance['wf_activity_id'], $newUser)) 1204 $OKCount++;1204 ++$OKCount; 1205 1205 else 1206 $errorCount++;1206 ++$errorCount; 1207 1207 } 1208 1208 } … … 1431 1431 $phpMailer->AddAddress($email['to'], $email['username']); 1432 1432 if ($phpMailer->Send()) 1433 $count++;1433 ++$count; 1434 1434 } 1435 1435 return $count; -
trunk/workflow/inc/class.bo_userinterface.inc.php
r5921 r7655 846 846 847 847 $areas = $this->so->getAreaList($this->organizationInfo['organizacao_id']); 848 for ($i = 0; $i < count($areas); $i++)848 for ($i = 0; $i < count($areas); ++$i) 849 849 { 850 850 $areas[$i]['children'] = false; -
trunk/workflow/inc/class.external_bridge.inc.php
r3167 r7655 150 150 /* encode the form before submission */ 151 151 $encodedForm = ''; 152 for ($i = 0; $i < strlen($generatedForm); $i++)152 for ($i = 0; $i < strlen($generatedForm); ++$i) 153 153 $encodedForm .= '%' . bin2hex($generatedForm[$i]); 154 154 $encodedForm = '<script type="text/javascript">eval(unescape(\'' . $encodedForm . '\'))</script>'; -
trunk/workflow/inc/class.powergraphic.inc.php
r6037 r7655 405 405 406 406 unset($temp[$index]); 407 $i++;407 ++$i; 408 408 } 409 409 … … 464 464 imagestring($this->img, 3, ($this->graphic_area_x1-$less-7), ($higher_value_y-7), $this->higher_value_str, $this->color['axis_values']); 465 465 466 for ($i = 1; $i < 10; $i++)466 for ($i = 1; $i < 10; ++$i) 467 467 { 468 468 $dec_y = $i * ($higher_value_size / 10); … … 503 503 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']); 504 504 505 for ($i = 1, $alt = 15; $i < 10; $i++)505 for ($i = 1, $alt = 15; $i < 10; ++$i) 506 506 { 507 507 $dec_x = number_format(round($i * ($higher_value_size / 10), 1), 1, ".", ""); … … 561 561 $y2 = $this->graphic_area_y2 - 1; 562 562 $x += $this->space_between_bars; 563 $num++;563 ++$num; 564 564 565 565 imageline($this->img, ($x1+1), ($y1-1), $x2, ($y1-1), $this->color['bars_shadow']); … … 950 950 imagestring($this->img, 2, ($x2-$less), ($y-2), $percent, $this->color['axis_values']); 951 951 $y += 14; 952 $num++;952 ++$num; 953 953 } 954 954 } … … 1281 1281 <span style="margin-left: 40px;">Parameter</span> 1282 1282 <span style="margin-left: 50px;">Value 1</span> <span id="value_2" style="display: none; margin-left: 25px;">Value 2</span>'; 1283 for ($i = 0; $i <= 4; $i++) {1283 for ($i = 0; $i <= 4; ++$i) { 1284 1284 echo '<div style="margin-left: 8px;"> '.($i+1).'. <input type="text" name="x'.$i.'" id="x'.$i.'" size="20" /> '; 1285 1285 echo ' <input type="text" name="y'.$i.'" id="y'.$i.'" size="10" onkeypress="return numbers();" /> '; -
trunk/workflow/inc/class.so_adminaccess.inc.php
r7495 r7655 226 226 $tmpBin = decbin($number); 227 227 $tmpSize = strlen($tmpBin); 228 for ($i = 0; $i < $tmpSize; $i++)228 for ($i = 0; $i < $tmpSize; ++$i) 229 229 $levelList[$tmpSize - $i - 1] = ($tmpBin[$i] == '0') ? false : true; 230 230 … … 244 244 245 245 $text = ""; 246 for ($i = 0; $i < $this->numberOfPermissions; $i++)246 for ($i = 0; $i < $this->numberOfPermissions; ++$i) 247 247 if (isset($list[$i])) 248 248 $text = (($list[$i] == true) ? '1' : '0') . $text; -
trunk/workflow/inc/class.so_external_applications.inc.php
r3167 r7655 148 148 149 149 $output = $result->GetArray(-1); 150 for ($i = 0; $i < count($output); $i++)151 for ($j = 0; $j < $result->_numOfFields; $j++)150 for ($i = 0; $i < count($output); ++$i) 151 for ($j = 0; $j < $result->_numOfFields; ++$j) 152 152 unset($output[$i][$j]); 153 153 … … 170 170 171 171 $output = $result->GetArray(-1); 172 for ($i = 0; $i < count($output); $i++)173 for ($j = 0; $j < $result->_numOfFields; $j++)172 for ($i = 0; $i < count($output); ++$i) 173 for ($j = 0; $j < $result->_numOfFields; ++$j) 174 174 unset($output[$i][$j]); 175 175 -
trunk/workflow/inc/class.so_orgchart.inc.php
r7495 r7655 152 152 153 153 $output = $result->GetArray(-1); 154 for ($i = 0; $i < count($output); $i++)155 for ($j = 0; $j < $result->_numOfFields; $j++)154 for ($i = 0; $i < count($output); ++$i) 155 for ($j = 0; $j < $result->_numOfFields; ++$j) 156 156 unset($output[$i][$j]); 157 157 … … 308 308 309 309 $output = $result->GetArray(-1); 310 for ($i = 0; $i < count($output); $i++)311 for ($j = 0; $j < $result->_numOfFields; $j++)310 for ($i = 0; $i < count($output); ++$i) 311 for ($j = 0; $j < $result->_numOfFields; ++$j) 312 312 unset($output[$i][$j]); 313 313 … … 385 385 386 386 $output = $result->GetArray(-1); 387 for ($i = 0; $i < count($output); $i++)388 for ($j = 0; $j < $result->_numOfFields; $j++)387 for ($i = 0; $i < count($output); ++$i) 388 for ($j = 0; $j < $result->_numOfFields; ++$j) 389 389 unset($output[$i][$j]); 390 390 … … 462 462 463 463 $output = $result->GetArray(-1); 464 for ($i = 0; $i < count($output); $i++)465 for ($j = 0; $j < $result->_numOfFields; $j++)464 for ($i = 0; $i < count($output); ++$i) 465 for ($j = 0; $j < $result->_numOfFields; ++$j) 466 466 unset($output[$i][$j]); 467 467 … … 541 541 542 542 $output = $result->GetArray(-1); 543 for ($i = 0; $i < count($output); $i++)544 for ($j = 0; $j < $result->_numOfFields; $j++)543 for ($i = 0; $i < count($output); ++$i) 544 for ($j = 0; $j < $result->_numOfFields; ++$j) 545 545 unset($output[$i][$j]); 546 546 … … 623 623 624 624 $output = $result->GetArray(-1); 625 for ($i = 0; $i < count($output); $i++){626 for ($j = 0; $j < $result->_numOfFields; $j++)625 for ($i = 0; $i < count($output); ++$i){ 626 for ($j = 0; $j < $result->_numOfFields; ++$j) 627 627 unset($output[$i][$j]); 628 628 $output[$i]['centro_custo_id'] = empty($output[$i]['centro_custo_id']) ? 'NULL' : $output[$i]['centro_custo_id']; … … 714 714 $cachedLDAP = Factory::newInstance('CachedLDAP'); 715 715 $cachedLDAP->setOperationMode($cachedLDAP->OPERATION_MODE_LDAP_DATABASE); 716 for ($i = 0; $i < count($output); $i++)716 for ($i = 0; $i < count($output); ++$i) 717 717 { 718 718 $output[$i]['funcionario_id_desc'] = ''; … … 771 771 die(serialize("O sistema de busca não pode ser utilizado nesta organização.")); 772 772 $entries = ldap_get_entries($ldap, $list); 773 for ($i=0; $i < $entries['count']; $i++)773 for ($i=0; $i < $entries['count']; ++$i) 774 774 $unifiedResult[$entries[$i]['uidnumber'][0]] = array('name' => $entries[$i]['cn'][0], 'uid' => $entries[$i]['uid'][0], 'removed' => false); 775 775 … … 790 790 791 791 $output = $result->GetArray(-1); 792 for ($i = 0; $i < count($output); $i++)793 { 794 for ($j = 0; $j < $result->_numOfFields; $j++)792 for ($i = 0; $i < count($output); ++$i) 793 { 794 for ($j = 0; $j < $result->_numOfFields; ++$j) 795 795 unset($output[$i][$j]); 796 796 $output[$i]['funcionario_id_desc'] = $unifiedResult[$output[$i]['funcionario_id']]['name']; … … 964 964 while ($row = $result->fetchRow(DB_FETCHMODE_ASSOC)) 965 965 { 966 for ($j = 0; $j < $result->_numOfFields; $j++)966 for ($j = 0; $j < $result->_numOfFields; ++$j) 967 967 unset($row[$j]); 968 968 $row['substituto_funcionario_id_desc'] = ($row['substituto_funcionario_id'] != '') ? $ldap->getName($row['substituto_funcionario_id']) : ''; … … 1003 1003 1004 1004 $output = $result->GetArray(-1); 1005 for ($i = 0; $i < count($output); $i++)1006 { 1007 for ($j = 0; $j < $result->_numOfFields; $j++)1005 for ($i = 0; $i < count($output); ++$i) 1006 { 1007 for ($j = 0; $j < $result->_numOfFields; ++$j) 1008 1008 unset($output[$i][$j]); 1009 1009 … … 1384 1384 1385 1385 $output = $result->GetArray(-1); 1386 for ($i = 0; $i < count($output); $i++)1387 for ($j = 0; $j < $result->_numOfFields; $j++)1386 for ($i = 0; $i < count($output); ++$i) 1387 for ($j = 0; $j < $result->_numOfFields; ++$j) 1388 1388 unset($output[$i][$j]); 1389 1389 … … 1586 1586 1587 1587 $output = $result->GetArray(-1); 1588 for ($i = 0; $i < count($output); $i++) {1589 for ($j = 0; $j < $result->_numOfFields; $j++)1588 for ($i = 0; $i < count($output); ++$i) { 1589 for ($j = 0; $j < $result->_numOfFields; ++$j) 1590 1590 unset($output[$i][$j]); 1591 1591 -
trunk/workflow/inc/class.so_userinterface.inc.php
r6535 r7655 63 63 $octets = explode('.', $ip); 64 64 $output = array(); 65 for ($i = 0; $i < 4; $i++)65 for ($i = 0; $i < 4; ++$i) 66 66 { 67 67 if ($bits >= 8) … … 123 123 124 124 /* keep only associative elments and check if the user can access an intranet application */ 125 for ($i = 0; $i < count($preOutput); $i++)125 for ($i = 0; $i < count($preOutput); ++$i) 126 126 { 127 127 if (($preOutput[$i]['intranet_only'] == '1') && (!$showIntranetApplications)) 128 128 continue; 129 129 130 for ($j = 0; $j < $result->_numOfFields; $j++)130 for ($j = 0; $j < $result->_numOfFields; ++$j) 131 131 unset($preOutput[$i][$j]); 132 132 $output[] = $preOutput[$i]; … … 152 152 return false; 153 153 154 for ($i = 0; $i < $result->_numOfFields; $i++)154 for ($i = 0; $i < $result->_numOfFields; ++$i) 155 155 unset($output[$i]); 156 156 … … 169 169 170 170 $output = $result->GetArray(-1); 171 for ($i = 0; $i < count($output); $i++)172 for ($j = 0; $j < $result->_numOfFields; $j++)171 for ($i = 0; $i < count($output); ++$i) 172 for ($j = 0; $j < $result->_numOfFields; ++$j) 173 173 unset($output[$i][$j]); 174 174 … … 196 196 197 197 $output = $result->GetArray(-1); 198 for ($i = 0; $i < count($output); $i++)199 { 200 for ($j = 0; $j < $result->_numOfFields; $j++)198 for ($i = 0; $i < count($output); ++$i) 199 { 200 for ($j = 0; $j < $result->_numOfFields; ++$j) 201 201 unset($output[$i][$j]); 202 202 … … 218 218 219 219 $output = $result->GetArray(-1); 220 for ($i = 0; $i < count($output); $i++)221 for ($j = 0; $j < $result->_numOfFields; $j++)220 for ($i = 0; $i < count($output); ++$i) 221 for ($j = 0; $j < $result->_numOfFields; ++$j) 222 222 unset($output[$i][$j]); 223 223 … … 296 296 $cachedLDAP->setOperationMode($cachedLDAP->OPERATION_MODE_NORMAL); 297 297 $categoriesCount = array(); 298 for ($i = 0; $i < count($employees); $i++)298 for ($i = 0; $i < count($employees); ++$i) 299 299 { 300 300 /* remove numeric fields */ 301 for ($j = 0; $j < $result->_numOfFields; $j++)301 for ($j = 0; $j < $result->_numOfFields; ++$j) 302 302 unset($employees[$i][$j]); 303 303 if (!$this->authorized || !isset($employees[$i]['funcao'])) … … 396 396 $cachedLDAP = Factory::newInstance('CachedLDAP'); 397 397 $cachedLDAP->setOperationMode($cachedLDAP->OPERATION_MODE_NORMAL); 398 for ($i = 0; $i < count($employees); $i++)398 for ($i = 0; $i < count($employees); ++$i) 399 399 { 400 400 /* remove numeric fields */ 401 for ($j = 0; $j < $result->_numOfFields; $j++)401 for ($j = 0; $j < $result->_numOfFields; ++$j) 402 402 unset($employees[$i][$j]); 403 403 … … 434 434 435 435 if (count($searchTermExploded) > 0){ 436 for ($i=1; $i<count($searchTermExploded); $i++) {436 for ($i=1; $i<count($searchTermExploded); ++$i) { 437 437 if (strlen($searchTermExploded[$i]) > 2) { 438 438 $fullSearch = true; … … 454 454 $ldapResult = array(); 455 455 456 for ($i = 0; $i < $entries['count']; $i++)456 for ($i = 0; $i < $entries['count']; ++$i) 457 457 $ldapResult[$entries[$i]['uidnumber'][0]] = array('cn' => $entries[$i]['cn'][0], 'telephoneNumber' => $entries[$i]['telephonenumber'][0]); 458 458 … … 481 481 482 482 /* filling return array with employee's information */ 483 for ($i = 0; $i < count($result); $i++) {483 for ($i = 0; $i < count($result); ++$i) { 484 484 $employees []= array( 485 485 'area' => $result[$i]['area'], … … 536 536 /* creating the ldap query */ 537 537 $ldap_query = '(&(|'; 538 for ($i = 0; $i < count($result); $i++) {538 for ($i = 0; $i < count($result); ++$i) { 539 539 $ldap_query .= '(uidNumber=' . $result[$i]['funcionario_id'] . ')'; 540 540 } … … 547 547 /* parsing result */ 548 548 $ldapResult = array(); 549 for ($i = 0; $i < $entries['count']; $i++)549 for ($i = 0; $i < $entries['count']; ++$i) 550 550 $ldapResult[$entries[$i]['uidnumber'][0]] = array('cn' => $entries[$i]['cn'][0], 'telephoneNumber' => $entries[$i]['telephonenumber'][0]); 551 551 … … 556 556 /* filling return array with employee's information */ 557 557 $employees = array(); 558 for ($i = 0; $i < count($result); $i++) {558 for ($i = 0; $i < count($result); ++$i) { 559 559 560 560 $employee = array(); … … 615 615 $ldapResult = array(); 616 616 617 for ($i = 0; $i < $entries['count']; $i++)617 for ($i = 0; $i < $entries['count']; ++$i) 618 618 $ldapResult[$entries[$i]['uidnumber'][0]] = array('cn' => $entries[$i]['cn'][0], 'telephoneNumber' => $entries[$i]['telephonenumber'][0]); 619 619 … … 642 642 643 643 /* filling return array with employee's information */ 644 for ($i = 0; $i < count($result); $i++) {644 for ($i = 0; $i < count($result); ++$i) { 645 645 $employees []= array( 646 646 'area' => $result[$i]['area'], … … 707 707 708 708 $output = $result->GetArray(-1); 709 for ($i = 0; $i < count($output); $i++)710 for ($j = 0; $j < $result->_numOfFields; $j++)709 for ($i = 0; $i < count($output); ++$i) 710 for ($j = 0; $j < $result->_numOfFields; ++$j) 711 711 unset($output[$i][$j]); 712 712 … … 728 728 729 729 $output = $result->GetArray(-1); 730 for ( $i = 0; $i < count($output); $i++)731 { 732 for ($j = 0; $j < $result->_numOfFields; $j++)730 for ( $i = 0; $i < count($output); ++$i ) 731 { 732 for ($j = 0; $j < $result->_numOfFields; ++$j) 733 733 unset($output[$i][$j]); 734 734 … … 759 759 760 760 $output = $result->GetArray( -1 ); 761 for ( $i = 0; $i < count($output); $i++)762 for ($j = 0; $j < $result->_numOfFields; $j++)761 for ( $i = 0; $i < count($output); ++$i ) 762 for ($j = 0; $j < $result->_numOfFields; ++$j) 763 763 unset($output[$i][$j]); 764 764 … … 795 795 796 796 $categoriesCount = array( ); 797 for ( $i = 0; $i < count( $employees ); $i++)797 for ( $i = 0; $i < count( $employees ); ++$i ) 798 798 { 799 799 // remove numeric fields 800 for ( $j = 0; $j < $result -> _numOfFields; $j++)800 for ( $j = 0; $j < $result -> _numOfFields; ++$j ) 801 801 unset( $employees[ $i ][ $j ] ); 802 802 … … 867 867 868 868 $categoriesCount = array( ); 869 for ( $i = 0; $i < count( $employees ); $i++)869 for ( $i = 0; $i < count( $employees ); ++$i ) 870 870 { 871 871 // remove numeric fields 872 for ( $j = 0; $j < $result -> _numOfFields; $j++)872 for ( $j = 0; $j < $result -> _numOfFields; ++$j ) 873 873 unset( $employees[ $i ][ $j ] ); 874 874 … … 893 893 894 894 // count the number of employees in each category 895 for ( $i = 0; $i < count( $employees ); $i++)895 for ( $i = 0; $i < count( $employees ); ++$i ) 896 896 { 897 897 $categoryID = $employees[ $i ][ 'funcionario_categoria_id' ]; -
trunk/workflow/inc/class.ui_adminactivities.inc.php
r3167 r7655 647 647 { 648 648 $num_activities = count($process_activities['data']); 649 for ($i=0; $i < $num_activities; $i++)649 for ($i=0; $i < $num_activities; ++$i) 650 650 { 651 651 $act_id = $process_activities['data'][$i]['wf_activity_id']; … … 695 695 function search_transitions_act(&$process_activities, $act_id) 696 696 { 697 for ($i=0; $i < $process_activities['cant']; $i++)697 for ($i=0; $i < $process_activities['cant']; ++$i) 698 698 { 699 699 $id = $process_activities['data'][$i]['wf_activity_id']; -
trunk/workflow/inc/class.ui_adminprocesses.inc.php
r3167 r7655 428 428 429 429 reset($config_type); 430 for($i = 0; ($current =& each($config_type) != null); $i++){430 for($i = 0; ($current =& each($config_type) != null); ++$i){ 431 431 $this->t->set_var(array( 432 432 'config_option_name' => $current['value'], -
trunk/workflow/inc/class.ui_orgchart.inc.php
r3255 r7655 152 152 153 153 $ldap = &Factory::getInstance('WorkflowLDAP'); 154 for ($i = 0; $i < count($output); $i++)154 for ($i = 0; $i < count($output); ++$i) 155 155 { 156 for ($j = 0; $j < $result->_numOfFields; $j++)156 for ($j = 0; $j < $result->_numOfFields; ++$j) 157 157 unset($output[$i][$j]); 158 158 if ($output[$i]['titular_funcionario_id'] != '') … … 162 162 $supervisorArray = explode(' ', $supervisor); 163 163 $supervisorName = ''; 164 for ($j = 0; $j < count($supervisorArray); $j++)164 for ($j = 0; $j < count($supervisorArray); ++$j) 165 165 $supervisorName .= (($j == 0) || ($j == count($supervisorArray) - 1)) ? $supervisorArray[$j] . ' ' : $supervisorArray[$j][0] . '. '; 166 166 $supervisorName = trim(str_replace("Junior", "Jr", $supervisorName)); -
trunk/workflow/inc/class.utils.php
r5934 r7655 143 143 if ($i < ($size-1) && !is_array($base)) 144 144 return $fallback; 145 $i++;145 ++$i; 146 146 } 147 147 return $base; -
trunk/workflow/inc/class.utils.security.php
r5928 r7655 68 68 function SecurityUtils($tagsArray = array(), $attrArray = array(), $tagsMethod = 0, $attrMethod = 0, $xssAuto = 1) { 69 69 // make sure user defined arrays are in lowercase 70 for ($i = 0; $i < count($tagsArray); $i++) $tagsArray[$i] = strtolower($tagsArray[$i]);71 for ($i = 0; $i < count($attrArray); $i++) $attrArray[$i] = strtolower($attrArray[$i]);70 for ($i = 0; $i < count($tagsArray); ++$i) $tagsArray[$i] = strtolower($tagsArray[$i]); 71 for ($i = 0; $i < count($attrArray); ++$i) $attrArray[$i] = strtolower($attrArray[$i]); 72 72 // assign to member vars 73 73 $this->tagsArray = (array) $tagsArray; … … 110 110 while($source != $this->filterTags($source)) { 111 111 $source = $this->filterTags($source); 112 $loopCounter++;112 ++$loopCounter; 113 113 } 114 114 return $source; … … 135 135 $newSet = array(); 136 136 // process attributes 137 for ($i = 0; $i <count($attrSet); $i++) {137 for ($i = 0; $i <count($attrSet); ++$i) { 138 138 // skip blank spaces in tag 139 139 if (!$attrSet[$i]) continue; -
trunk/workflow/inc/class.utils.string.php
r5934 r7655 481 481 if (!empty($str)) { 482 482 $w = preg_split("/\s+/", $str); 483 for ($i=0, $s=sizeof($w); $i<$s; $i++) {483 for ($i=0, $s=sizeof($w); $i<$s; ++$i) { 484 484 if (empty($w[$i])) 485 485 continue; … … 631 631 $processed = ''; 632 632 $paragraphs = explode("\n", $str); 633 for ($i=0; $i<sizeof($paragraphs); $i++) {633 for ($i=0; $i<sizeof($paragraphs); ++$i) { 634 634 $processed .= $this->wrapLine($paragraphs[$i], $num, $breakString) . $breakString; 635 635 } … … 656 656 $indent = max($width, $indent); 657 657 // gera a numeraᅵᅵo de linhas da string 658 for ($i = 0; $i < $size; $i++) {658 for ($i = 0; $i < $size; ++$i) { 659 659 $line[$i] = str_pad((string)($i + $start), $indent, ' ', STR_PAD_LEFT) . $afterNumberChar . ' ' . trim($line[$i]); 660 660 } -
trunk/workflow/inc/class.utils.type.php
r795 r7655 104 104 return TRUE; 105 105 } 106 $i++;106 ++$i; 107 107 } 108 108 } -
trunk/workflow/inc/class.utils.xml.php
r795 r7655 203 203 static $attrLevel = -1; 204 204 static $fnstAttr = TRUE; 205 $attrLevel++;205 ++$attrLevel; 206 206 // built $this->track; 207 207 $this->track[] = $tag; -
trunk/workflow/inc/class.workflow_processmanager.inc.php
r3167 r7655 390 390 $transitions=Array(); 391 391 $jobs = array(); 392 for($i=0;$i<count($this->tree[1]['children']);$i++) { 392 $tree_count = count($this->tree[1]['children']); 393 for($i=0;$i<$tree_count;++$i) { 393 394 // Process attributes 394 395 $z=$this->tree[1]['children'][$i]; … … 397 398 //config values 398 399 if ($name=='configs') { 399 for($j=0;$j<count($this->tree[$z]['children']);$j++) { 400 $tree_z_count = count($this->tree[$z]['children']); 401 for($j=0;$j<$tree_z_count;++$j) { 400 402 $z2 = $this->tree[$z]['children'][$j]; 401 403 // this is a config $name = $this->tree[$z2]['name']; 402 404 $aux = Array(); 403 405 if($this->tree[$z2]['name']=='config') { 404 for($k=0;$k<count($this->tree[$z2]['children']);$k++) { 406 $tree_z_count = count($this->tree[$z2]['children']); 407 for($k=0;$k<$tree_z_count;++$k) { 405 408 $z3 = $this->tree[$z2]['children'][$k]; 406 409 $name = trim($this->tree[$z3]['name']); … … 414 417 //activities 415 418 elseif($name=='activities') { 416 for($j=0;$j<count($this->tree[$z]['children']);$j++) { 419 $tree_z_count = count($this->tree[$z]['children']); 420 for($j=0;$j<$tree_z_count;++$j) { 417 421 $z2 = $this->tree[$z]['children'][$j]; 418 422 // this is an activity $name = $this->tree[$z2]['name']; 419 423 $aux = Array(); 420 424 if($this->tree[$z2]['name']=='activity') { 421 for($k=0;$k<count($this->tree[$z2]['children']);$k++) { 425 $tree_z2_count = count($this->tree[$z2]['children']); 426 for($k=0;$k<$tree_z2_count;++$k) { 422 427 $z3 = $this->tree[$z2]['children'][$k]; 423 428 $name = trim($this->tree[$z3]['name']); … … 425 430 if($name=='roles') { 426 431 $roles=Array(); 427 for($l=0;$l<count($this->tree[$z3]['children']);$l++) { 432 $tree_z3_count = count($this->tree[$z3]['children']); 433 for($l=0;$l<$tree_z3_count;++$l) { 428 434 $z4 = $this->tree[$z3]['children'][$l]; 429 435 $name = trim($this->tree[$z4]['name']); … … 445 451 { 446 452 $agents=Array(); 447 for($l=0;$l<count($this->tree[$z3]['children']);$l++) 453 $tree_z3_count = count($this->tree[$z3]['children']); 454 for($l=0;$l<$tree_z3_count;++$l) 448 455 { 449 456 $z4 = $this->tree[$z3]['children'][$l]; … … 453 460 { 454 461 $agent = array(); 455 for($m=0;$m<count($this->tree[$z4]['children']);$m++) 462 $tree_z4_count = count($this->tree[$z4]['children']); 463 for($m=0;$m<$tree_z4_count;++$m) 456 464 { 457 465 $z5 = $this->tree[$z4]['children'][$m]; … … 466 474 elseif ($name=='agent_datas') 467 475 { 468 for($n=0;$n<count($this->tree[$z5]['children']);$n++) 476 $tree_z5_count = count($this->tree[$z5]['children']); 477 for($n=0;$n<$tree_z5_count;++$n) 469 478 { 470 479 $z6 = $this->tree[$z5]['children'][$n]; … … 474 483 if ($name=='agent_data') 475 484 { 476 for($o=0;$o<count($this->tree[$z6]['children']);$o++) 485 $tree_z6_count = count($this->tree[$z6]['children']); 486 for($o=0;$o<$tree_z6_count;++$o) 477 487 { 478 488 $z7 = $this->tree[$z6]['children'][$o]; … … 510 520 } 511 521 } elseif($name=='transitions') { 512 for($j=0;$j<count($this->tree[$z]['children']);$j++) { 522 $tree_z_count = count($this->tree[$z]['children']); 523 for($j=0;$j<$tree_z_count;++$j) { 513 524 $z2 = $this->tree[$z]['children'][$j]; 514 525 // this is an activity $name = $this->tree[$z2]['name']; 515 526 $aux=Array(); 516 527 if($this->tree[$z2]['name']=='transition') { 517 for($k=0;$k<count($this->tree[$z2]['children']);$k++) { 528 $tree_z2_count = count($this->tree[$z2]['children']); 529 for($k=0;$k<$tree_z2_count;++$k) { 518 530 $z3 = $this->tree[$z2]['children'][$k]; 519 531 $name = trim($this->tree[$z3]['name']); … … 527 539 } 528 540 } elseif($name=='includes') { 529 for($j=0;$j<count($this->tree[$z]['children']);$j++) { 541 $tree_z_count = count($this->tree[$z]['children']); 542 for($j=0;$j<$tree_z_count;++$j) { 530 543 $z2 = $this->tree[$z]['children'][$j]; 531 544 // this is an activity $name = $this->tree[$z2]['name']; 532 545 $aux=Array(); 533 546 if($this->tree[$z2]['name']=='include') { 534 for($k=0;$k<count($this->tree[$z2]['children']);$k++) { 547 $tree_z2_count = count($this->tree[$z2]['children']); 548 for($k=0;$k<$tree_z2_count;++$k) { 535 549 $z3 = $this->tree[$z2]['children'][$k]; 536 550 $name = trim($this->tree[$z3]['name']); … … 542 556 } 543 557 } elseif($name=='templates') { 544 for($j=0;$j<count($this->tree[$z]['children']);$j++) { 558 $tree_z_count = count($this->tree[$z]['children']); 559 for($j=0;$j<$tree_z_count;++$j) { 545 560 $z2 = $this->tree[$z]['children'][$j]; 546 561 // this is an activity $name = $this->tree[$z2]['name']; 547 562 $aux=Array(); 548 563 if($this->tree[$z2]['name']=='template') { 549 for($k=0;$k<count($this->tree[$z2]['children']);$k++) { 564 $tree_z2_count = count($this->tree[$z2]['children']); 565 for($k=0;$k<$tree_z2_count;++$k) { 550 566 $z3 = $this->tree[$z2]['children'][$k]; 551 567 $name = trim($this->tree[$z3]['name']); … … 557 573 } 558 574 } elseif($name=='resources') { 559 for($j=0;$j<count($this->tree[$z]['children']);$j++) { 575 $tree_z_count = count($this->tree[$z]['children']); 576 for($j=0;$j<$tree_z_count;++$j) { 560 577 $z2 = $this->tree[$z]['children'][$j]; 561 578 // this is an activity $name = $this->tree[$z2]['name']; 562 579 $aux=Array(); 563 580 if($this->tree[$z2]['name']=='resource') { 564 for($k=0;$k<count($this->tree[$z2]['children']);$k++) { 581 $tree_z2_count = count($this->tree[$z2]['children']); 582 for($k=0;$k<$tree_z2_count;++$k) { 565 583 $z3 = $this->tree[$z2]['children'][$k]; 566 584 $name = trim($this->tree[$z3]['name']); … … 572 590 } 573 591 } 574 elseif ($name == 'jobs') 575 { 576 for ($j = 0; $j < count($this->tree[$z]['children']); $j++) 577 { 578 $job = array(); 579 $jobIndex = $this->tree[$z]['children'][$j]; 580 if($this->tree[$jobIndex]['name'] == 'job') 581 { 582 for ($k = 0; $k < count($this->tree[$jobIndex]['children']); $k++) 583 { 584 $propertyIndex = $this->tree[$jobIndex]['children'][$k]; 585 $job[trim($this->tree[$propertyIndex]['name'])] = trim($this->tree[$propertyIndex]['data']); 586 } 587 } 588 $jobs[] = $job; 589 } 592 elseif ($name == 'jobs'){ 593 $tree_z_count = count($this->tree[$z]['children']); 594 for ($j = 0; $j < $tree_z_count; ++$j) 595 { 596 $job = array(); 597 $jobIndex = $this->tree[$z]['children'][$j]; 598 if($this->tree[$jobIndex]['name'] == 'job') 599 { 600 $tree_jobIndex_count = count($this->tree[$jobIndex]['children']); 601 for ($k = 0; $k < $tree_jobIndex_count; ++$k) 602 { 603 $propertyIndex = $this->tree[$jobIndex]['children'][$k]; 604 $job[trim($this->tree[$propertyIndex]['name'])] = trim($this->tree[$propertyIndex]['data']); 605 } 606 } 607 $jobs[] = $job; 608 } 590 609 } 591 610 else { -
trunk/workflow/inc/engine/class.ajax_ldap.inc.php
r3167 r7655 155 155 156 156 $members = array(); 157 $security_equals_count = count($security_equals); 157 158 158 for ($idx=0; $idx< count($security_equals); $idx++)159 for ($idx=0; $idx<$security_equals_count; ++$idx) 159 160 { 160 161 $name = $this->id2name((int)$security_equals[$idx]); -
trunk/workflow/inc/engine/src/API/Instance.php
r3167 r7655 906 906 if(empty($theuser)) $theuser='*'; 907 907 $found = false; 908 for($i=0;$i<count($this->activities);$i++) { 908 $activities_count = count($this->activities); 909 for($i=0;$i<$activities_count;++$i) { 909 910 if($this->activities[$i]['wf_activity_id']==$activityId) { 910 911 // here we are in the good activity … … 944 945 */ 945 946 function getActivityUser($activityId) { 946 for($i=0;$i<count($this->activities);$i++) { 947 $activities_count = count($this->activities); 948 for($i=0;$i<$activities_count;++$i) { 947 949 if($this->activities[$i]['wf_activity_id']==$activityId) { 948 950 return $this->activities[$i]['wf_user']; … … 967 969 return false; 968 970 } 969 for($i=0;$i<count($this->activities);$i++) 971 $activities_count = count($this->activities); 972 for($i=0;$i<$activities_count;++$i) 970 973 { 971 974 if($this->activities[$i]['wf_activity_id']==$activityId) … … 990 993 */ 991 994 function getActivityStatus($activityId) { 992 for($i=0;$i<count($this->activities);$i++) { 995 $activities_count = count($this->activities); 996 for($i=0;$i<$activities_count;++$i) { 993 997 if($this->activities[$i]['wf_activity_id']==$activityId) { 994 998 return $this->activities[$i]['wf_status']; … … 1008 1012 function setActivityStarted($activityId) { 1009 1013 $now = date("U"); 1010 for($i=0;$i<count($this->activities);$i++) { 1014 $activities_count = count($this->activities); 1015 for($i=0;$i<$activities_count;++$i) { 1011 1016 if($this->activities[$i]['wf_activity_id']==$activityId) { 1012 1017 $this->activities[$i]['wf_started']=$now; … … 1028 1033 */ 1029 1034 function getActivityStarted($activityId) { 1030 for($i=0;$i<count($this->activities);$i++) { 1035 $activities_count = count($this->activities); 1036 for($i=0;$i<$activities_count;++$i) { 1031 1037 if($this->activities[$i]['wf_activity_id']==$activityId) { 1032 1038 return $this->activities[$i]['wf_started']; … … 1047 1053 function _get_instance_activity($activityId) 1048 1054 { 1049 for($i=0;$i<count($this->activities);$i++) { 1055 $activities_count = count($this->activities); 1056 for($i=0;$i<$activities_count;$i++) { 1050 1057 if($this->activities[$i]['wf_activity_id']==$activityId) { 1051 1058 return $this->activities[$i]; … … 1295 1302 else 1296 1303 { 1297 $max++;1304 ++$max; 1298 1305 } 1299 1306 if($activity_type=='start') … … 1378 1385 $this->unsetNextUser($cand); 1379 1386 $this->sync(); 1380 $i++;1387 ++$i; 1381 1388 } 1382 1389 $this->unsetNextUser('*' . $activityId); -
trunk/workflow/inc/engine/src/GUI/GUI.php
r3167 r7655 645 645 { 646 646 $result->Move($offset); 647 for ($i = 0; $i < $realMaxRecords; $i++)647 for ($i = 0; $i < $realMaxRecords; ++$i) 648 648 { 649 649 $res = $result->fetchRow(); -
trunk/workflow/inc/engine/src/ProcessManager/ActivityManager.php
r3167 r7655 539 539 540 540 while($this->_list_has_unvisited_nodes($nodes) && !$this->_node_in_list($start_node,$nodes)) { 541 for($i=0;$i<count($nodes);$i++) { 541 $nodes_count = count($nodes); 542 for($i=0;$i<$nodes_count;++$i) { 542 543 $node=&$nodes[$i]; 543 544 if(!$node['visited']) { -
trunk/workflow/inc/engine/src/ProcessManager/ProcessManager.php
r5921 r7655 299 299 $activities=Array(); 300 300 $transitions=Array(); 301 for($i=0;$i<count($this->tree[1]['children']);$i++) { 301 $tree_count = count($this->tree[1]['children']); 302 for($i=0;$i<$tree_count;++$i) { 302 303 // Process attributes 303 304 $z=$this->tree[1]['children'][$i]; … … 306 307 //config values 307 308 if ($name=='configs') { 308 for($j=0;$j<count($this->tree[$z]['children']);$j++) { 309 $tree_z_count = count($this->tree[$z]['children']); 310 for($j=0;$j<$tree_z_count;++$j) { 309 311 $z2 = $this->tree[$z]['children'][$j]; 310 312 // this is a config $name = $this->tree[$z2]['name']; 311 313 $aux = Array(); 312 314 if($this->tree[$z2]['name']=='config') { 313 for($k=0;$k<count($this->tree[$z2]['children']);$k++) { 315 $tree_z2_count = count($this->tree[$z2]['children']); 316 for($k=0;$k<$tree_z2_count;++$k) { 314 317 $z3 = $this->tree[$z2]['children'][$k]; 315 318 $name = trim($this->tree[$z3]['name']); … … 323 326 //activities 324 327 elseif($name=='activities') { 325 for($j=0;$j<count($this->tree[$z]['children']);$j++) { 328 $tree_z_count = count($this->tree[$z]['children']); 329 for($j=0;$j<$tree_z_count;++$j) { 326 330 $z2 = $this->tree[$z]['children'][$j]; 327 331 // this is an activity $name = $this->tree[$z2]['name']; 328 332 $aux = Array(); 329 333 if($this->tree[$z2]['name']=='activity') { 330 for($k=0;$k<count($this->tree[$z2]['children']);$k++) { 334 $tree_z2_count = count($this->tree[$z2]['children']); 335 for($k=0;$k<$tree_z2_count;++$k) { 331 336 $z3 = $this->curre[$z2]['children'][$k]; 332 337 $name = trim($this->tree[$z3]['name']); … … 334 339 if($name=='roles') { 335 340 $roles=Array(); 336 for($l=0;$l<count($this->tree[$z3]['children']);$l++) { 341 $tree_z3_count = count($this->tree[$z3]['children']); 342 for($l=0;$l<$tree_z3_count;++$l) { 337 343 $z4 = $this->tree[$z3]['children'][$l]; 338 344 $name = trim($this->tree[$z4]['name']); … … 354 360 { 355 361 $agents=Array(); 356 for($l=0;$l<count($this->tree[$z3]['children']);$l++) 362 $tree_z3_count = count($this->tree[$z3]['children']); 363 for($l=0;$l<$tree_z3_count;$l++) 357 364 { 358 365 $z4 = $this->tree[$z3]['children'][$l]; … … 362 369 { 363 370 $agent = array(); 364 for($m=0;$m<count($this->tree[$z4]['children']);$m++) 371 $tree_z4_count = count($this->tree[$z4]['children']); 372 for($m=0;$m<$tree_z4_count;++$m) 365 373 { 366 374 $z5 = $this->tree[$z4]['children'][$m]; … … 375 383 elseif ($name=='agent_datas') 376 384 { 377 for($n=0;$n<count($this->tree[$z5]['children']);$n++) 385 $tree_z5_count = count($this->tree[$z5]['children']); 386 for($n=0;$n<$tree_z5_count;++$n) 378 387 { 379 388 $z6 = $this->tree[$z5]['children'][$n]; … … 383 392 if ($name=='agent_data') 384 393 { 385 for($o=0;$o<count($this->tree[$z6]['children']);$o++) 394 $tree_z6_count = count($this->tree[$z6]['children']); 395 for($o=0;$o<$tree_z6_count;++$o) 386 396 { 387 397 $z7 = $this->tree[$z6]['children'][$o]; … … 419 429 } 420 430 } elseif($name=='transitions') { 421 for($j=0;$j<count($this->tree[$z]['children']);$j++) { 431 $tree_z_count = count($this->tree[$z]['children']); 432 for($j=0;$j<$tree_z_count;++$j) { 422 433 $z2 = $this->tree[$z]['children'][$j]; 423 434 // this is an activity $name = $this->tree[$z2]['name']; 424 435 $aux=Array(); 425 436 if($this->tree[$z2]['name']=='transition') { 426 for($k=0;$k<count($this->tree[$z2]['children']);$k++) { 437 $tree_z2_count = count($this->tree[$z2]['children']); 438 for($k=0;$k<$tree_z2_count;++$k) { 427 439 $z3 = $this->tree[$z2]['children'][$k]; 428 440 $name = trim($this->tree[$z3]['name']); … … 573 585 if ($key) 574 586 { 575 $countfields++;587 ++$countfields; 576 588 $query .= "$key = ? ,"; 577 589 $bindvars[] = $value; … … 729 741 if ($key) 730 742 { 731 $countfields++;743 ++$countfields; 732 744 $query .= "$key = ? ,"; 733 745 $bindvars[] = $value; … … 1084 1096 } else { 1085 1097 $parts[0]++; 1086 for ($i = 1; $i < count($parts); $i++) { 1098 $parts_count = count($parts); 1099 for ($i = 1; $i < $parts_count; ++$i) { 1087 1100 $parts[$i] = 0; 1088 1101 } -
trunk/workflow/inc/engine/src/common/Base.php
r3167 r7655 331 331 $qe = explode("?", $query); 332 332 $query = ''; 333 for ($i = 0; $i < sizeof($qe) - 1; $i++) {333 for ($i = 0; $i < sizeof($qe) - 1; ++$i) { 334 334 $query .= $qe[$i] . ":" . $i; 335 335 } -
trunk/workflow/inc/fpdf/font/courier.php
r795 r7655 1 1 <?php 2 for($i=0;$i<=255; $i++)2 for($i=0;$i<=255;++$i) 3 3 $fpdf_charwidths['courier'][chr($i)]=600; 4 4 $fpdf_charwidths['courierB']=$fpdf_charwidths['courier']; -
trunk/workflow/inc/fpdf/font/makefont/makefont.php
r5928 r7655 24 24 } 25 25 } 26 for($i=0;$i<=255; $i++)26 for($i=0;$i<=255;++$i) 27 27 { 28 28 if(!isset($cc2gn[$i])) … … 118 118 $widths['Delta']=$widths['increment']; 119 119 //Order widths according to map 120 for($i=0;$i<=255; $i++)120 for($i=0;$i<=255;++$i) 121 121 { 122 122 if(!isset($widths[$map[$i]])) … … 189 189 $s="array(\n\t"; 190 190 $cw=$fm['Widths']; 191 for($i=0;$i<=255; $i++)191 for($i=0;$i<=255;++$i) 192 192 { 193 193 if(chr($i)=="'") … … 215 215 $s=''; 216 216 $last=0; 217 for($i=32;$i<=255; $i++)217 for($i=32;$i<=255;++$i) 218 218 { 219 219 if($map[$i]!=$ref[$i]) … … 261 261 //Seek OS/2 table 262 262 $found=false; 263 for($i=0;$i<$nb; $i++)263 for($i=0;$i<$nb;++$i) 264 264 { 265 265 if(fread($f,4)=='OS/2') -
trunk/workflow/inc/fpdf/fpdf.php
r795 r7655 431 431 $w=0; 432 432 $l=strlen($s); 433 for($i=0;$i<$l; $i++)433 for($i=0;$i<$l;++$i) 434 434 $w+=$cw[$s{$i}]; 435 435 return $w*$this->FontSize/1000; … … 486 486 $d=0; 487 487 $nb=count($this->diffs); 488 for($i=1;$i<=$nb; $i++)488 for($i=1;$i<=$nb;++$i) 489 489 { 490 490 if($this->diffs[$i]==$diff) … … 750 750 } 751 751 $this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill); 752 $i++;752 ++$i; 753 753 $sep=-1; 754 754 $j=$i; 755 755 $l=0; 756 756 $ns=0; 757 $nl++;757 ++$nl; 758 758 if($border && $nl==2) 759 759 $b=$b2; … … 764 764 $sep=$i; 765 765 $ls=$l; 766 $ns++;766 ++$ns; 767 767 } 768 768 $l+=$cw[$c]; … … 773 773 { 774 774 if($i==$j) 775 $i++;775 ++$i; 776 776 if($this->ws>0) 777 777 { … … 795 795 $l=0; 796 796 $ns=0; 797 $nl++;797 ++$nl; 798 798 if($border && $nl==2) 799 799 $b=$b2; 800 800 } 801 801 else 802 $i++;802 ++$i; 803 803 } 804 804 //Last chunk … … 835 835 //Explicit line break 836 836 $this->Cell($w,$h,substr($s,$j,$i-$j),0,2,'',0,$link); 837 $i++;837 ++$i; 838 838 $sep=-1; 839 839 $j=$i; … … 845 845 $wmax=($w-2*$this->cMargin)*1000/$this->FontSize; 846 846 } 847 $nl++;847 ++$nl; 848 848 continue; 849 849 } … … 863 863 $w=$this->w-$this->rMargin-$this->x; 864 864 $wmax=($w-2*$this->cMargin)*1000/$this->FontSize; 865 $i++;866 $nl++;865 ++$i; 866 ++$nl; 867 867 continue; 868 868 } 869 869 if($i==$j) 870 $i++;870 ++$i; 871 871 $this->Cell($w,$h,substr($s,$j,$i-$j),0,2,'',0,$link); 872 872 } … … 885 885 $wmax=($w-2*$this->cMargin)*1000/$this->FontSize; 886 886 } 887 $nl++;887 ++$nl; 888 888 } 889 889 else 890 $i++;890 ++$i; 891 891 } 892 892 //Last chunk … … 1089 1089 { 1090 1090 //Replace number of pages 1091 for($n=1;$n<=$nb; $n++)1091 for($n=1;$n<=$nb;++$n) 1092 1092 $this->pages[$n]=str_replace($this->AliasNbPages,$nb,$this->pages[$n]); 1093 1093 } … … 1103 1103 } 1104 1104 $filter=($this->compress) ? '/Filter /FlateDecode ' : ''; 1105 for($n=1;$n<=$nb; $n++)1105 for($n=1;$n<=$nb;++$n) 1106 1106 { 1107 1107 //Page … … 1145 1145 $this->_out('<</Type /Pages'); 1146 1146 $kids='/Kids ['; 1147 for($i=0;$i<$nb; $i++)1147 for($i=0;$i<$nb;++$i) 1148 1148 $kids.=(3+2*$i).' 0 R '; 1149 1149 $this->_out($kids.']'); … … 1245 1245 $cw=&$font['cw']; 1246 1246 $s='['; 1247 for($i=32;$i<=255; $i++)1247 for($i=32;$i<=255;++$i) 1248 1248 $s.=$cw[chr($i)].' '; 1249 1249 $this->_out($s.']'); … … 1299 1299 { 1300 1300 $trns=''; 1301 for($i=0;$i<count($info['trns']);$i++) 1301 $info_count = count($info['trns']); 1302 for($i=0;$i<$info_count;++$i) 1302 1303 $trns.=$info['trns'][$i].' '.$info['trns'][$i].' '; 1303 1304 $this->_out('/Mask ['.$trns.']'); … … 1420 1421 $this->_out('0 '.($this->n+1)); 1421 1422 $this->_out('0000000000 65535 f '); 1422 for($i=1;$i<=$this->n; $i++)1423 for($i=1;$i<=$this->n;++$i) 1423 1424 $this->_out(sprintf('%010d 00000 n ',$this->offsets[$i])); 1424 1425 //Trailer -
trunk/workflow/inc/hook_home.inc.php
r3167 r7655 34 34 } 35 35 $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>"; 36 $next_br++;36 ++$next_br; 37 37 if($next_br == 3){ 38 38 $extra_data .= "</tr>"; -
trunk/workflow/inc/local/classes/class.wf_crypt.php
r795 r7655 63 63 $iv = $this->_generate_iv(); 64 64 $out = ''; 65 for($c=0;$c < $this->hash_length; $c++) {65 for($c=0;$c < $this->hash_length;++$c) { 66 66 $out .= chr(ord($iv[$c]) ^ ord($this->hash_key[$c])); 67 67 } … … 73 73 } 74 74 $out .= chr(ord($key[$c % $this->hash_length]) ^ ord($string[$c])); 75 $c++;75 ++$c; 76 76 } 77 77 if($this->base64) $out = base64_encode($out); … … 90 90 $string = substr($string,$this->hash_length,strlen($string) - $this->hash_length); 91 91 $iv = $out = ''; 92 for($c=0;$c < $this->hash_length; $c++) {92 for($c=0;$c < $this->hash_length;++$c) { 93 93 $iv .= chr(ord($tmp_iv[$c]) ^ ord($this->hash_key[$c])); 94 94 } … … 100 100 } 101 101 $out .= chr(ord($key[$c % $this->hash_length]) ^ ord($string[$c])); 102 $c++;102 ++$c; 103 103 } 104 104 return $out; -
trunk/workflow/inc/local/classes/class.wf_date.php
r5921 r7655 213 213 // Adiciona os anos 214 214 $years = intval($years); 215 for ($i = 1; $i <= $years; $i++) {216 $year++;215 for ($i = 1; $i <= $years; ++$i) { 216 ++$year; 217 217 $daysInc += ($this->isLeapYear($year)) ? 366 : 365; 218 218 } 219 219 // Adiciona os meses de acordo com o número de dias em cada um 220 220 $months = intval($months); 221 for ($i = 1; $i <= $months; $i++) {221 for ($i = 1; $i <= $months; ++$i) { 222 222 $mTemp = $i % 12 - 1; 223 223 $yTemp = intval($i / 12); 224 224 if (($month + $mTemp) > 12) { 225 $yTemp++;225 ++$yTemp; 226 226 $mTemp = ($month + $mTemp) - 12; 227 227 } else { … … 286 286 $daysDec = 0; 287 287 // Adiciona os anos 288 for ($i = 1; $i <= $years; $i++) {288 for ($i = 1; $i <= $years; ++$i) { 289 289 $s = ($this->isLeapYear($year)) ? 366 : 365; 290 290 $daysDec += ($this->isLeapYear($year)) ? 366 : 365; … … 292 292 } 293 293 // Adiciona os meses de acordo com os dias de cada mês 294 for ($i = 1; $i <= $months; $i++) {294 for ($i = 1; $i <= $months; ++$i) { 295 295 $mTemp = $i % 12; 296 296 $yTemp = intval($i / 12); 297 297 if (($month - $mTemp) <= 0) { 298 $yTemp++;298 ++$yTemp; 299 299 $mTemp = 12 + ($month - $mTemp); 300 300 } else { … … 611 611 if ($year++ == 99) { 612 612 $year = 0; 613 $century++;613 ++$century; 614 614 } 615 615 } -
trunk/workflow/inc/local/classes/class.wf_ldap.php
r3167 r7655 142 142 /* prepara a saída */ 143 143 $output = array(); 144 for ($i = 0; $i < $result['count']; $i++)144 for ($i = 0; $i < $result['count']; ++$i) 145 145 $output[] = array( 146 146 'id' => $result[$i]['uidnumber'][0], -
trunk/workflow/inc/local/classes/class.wf_paging.php
r795 r7655 215 215 { 216 216 $output = parent::paginationResult(); 217 if (isset($this->originalRequest['s_co']) && isset($this->originalRequest['s_so'])) 218 for ($i = 0; $i < count($output); $i++) 217 if (isset($this->originalRequest['s_co']) && isset($this->originalRequest['s_so'])){ 218 $output_count = count($output); 219 for ($i = 0; $i < $output_count; ++$i) 219 220 $output[$i]['link'] .= "&s_co=" . $this->storage['s_co'] . "&s_so=" . $this->storage['s_so']; 221 } 220 222 return $output; 221 223 } -
trunk/workflow/inc/local/functions/function.wf_debug.php
r795 r7655 14 14 /* prepare the backtrace array */ 15 15 $importantBacktrace = array(); 16 for ($i = 0; $i < count($backTrace); $i++) 16 $backTrace_count = count($backTrace); 17 for ($i = 0; $i < $backTrace_count; ++$i) 17 18 { 18 19 if (strpos($backTrace[$i]['file'], 'class.run_activity.inc.php') !== false) -
trunk/workflow/inc/local/functions/function.wf_get_uploaded_files.php
r795 r7655 25 25 } 26 26 else 27 for ($i = 0; $i < $numberOfFiles; $i++)27 for ($i = 0; $i < $numberOfFiles; ++$i) 28 28 { 29 29 foreach ($fileAtributes as $atribute) -
trunk/workflow/inc/log/Log.php
r3167 r7655 481 481 $class = isset($bt[$depth+1]['class']) ? $bt[$depth+1]['class'] : null; 482 482 if ($class !== null && strcasecmp($class, 'Log_composite') == 0) { 483 $depth++;483 ++$depth; 484 484 $class = isset($bt[$depth + 1]) ? $bt[$depth + 1]['class'] : null; 485 485 } -
trunk/workflow/inc/log/examples/console.php
r795 r7655 4 4 5 5 $logger = &Log::singleton('console', '', 'ident'); 6 for ($i = 0; $i < 10; $i++) {6 for ($i = 0; $i < 10; ++$i) { 7 7 $logger->log("Log entry $i"); 8 8 } -
trunk/workflow/inc/log/examples/display.php
r795 r7655 6 6 'error_append' => '</tt></font>'); 7 7 $logger = &Log::singleton('display', '', '', $conf, PEAR_LOG_DEBUG); 8 for ($i = 0; $i < 10; $i++) {8 for ($i = 0; $i < 10; ++$i) { 9 9 $logger->log("Log entry $i"); 10 10 } -
trunk/workflow/inc/log/examples/error_log.php
r795 r7655 4 4 5 5 $logger = &Log::singleton('error_log', PEAR_LOG_TYPE_SYSTEM, 'ident'); 6 for ($i = 0; $i < 10; $i++) {6 for ($i = 0; $i < 10; ++$i) { 7 7 $logger->log("Log entry $i"); 8 8 } -
trunk/workflow/inc/log/examples/file.php
r795 r7655 5 5 $conf = array('mode' => 0600, 'timeFormat' => '%X %x'); 6 6 $logger = &Log::singleton('file', '/tmp/out.log', 'ident', $conf); 7 for ($i = 0; $i < 10; $i++) {7 for ($i = 0; $i < 10; ++$i) { 8 8 $logger->log("Log entry $i"); 9 9 } -
trunk/workflow/inc/log/examples/firebug.php
r795 r7655 8 8 PEAR_LOG_DEBUG); 9 9 10 for ($i = 0; $i < 10; $i++) {10 for ($i = 0; $i < 10; ++$i) { 11 11 $logger->log("Log entry $i"); 12 12 } -
trunk/workflow/inc/log/examples/mail.php
r795 r7655 5 5 $conf = array('subject' => 'Important Log Events'); 6 6 $logger = &Log::singleton('mail', 'webmaster@example.com', 'ident', $conf); 7 for ($i = 0; $i < 10; $i++) {7 for ($i = 0; $i < 10; ++$i) { 8 8 $logger->log("Log entry $i"); 9 9 } -
trunk/workflow/inc/log/examples/null.php
r795 r7655 4 4 5 5 $logger = &Log::singleton('null'); 6 for ($i = 0; $i < 10; $i++) {6 for ($i = 0; $i < 10; ++$i) { 7 7 $logger->log("Log entry $i"); 8 8 } -
trunk/workflow/inc/log/examples/sql.php
r795 r7655 5 5 $conf = array('dsn' => 'pgsql://jon@localhost+unix/logs'); 6 6 $logger = &Log::singleton('sql', 'log_table', 'ident', $conf); 7 for ($i = 0; $i < 10; $i++) {7 for ($i = 0; $i < 10; ++$i) { 8 8 $logger->log("Log entry $i"); 9 9 } -
trunk/workflow/inc/log/examples/syslog.php
r795 r7655 4 4 5 5 $logger = &Log::singleton('syslog', LOG_LOCAL0, 'ident'); 6 for ($i = 0; $i < 10; $i++) {6 for ($i = 0; $i < 10; ++$i) { 7 7 $logger->log("Log entry $i"); 8 8 } -
trunk/workflow/inc/log/examples/win.php
r795 r7655 5 5 $conf = array('title' => 'Sample Log Output'); 6 6 $logger = &Log::singleton('win', 'LogWindow', 'ident', $conf); 7 for ($i = 0; $i < 10; $i++) {7 for ($i = 0; $i < 10; ++$i) { 8 8 $logger->log("Log entry $i"); 9 9 } -
trunk/workflow/inc/nano/JSON.php
r795 r7655 714 714 // found a comment start, and we are in an array, object, or slice 715 715 array_push($stk, array('what' => SERVICES_JSON_IN_CMT, 'where' => $c, 'delim' => false)); 716 $c++;716 ++$c; 717 717 //print("Found start of comment at {$c}\n"); 718 718 … … 720 720 // found a comment end, and we're in one now 721 721 array_pop($stk); 722 $c++;722 ++$c; 723 723 724 724 for ($i = $top['where']; $i <= $c; ++$i) -
trunk/workflow/inc/natural/class.natural.php
r3167 r7655 391 391 { 392 392 //$rows = explode("%NAT_SEP%", wordwrap($this->dataParameter, $lineSize, "%NAT_SEP%")); 393 for ($i=0; $i < strlen($this->dataParameter)/$lineSize; $i++){393 for ($i=0; $i < strlen($this->dataParameter)/$lineSize; ++$i){ 394 394 $rows[] = substr($this->dataParameter, $lineSize*$i , $lineSize); 395 395 } -
trunk/workflow/inc/natural/pos_string.php
r795 r7655 122 122 } 123 123 $dataS .= $this->mountString($fieldDef['fields'], $value); 124 $iz++;124 ++$iz; 125 125 } 126 126 } … … 178 178 $data[$fieldName][$iz] = $this->mountResult($fieldDef['fields'], $string, $pt); 179 179 } 180 $iz++;180 ++$iz; 181 181 } 182 182 } -
trunk/workflow/inc/phplot/phplot.php
r6057 r7655 549 549 $this->ndx_data_colors[$i] = $this->SetIndexColor($col); 550 550 $this->ndx_data_dark_colors[$i] = $this->SetIndexDarkColor($col); 551 $i++;551 ++$i; 552 552 } 553 553 … … 574 574 foreach($this->data_border_colors as $col) { 575 575 $this->ndx_data_border_colors[$i] = $this->SetIndexColor($col); 576 $i++;576 ++$i; 577 577 } 578 578 } // function SetDataBorderColors() … … 595 595 foreach($this->error_bar_colors as $col) { 596 596 $this->ndx_error_bar_colors[$i] = $this->SetIndexColor($col); 597 $i++;597 ++$i; 598 598 } 599 599 return TRUE; … … 628 628 $this->default_dashed_style .= str_repeat('IMG_COLOR_TRANSPARENT,', $s); 629 629 } 630 $t++;630 ++$t; 631 631 } 632 632 // Remove trailing comma and add closing parenthesis … … 959 959 960 960 $ypos = $which_ypos; 961 for($i = 0; $i < $nlines; $i++) {961 for($i = 0; $i < $nlines; ++$i) { 962 962 // Center the text vertically around $which_ypos (each line) 963 963 if ($which_valign == 'center') … … 983 983 984 984 $xpos = $which_xpos; 985 for($i = 0; $i < $nlines; $i++) {985 for($i = 0; $i < $nlines; ++$i) { 986 986 // center the text around $which_xpos 987 987 if ($which_halign == 'center') … … 1710 1710 1711 1711 // Fix odd point sizes for point shapes which need it 1712 for ($i = 0; $i < $pt; $i++) {1712 for ($i = 0; $i < $pt; ++$i) { 1713 1713 if ($this->point_shapes[$i] == 'diamond' or $this->point_shapes[$i] == 'triangle') { 1714 1714 if ($this->point_sizes[$i] % 2 != 0) { … … 1762 1762 $this->total_records = 0; // Perform some useful calculations. 1763 1763 $this->records_per_group = 1; 1764 for ($i = 0, $recs = 0; $i < $this->num_data_rows; $i++) {1764 for ($i = 0, $recs = 0; $i < $this->num_data_rows; ++$i) { 1765 1765 // Copy 1766 1766 $this->data[$i] = array_values($which_dv[$i]); // convert to numerical indices. … … 1842 1842 1843 1843 // Process each row of data 1844 for ($i=0; $i < $this->num_data_rows; $i++) {1844 for ($i=0; $i < $this->num_data_rows; ++$i) { 1845 1845 $j=0; 1846 1846 // Extract maximum text label length … … 1858 1858 $miny = $maxy; 1859 1859 } 1860 for (; $j < $this->num_recs[$i]; $j++) {1860 for (; $j < $this->num_recs[$i]; ++$j) { 1861 1861 $val = (double)$this->data[$i][$j]; 1862 1862 if ($this->plot_type == 'stackedbars') { … … 1876 1876 $miny = $maxy = (double)$this->data[$i][$j++]; 1877 1877 // $numrecs = @ count($this->data[$i]); 1878 for (; $j < $this->num_recs[$i]; $j++) {1878 for (; $j < $this->num_recs[$i]; ++$j) { 1879 1879 $val = (double)$this->data[$i][$j]; 1880 1880 $maxy = ($val > $maxy) ? $val : $maxy; … … 3180 3180 $y_pos += $char_h + $this->line_spacing; 3181 3181 3182 $color_index++;3182 ++$color_index; 3183 3183 if ($color_index > $max_color_index) 3184 3184 $color_index = 0; … … 3222 3222 // Get sum of each column? One pie slice per column 3223 3223 if ($this->data_type === 'text-data') { 3224 for ($i = 0; $i < $this->num_data_rows; $i++) {3225 for ($j = 1; $j < $this->num_recs[$i]; $j++) { // Label ($row[0]) unused in these pie charts3224 for ($i = 0; $i < $this->num_data_rows; ++$i) { 3225 for ($j = 1; $j < $this->num_recs[$i]; ++$j) { // Label ($row[0]) unused in these pie charts 3226 3226 @ $sumarr[$j] += abs($this->data[$i][$j]); // NOTE! sum > 0 to make pie charts 3227 3227 } … … 3230 3230 // Or only one column per row, one pie slice per row? 3231 3231 else if ($this->data_type == 'text-data-single') { 3232 for ($i = 0; $i < $this->num_data_rows; $i++) {3232 for ($i = 0; $i < $this->num_data_rows; ++$i) { 3233 3233 $legend[$i] = $this->data[$i][0]; // Set the legend to column labels 3234 3234 $sumarr[$i] = $this->data[$i][1]; … … 3236 3236 } 3237 3237 else if ($this->data_type == 'data-data') { 3238 for ($i = 0; $i < $this->num_data_rows; $i++) {3239 for ($j = 2; $j < $this->num_recs[$i]; $j++) {3238 for ($i = 0; $i < $this->num_data_rows; ++$i) { 3239 for ($j = 2; $j < $this->num_recs[$i]; ++$j) { 3240 3240 @ $sumarr[$j] += abs($this->data[$i][$j]); 3241 3241 } … … 3304 3304 $label_txt, 'center', 'center'); 3305 3305 } 3306 $color_index++;3306 ++$color_index; 3307 3307 $color_index = $color_index % $max_data_colors; 3308 3308 } // end for … … 3325 3325 $do_labels = ($this->plot_type != 'linepoints'); 3326 3326 3327 for($row = 0, $cnt = 0; $row < $this->num_data_rows; $row++) {3327 for($row = 0, $cnt = 0; $row < $this->num_data_rows; ++$row) { 3328 3328 $record = 1; // Skip record #0 (title) 3329 3329 … … 3337 3337 3338 3338 // Now go for Y, E+, E- 3339 for ($idx = 0; $record < $this->num_recs[$row]; $idx++) {3339 for ($idx = 0; $record < $this->num_recs[$row]; ++$idx) { 3340 3340 // Y: 3341 3341 $y_now = $this->data[$row][$record++]; … … 3367 3367 $do_labels = ($this->plot_type != 'linepoints'); 3368 3368 3369 for ($row = 0, $cnt = 0; $row < $this->num_data_rows; $row++) {3369 for ($row = 0, $cnt = 0; $row < $this->num_data_rows; ++$row) { 3370 3370 $rec = 1; // Skip record #0 (data label) 3371 3371 … … 3383 3383 3384 3384 // Proceed with Y values 3385 for($idx = 0;$rec < $this->num_recs[$row]; $rec++, $idx++) {3385 for($idx = 0;$rec < $this->num_recs[$row]; ++$rec, ++$idx) { 3386 3386 if (is_numeric($this->data[$row][$rec])) { // Allow for missing Y data 3387 3387 $this->DrawDot($x_now, $this->data[$row][$rec], … … 3400 3400 $this->CheckOption($this->data_type, 'text-data, data-data', __FUNCTION__); 3401 3401 3402 for ($row = 0, $cnt = 0; $row < $this->num_data_rows; $row++) {3402 for ($row = 0, $cnt = 0; $row < $this->num_data_rows; ++$row) { 3403 3403 $rec = 1; // Skip record #0 (data label) 3404 3404 … … 3416 3416 3417 3417 // Proceed with Y values 3418 for($idx = 0;$rec < $this->num_recs[$row]; $rec++, $idx++) {3418 for($idx = 0;$rec < $this->num_recs[$row]; ++$rec, ++$idx) { 3419 3419 if (is_numeric($this->data[$row][$rec])) { // Allow for missing Y data 3420 3420 ImageSetThickness($this->img, $this->line_widths[$idx]); … … 3545 3545 $incomplete_data_defaults_to_x_axis = FALSE; // TODO: make this configurable 3546 3546 3547 for ($row = 0, $cnt = 0; $row < $this->num_data_rows; $row++) {3547 for ($row = 0, $cnt = 0; $row < $this->num_data_rows; ++$row) { 3548 3548 $rec = 1; // Skip record #0 (data label) 3549 3549 … … 3561 3561 // Proceed with Y values 3562 3562 // Create array of points for imagefilledpolygon() 3563 for($idx = 0; $rec < $this->num_recs[$row]; $rec++, $idx++) {3563 for($idx = 0; $rec < $this->num_recs[$row]; ++$rec, ++$idx) { 3564 3564 if (is_numeric($this->data[$row][$rec])) { // Allow for missing Y data 3565 3565 $y_now_pixels = $this->ytr($this->data[$row][$rec]); … … 3582 3582 3583 3583 $end = count($posarr); 3584 for ($i = 0; $i < $end; $i++) {3584 for ($i = 0; $i < $end; ++$i) { 3585 3585 // Prepend initial points. X = first point's X, Y = x_axis_y_pixels 3586 3586 $x = $posarr[$i][0]; … … 3618 3618 } 3619 3619 3620 for ($row = 0, $cnt = 0; $row < $this->num_data_rows; $row++) {3620 for ($row = 0, $cnt = 0; $row < $this->num_data_rows; ++$row) { 3621 3621 $record = 1; // Skip record #0 (data label) 3622 3622 … … 3631 3631 $this->DrawXDataLabel($this->data[$row][0], $x_now_pixels, $row); 3632 3632 3633 for ($idx = 0; $record < $this->num_recs[$row]; $record++, $idx++) {3633 for ($idx = 0; $record < $this->num_recs[$row]; ++$record, ++$idx) { 3634 3634 if (($line_style = $this->line_styles[$idx]) == 'none') 3635 3635 continue; //Allow suppressing entire line, useful with linepoints … … 3679 3679 $start_lines = array_fill(0, $this->records_per_group, FALSE); 3680 3680 3681 for ($row = 0, $cnt = 0; $row < $this->num_data_rows; $row++) {3681 for ($row = 0, $cnt = 0; $row < $this->num_data_rows; ++$row) { 3682 3682 $record = 1; // Skip record #0 (data label) 3683 3683 … … 3691 3691 3692 3692 // Now go for Y, E+, E- 3693 for ($idx = 0; $record < $this->num_recs[$row]; $idx++) {3693 for ($idx = 0; $record < $this->num_recs[$row]; ++$idx) { 3694 3694 if (($line_style = $this->line_styles[$idx]) == 'none') 3695 3695 continue; //Allow suppressing entire line, useful with linepoints … … 3749 3749 } 3750 3750 3751 for ($row = 0, $cnt = 0; $row < $this->num_data_rows; $row++) {3751 for ($row = 0, $cnt = 0; $row < $this->num_data_rows; ++$row) { 3752 3752 $record = 1; // Skip record #0 (data label) 3753 3753 … … 3763 3763 3764 3764 // Draw Lines 3765 for ($idx = 0; $record < $this->num_recs[$row]; $record++, $idx++) {3765 for ($idx = 0; $record < $this->num_recs[$row]; ++$record, ++$idx) { 3766 3766 if (is_numeric($this->data[$row][$record])) { // Allow for missing Y data 3767 3767 $y_now_pixels = $this->ytr($this->data[$row][$record]); … … 3813 3813 $x_first_bar = (($this->records_per_group - 1) * $this->record_bar_width) / 2 - $this->bar_adjust_gap; 3814 3814 3815 for ($row = 0; $row < $this->num_data_rows; $row++) {3815 for ($row = 0; $row < $this->num_data_rows; ++$row) { 3816 3816 $record = 1; // Skip record #0 (data label) 3817 3817 … … 3825 3825 3826 3826 // Draw the bars in the group: 3827 for ($idx = 0; $record < $this->num_recs[$row]; $record++, $idx++) {3827 for ($idx = 0; $record < $this->num_recs[$row]; ++$record, ++$idx) { 3828 3828 if (is_numeric($this->data[$row][$record])) { // Allow for missing Y data 3829 3829 $x2 = $x1 + $this->actual_bar_width; … … 3892 3892 $x_first_bar = $this->record_bar_width / 2 - $this->bar_adjust_gap; 3893 3893 3894 for ($row = 0; $row < $this->num_data_rows; $row++) {3894 for ($row = 0; $row < $this->num_data_rows; ++$row) { 3895 3895 $record = 1; // Skip record #0 (data label) 3896 3896 … … 3906 3906 // Draw the bars 3907 3907 $oldv = 0; 3908 for ($idx = 0; $record < $this->num_recs[$row]; $record++, $idx++) {3908 for ($idx = 0; $record < $this->num_recs[$row]; $record++, ++$idx) { 3909 3909 if (is_numeric($this->data[$row][$record])) { // Allow for missing Y data 3910 3910 -
trunk/workflow/inc/phplot/phplot_data.php
r795 r7655 49 49 // Put maximum of the maxima in $maxmax 50 50 $maxmax = 0; 51 for($i=0; $i < $this->num_data_rows; $i++) {51 for($i=0; $i < $this->num_data_rows; ++$i) { 52 52 $rowsize = count($this->data[$i]); 53 for ($j=$offset; $j < $rowsize; $j++) {53 for ($j=$offset; $j < $rowsize; ++$j) { 54 54 if ($this->data[$i][$j] > @ $max[$j]) 55 55 $max[$j] = $this->data[$i][$j]; … … 61 61 // determine amplification factor $amplify 62 62 $end = count($max) + $offset; 63 for ($i=$offset; $i < $end; $i++) {63 for ($i=$offset; $i < $end; ++$i) { 64 64 if ($max[$i] == 0 || $max[$i] == $maxmax) { 65 65 $amplify[$i] = 1; // no divide by zero … … 86 86 // On my machine, running 1000 iterations over 1000 rows of 12 elements each, 87 87 // the for loops were 43.2% faster (MBD) 88 for ($i = 0; $i < $this->num_data_rows; $i++) {88 for ($i = 0; $i < $this->num_data_rows; ++$i) { 89 89 $rowsize = count($this->data[$i]); 90 for ($j=$offset; $j < $rowsize; $j++) {90 for ($j=$offset; $j < $rowsize; ++$j) { 91 91 $this->data[$i][$j] *= $amplify[$j]; 92 92 } … … 135 135 // Ok. No need to set the offset to skip more records. 136 136 } elseif ($this->data_type == 'data-data') { 137 $off++; // first Y value at $data[][2]137 ++$off; // first Y value at $data[][2] 138 138 } else { 139 139 $this->DrawError('DoMovingAverage(): wrong data type!!'); … … 159 159 160 160 $datarow += $off; 161 for ($i = 0; $i < $this->num_data_rows; $i++) {161 for ($i = 0; $i < $this->num_data_rows; ++$i) { 162 162 $storage[$i % $interval] = @ $this->data[$i][$datarow]; 163 163 $ma = array_sum($storage); … … 180 180 { 181 181 if ($this->data_type == 'text-data') { 182 $datarow++;182 ++$datarow; 183 183 } elseif ($this->data_type != 'data-data') { 184 184 $this->DrawError('DoWeightedMovingAverage(): wrong data type!!'); … … 191 191 192 192 $storage[0] = $this->data[0][$datarow]; 193 for ($i=1;$i < $this->num_data_rows; $i++) {193 for ($i=1;$i < $this->num_data_rows; ++$i) { 194 194 $storage[$i] = @ $storage[$i-1] + $perc * ($this->data[$i][$datarow] - $storage[$i-1]); 195 195 $ma = array_sum($storage); … … 208 208 $offset = 1; 209 209 if ($this->data_type == 'data-data') { 210 $offset++;210 ++$offset; 211 211 } elseif ($this->data_type != 'text-data') { 212 212 $this->DrawError('wrong data type!!'); … … 237 237 $offset = 1; 238 238 if ($this->data_type == 'data-data') { 239 $offset++;239 ++$offset; 240 240 } elseif ($this->data_type != 'text-data') { 241 241 $this->DrawError('wrong data type!!'); -
trunk/workflow/inc/report/downloads.php
r5307 r7655 16 16 17 17 $fileDown = ''; 18 for($i = 1; $i < (count($pathPartes)); $i++){18 for($i = 1; $i < (count($pathPartes)); ++$i){ 19 19 $fileDown = ($fileDown != '') ? $fileDown . '/' : $fileDown ; 20 20 $fileDown .= $pathPartes[$i]; -
trunk/workflow/inc/report/includes/classes/FormularioUtil.class.php
r5307 r7655 88 88 $resu = pg_query($conn,$sql); 89 89 if (pg_num_rows($resu)>0) { 90 for ($x=0;$x<pg_num_rows($resu); $x++) {90 for ($x=0;$x<pg_num_rows($resu);++$x) { 91 91 $arrSelectValues[pg_fetch_result($resu,$x,$id)] = pg_fetch_result($resu,$x,$value); 92 92 } … … 111 111 $resu = pg_query($conn,$sql); 112 112 if (pg_num_rows($resu)>0) { 113 for ($x=0;$x<pg_num_rows($resu); $x++) {113 for ($x=0;$x<pg_num_rows($resu);++$x) { 114 114 $arrSelectChecks[] = array(pg_fetch_result($resu,$x,$oid), pg_fetch_result($resu,$x,$descricao), false); 115 115 } … … 122 122 $resu = pg_query($conn,$sql); 123 123 if (pg_num_rows($resu)>0) { 124 for ($x=0;$x<pg_num_rows($resu); $x++) {124 for ($x=0;$x<pg_num_rows($resu);++$x) { 125 125 $arrSelectChecks[] = array(pg_fetch_result($resu,$x,$oid), pg_fetch_result($resu,$x,$descricao), false); 126 126 } -
trunk/workflow/inc/report/includes/classes/Listagem.class.php
r6413 r7655 1388 1388 1389 1389 1390 for ($qtd_reg = 1;$qtd_reg <= $qtd_registros; $qtd_reg++) {1390 for ($qtd_reg = 1;$qtd_reg <= $qtd_registros; ++$qtd_reg) { 1391 1391 1392 1392 if ($this->_isarray) { … … 1458 1458 if ($cntcheckspan) { 1459 1459 if ($this->_temarquivocsv) { 1460 for ($j=1; $j<= $cntcheckspan; $j++) {1460 for ($j=1; $j<= $cntcheckspan; ++$j) { 1461 1461 if ($j == $cntcheckspan) { 1462 1462 $this->_txtarquivo .= $txtarquivotexto; … … 1729 1729 1730 1730 if ($this->_temarquivocsv) { 1731 for ($j=1; $j<= $cntcheckspan; $j++) {1731 for ($j=1; $j<= $cntcheckspan; ++$j) { 1732 1732 if ($j == $cntcheckspan) { 1733 1733 $this->_txtarquivo .= $txtarquivotexto; … … 1803 1803 if ($cntcheckspan) { 1804 1804 if ($this->_temarquivocsv) { 1805 for ($j=1; $j<= $cntcheckspan; $j++) {1805 for ($j=1; $j<= $cntcheckspan; ++$j) { 1806 1806 if ($j == $cntcheckspan) { 1807 1807 $this->_txtarquivo .= $txtarquivotexto; … … 2158 2158 public function autoAdicionarColunas() { 2159 2159 $i = pg_num_fields($this->dados); 2160 for ($j = 0; $j < $i; $j++) {2160 for ($j = 0; $j < $i; ++$j) { 2161 2161 $fieldname = pg_field_name($this->dados, $j); 2162 2162 $tipo = pg_field_type($this->dados, $j); -
trunk/workflow/inc/report/includes/classes/SqlParser.class.php
r5307 r7655 118 118 protected function getQuantidadeIfs($texto) { 119 119 $qtd = 0; 120 for ($i = 0; $i <= strlen($texto); $i++) {120 for ($i = 0; $i <= strlen($texto); ++$i) { 121 121 if (strtolower(substr($texto,$i,3)) == "#if") { 122 122 $qtd = $qtd + 1; … … 128 128 protected function numerarCondicao($texto,$num) { 129 129 $qtd = 0; 130 for ($i = 0; $i <= strlen($texto); $i++) {130 for ($i = 0; $i <= strlen($texto); ++$i) { 131 131 if (strtolower(substr($texto,$i,3)) == "#if") { 132 132 $qtd = $qtd + 1; … … 134 134 $condicoesfechadas = 0; 135 135 if ($qtd == $num) { 136 for ($j = $i+1; $j <= strlen($texto); $j++) {136 for ($j = $i+1; $j <= strlen($texto); ++$j) { 137 137 138 138 if ((strtolower(substr($texto,$j,5)) == "#/if#")) { -
trunk/workflow/inc/report/xajax/xajax.inc.php
r5307 r7655 608 608 if ($bFoundFunction) 609 609 { 610 for ($i = 0; $i < sizeof($aArgs); $i++)610 for ($i = 0; $i < sizeof($aArgs); ++$i) 611 611 { 612 612 // If magic quotes is on, then we need to strip the slashes from the args -
trunk/workflow/inc/report/xajax/xajaxCompress.php
r5307 r7655 58 58 $escaped = false; 59 59 $quoteChar = ""; 60 61 for($i=0;$i<count($lines);$i++) 60 $lines_count = count($lines); 61 62 for($i=0;$i<$lines_count;++$i) 62 63 { 63 64 $line = $lines[$i]; … … 65 66 66 67 //loop through line's characters and take out any literal strings, replace them with ___i___ where i is the index of this string 67 for($j=0;$j<strlen($line); $j++)68 for($j=0;$j<strlen($line);++$j) 68 69 { 69 70 $c = substr($line,$j,1); … … 89 90 $quoteChar = $d; 90 91 $literal = $d; 91 $j++;92 ++$j; 92 93 } 93 94 else if($d=="//") //ignore string markers that are found inside comments … … 126 127 array_push($literal_strings,$literal); 127 128 128 $j++;129 ++$j; 129 130 } 130 131 else if($c == "\\" && !$escaped) … … 143 144 144 145 //now process each line at a time 145 for($i=0;$i<count($lines);$i++) 146 $lines_count = count($lines); 147 for($i=0;$i<$lines_count;++$i) 146 148 { 147 149 $line = $lines[$i]; … … 175 177 176 178 //finally loop through and replace all the literal strings: 177 for($i=0;$i<count($literal_strings);$i++) 179 $literal_strings_count = count($literal_strings); 180 for($i=0;$i<$literal_strings_count;++$i) 178 181 $sJS = str_replace("___".$i."___",$literal_strings[$i],$sJS); 179 182 -
trunk/workflow/inc/report/xajax/xajaxResponse.inc.php
r5307 r7655 257 257 if ($queryStart !== FALSE) 258 258 { 259 $queryStart++;259 ++$queryStart; 260 260 $queryEnd = strpos($sURL, '#', $queryStart); 261 261 if ($queryEnd === FALSE) -
trunk/workflow/inc/smarty/Config_File.class.php
r795 r7655 282 282 preg_match_all('!^.*\r?\n?!m', $contents, $match); 283 283 $lines = $match[0]; 284 for ($i=0, $count=count($lines); $i<$count; $i++) {284 for ($i=0, $count=count($lines); $i<$count; ++$i) { 285 285 $line = $lines[$i]; 286 286 if (empty($line)) continue; -
trunk/workflow/inc/smarty/Smarty_Compiler.class.php
r795 r7655 277 277 278 278 /* loop through text blocks */ 279 for ($curr_tb = 0, $for_max = count($text_blocks); $curr_tb < $for_max; $curr_tb++) {279 for ($curr_tb = 0, $for_max = count($text_blocks); $curr_tb < $for_max; ++$curr_tb) { 280 280 /* match anything resembling php tags */ 281 281 if (preg_match_all('~(<\?(?:\w+|=)?|\?>|language\s*=\s*[\"\']?\s*php\s*[\"\']?)~is', $text_blocks[$curr_tb], $sp_match)) { … … 283 283 $sp_match[1] = array_unique($sp_match[1]); 284 284 usort($sp_match[1], '_smarty_sort_length'); 285 for ($curr_sp = 0, $for_max2 = count($sp_match[1]); $curr_sp < $for_max2; $curr_sp++) {285 for ($curr_sp = 0, $for_max2 = count($sp_match[1]); $curr_sp < $for_max2; ++$curr_sp) { 286 286 $text_blocks[$curr_tb] = str_replace($sp_match[1][$curr_sp],'%%%SMARTYSP'.$curr_sp.'%%%',$text_blocks[$curr_tb]); 287 287 } 288 288 /* process each one */ 289 for ($curr_sp = 0, $for_max2 = count($sp_match[1]); $curr_sp < $for_max2; $curr_sp++) {289 for ($curr_sp = 0, $for_max2 = count($sp_match[1]); $curr_sp < $for_max2; ++$curr_sp) { 290 290 if ($this->php_handling == SMARTY_PHP_PASSTHRU) { 291 291 /* echo php contents */ … … 308 308 /* Compile the template tags into PHP code. */ 309 309 $compiled_tags = array(); 310 for ($i = 0, $for_max = count($template_tags); $i < $for_max; $i++) {310 for ($i = 0, $for_max = count($template_tags); $i < $for_max; ++$i) { 311 311 $this->_current_line_no += substr_count($text_blocks[$i], "\n"); 312 312 $compiled_tags[] = $this->_compile_tag($template_tags[$i]); … … 331 331 if ($strip) { 332 332 /* strip all $text_blocks before the next '/strip' */ 333 for ($j = $i + 1; $j < $for_max; $j++) {333 for ($j = $i + 1; $j < $for_max; ++$j) { 334 334 /* remove leading and trailing whitespaces of each line */ 335 335 $text_blocks[$j] = preg_replace('![\t ]*[\r\n]+[\t ]*!', '', $text_blocks[$j]); … … 354 354 355 355 /* Interleave the compiled contents and text blocks to get the final result. */ 356 for ($i = 0, $for_max = count($compiled_tags); $i < $for_max; $i++) {356 for ($i = 0, $for_max = count($compiled_tags); $i < $for_max; ++$i) { 357 357 if ($compiled_tags[$i] == '') { 358 358 // tag result empty, remove first newline from following text block … … 1279 1279 1280 1280 $is_arg_stack = array(); 1281 1282 for ($i = 0; $i < count($tokens); $i++) { 1281 $tokens_count = count($tokens); 1282 1283 for ($i = 0; $i < $tokens_count; ++$i) { 1283 1284 1284 1285 $token = &$tokens[$i]; … … 1470 1471 case 'even': 1471 1472 if (isset($tokens[$expr_end]) && $tokens[$expr_end] == 'by') { 1472 $expr_end++;1473 ++$expr_end; 1473 1474 $expr_arg = $tokens[$expr_end++]; 1474 1475 $expr = "!(1 & ($is_arg / " . $this->_parse_var_props($expr_arg) . "))"; … … 1479 1480 case 'odd': 1480 1481 if (isset($tokens[$expr_end]) && $tokens[$expr_end] == 'by') { 1481 $expr_end++;1482 ++$expr_end; 1482 1483 $expr_arg = $tokens[$expr_end++]; 1483 1484 $expr = "(1 & ($is_arg / " . $this->_parse_var_props($expr_arg) . "))"; … … 1488 1489 case 'div': 1489 1490 if (@$tokens[$expr_end] == 'by') { 1490 $expr_end++;1491 ++$expr_end; 1491 1492 $expr_arg = $tokens[$expr_end++]; 1492 1493 $expr = "!($is_arg % " . $this->_parse_var_props($expr_arg) . ")"; … … 1843 1844 $this->_parse_vars_props($match); 1844 1845 $replace = array(); 1845 for ($i = 0, $count = count($match); $i < $count; $i++) {1846 for ($i = 0, $count = count($match); $i < $count; ++$i) { 1846 1847 $replace[$orig_vals[$i]] = $match[$i]; 1847 1848 } … … 1905 1906 list(, $_modifiers, $modifier_arg_strings) = $_match; 1906 1907 1907 for ($_i = 0, $_for_max = count($_modifiers); $_i < $_for_max; $_i++) {1908 for ($_i = 0, $_for_max = count($_modifiers); $_i < $_for_max; ++$_i) { 1908 1909 $_modifier_name = $_modifiers[$_i]; 1909 1910 -
trunk/workflow/inc/smarty/internals/core.process_cached_inserts.php
r795 r7655 18 18 list($cached_inserts, $insert_args) = $match; 19 19 20 for ($i = 0, $for_max = count($cached_inserts); $i < $for_max; $i++) {20 for ($i = 0, $for_max = count($cached_inserts); $i < $for_max; ++$i) { 21 21 if ($smarty->debugging) { 22 22 $_params = array(); -
trunk/workflow/inc/smarty/internals/core.write_cache_file.php
r795 r7655 44 44 $level = 0; 45 45 $j = 0; 46 for ($i=0, $results_count = count($results); $i < $results_count && $j < $match_count; $i++) {46 for ($i=0, $results_count = count($results); $i < $results_count && $j < $match_count; ++$i) { 47 47 if ($results[$i] == $match[0][$j]) { 48 48 // nocache tag … … 53 53 if ($level++ > 0) unset($results[$i]); 54 54 } 55 $j++;55 ++$j; 56 56 } elseif ($level > 0) { 57 57 unset($results[$i]); -
trunk/workflow/inc/smarty/internals/core.write_compiled_include.php
r795 r7655 38 38 39 39 $this_varname = ((double)phpversion() >= 5.0) ? '_smarty' : 'this'; 40 for ($_i = 0, $_for_max = count($_match_source); $_i < $_for_max; $_i++) {40 for ($_i = 0, $_for_max = count($_match_source); $_i < $_for_max; ++$_i) { 41 41 $_match =& $_match_source[$_i]; 42 42 $source = $_match[4]; … … 57 57 } 58 58 59 for ($i=0, $count = count($tokens); $i < $count; $i++) {59 for ($i=0, $count = count($tokens); $i < $count; ++$i) { 60 60 if (is_array($tokens[$i])) { 61 61 if ($tokens[$i][0] == T_VARIABLE && $tokens[$i][1] == '$this') { -
trunk/workflow/inc/smarty/plugins/block.textformat.php
r795 r7655 76 76 $_output = ''; 77 77 78 for($_x = 0, $_y = count($_paragraphs); $_x < $_y; $_x++) {78 for($_x = 0, $_y = count($_paragraphs); $_x < $_y; ++$_x) { 79 79 if ($_paragraphs[$_x] == '') { 80 80 continue; -
trunk/workflow/inc/smarty/plugins/function.config_load.php
r795 r7655 121 121 $smarty->_config[1]['files'][$_file] = true; 122 122 } else if ($_scope == 'global') { 123 for ($i = 1, $for_max = count($smarty->_config); $i < $for_max; $i++) {123 for ($i = 1, $for_max = count($smarty->_config); $i < $for_max; ++$i) { 124 124 $smarty->_config[$i]['vars'] = @array_merge($smarty->_config[$i]['vars'], $_config_vars); 125 125 $smarty->_config[$i]['files'][$_file] = true; -
trunk/workflow/inc/smarty/plugins/function.html_select_date.php
r795 r7655 181 181 $field_separator_count = -1; 182 182 if ($display_months) { 183 $field_separator_count++;183 ++$field_separator_count; 184 184 $month_names = array(); 185 185 $month_values = array(); … … 188 188 $month_values[''] = ''; 189 189 } 190 for ($i = 1; $i <= 12; $i++) {190 for ($i = 1; $i <= 12; ++$i) { 191 191 $month_names[$i] = strftime($month_format, mktime(0, 0, 0, $i, 1, 2000)); 192 192 $month_values[$i] = strftime($month_value_format, mktime(0, 0, 0, $i, 1, 2000)); … … 225 225 $day_values[''] = ''; 226 226 } 227 for ($i = 1; $i <= 31; $i++) {227 for ($i = 1; $i <= 31; ++$i) { 228 228 $days[] = sprintf($day_format, $i); 229 229 $day_values[] = sprintf($day_value_format, $i); … … 255 255 256 256 if ($display_years) { 257 $field_separator_count++;257 ++$field_separator_count; 258 258 if (null !== $field_array){ 259 259 $year_name = $field_array . '[' . $prefix . 'Year]'; … … 303 303 304 304 // Loop thru the field_order field 305 for ($i = 0; $i <= 2; $i++){305 for ($i = 0; $i <= 2; ++$i){ 306 306 $c = substr($field_order, $i, 1); 307 307 switch ($c){ -
trunk/workflow/inc/smarty/plugins/function.html_select_time.php
r795 r7655 85 85 $hours = $use_24_hours ? range(0, 23) : range(1, 12); 86 86 $hour_fmt = $use_24_hours ? '%H' : '%I'; 87 for ($i = 0, $for_max = count($hours); $i < $for_max; $i++)87 for ($i = 0, $for_max = count($hours); $i < $for_max; ++$i) 88 88 $hours[$i] = sprintf('%02d', $hours[$i]); 89 89 $html_result .= '<select name='; -
trunk/workflow/inc/smarty/plugins/function.html_table.php
r795 r7655 128 128 $output .= "<thead><tr>\n"; 129 129 130 for ($r=0; $r<$cols_count; $r++) {130 for ($r=0; $r<$cols_count; ++$r) { 131 131 $output .= '<th' . smarty_function_html_table_cycle('th', $th_attr, $r) . '>'; 132 132 $output .= $cols[$r]; … … 137 137 138 138 $output .= "<tbody>\n"; 139 for ($r=0; $r<$rows; $r++) {139 for ($r=0; $r<$rows; ++$r) { 140 140 $output .= "<tr" . smarty_function_html_table_cycle('tr', $tr_attr, $r) . ">\n"; 141 141 $rx = ($vdir == 'down') ? $r*$cols_count : ($rows-1-$r)*$cols_count; 142 142 143 for ($c=0; $c<$cols_count; $c++) {143 for ($c=0; $c<$cols_count; ++$c) { 144 144 $x = ($hdir == 'right') ? $rx+$c : $rx+$cols_count-1-$c; 145 145 if ($inner!='cols') { -
trunk/workflow/inc/smarty/plugins/function.mailto.php
r795 r7655 89 89 90 90 $mail_parm_vals = ''; 91 for ($i=0; $i<count($mail_parms); $i++) { 91 $mail_parms_count = count($mail_parms); 92 for ($i=0; $i<$mail_parms_count; ++$i) { 92 93 $mail_parm_vals .= (0==$i) ? '?' : '&'; 93 94 $mail_parm_vals .= $mail_parms[$i]; … … 105 106 106 107 $js_encode = ''; 107 for ($x=0; $x < strlen($string); $x++) {108 for ($x=0; $x < strlen($string); ++$x) { 108 109 $js_encode .= '%' . bin2hex($string[$x]); 109 110 } … … 114 115 $string = '<a href="mailto:'.$address.'" '.$extra.'>'.$text.'</a>'; 115 116 116 for($x = 0, $y = strlen($string); $x < $y; $x++) {117 for($x = 0, $y = strlen($string); $x < $y; ++$x ) { 117 118 $ord[] = ord($string[$x]); 118 119 } … … 138 139 } 139 140 $address_encode = ''; 140 for ($x=0; $x < strlen($address); $x++) {141 for ($x=0; $x < strlen($address); ++$x) { 141 142 if(preg_match('!\w!',$address[$x])) { 142 143 $address_encode .= '%' . bin2hex($address[$x]); … … 146 147 } 147 148 $text_encode = ''; 148 for ($x=0; $x < strlen($text); $x++) {149 for ($x=0; $x < strlen($text); ++$x) { 149 150 $text_encode .= '&#x' . bin2hex($text[$x]).';'; 150 151 } -
trunk/workflow/inc/smarty/plugins/modifier.escape.php
r795 r7655 42 42 // escape every character into hex 43 43 $return = ''; 44 for ($x=0; $x < strlen($string); $x++) {44 for ($x=0; $x < strlen($string); ++$x) { 45 45 $return .= '%' . bin2hex($string[$x]); 46 46 } … … 49 49 case 'hexentity': 50 50 $return = ''; 51 for ($x=0; $x < strlen($string); $x++) {51 for ($x=0; $x < strlen($string); ++$x) { 52 52 $return .= '&#x' . bin2hex($string[$x]) . ';'; 53 53 } … … 56 56 case 'decentity': 57 57 $return = ''; 58 for ($x=0; $x < strlen($string); $x++) {58 for ($x=0; $x < strlen($string); ++$x) { 59 59 $return .= '&#' . ord($string[$x]) . ';'; 60 60 } … … 72 72 // escape non-standard chars, such as ms document quotes 73 73 $_res = ''; 74 for($_i = 0, $_len = strlen($string); $_i < $_len; $_i++) {74 for($_i = 0, $_len = strlen($string); $_i < $_len; ++$_i) { 75 75 $_ord = ord(substr($string, $_i, 1)); 76 76 // non-standard char, escape it -
trunk/workflow/inc/smarty/plugins/outputfilter.trimwhitespace.php
r795 r7655 65 65 $_len = strlen($search_str); 66 66 $_pos = 0; 67 for ($_i=0, $_count=count($replace); $_i<$_count; $_i++)67 for ($_i=0, $_count=count($replace); $_i<$_count; ++$_i) 68 68 if (($_pos=strpos($subject, $search_str, $_pos))!==false) 69 69 $subject = substr_replace($subject, $replace[$_i], $_pos, $_len);
Note: See TracChangeset
for help on using the changeset viewer.