Changeset 7655 for trunk/workflow/inc/engine/src
- Timestamp:
- 12/14/12 14:30:35 (12 years ago)
- Location:
- trunk/workflow/inc/engine/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
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 }
Note: See TracChangeset
for help on using the changeset viewer.