Changeset 7655 for trunk/workflow/inc/engine/src/API/Instance.php
- Timestamp:
- 12/14/12 14:30:35 (11 years ago)
- File:
-
- 1 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);
Note: See TracChangeset
for help on using the changeset viewer.