Changeset 2887 for trunk/workflow/inc/engine/src
- Timestamp:
- 05/31/10 18:28:34 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/workflow/inc/engine/src/API/Instance.php
r2591 r2887 510 510 $this->setStarted($now); 511 511 $this->setOwner($user); 512 512 513 //Get the id of new instance, before insert values in table and use this value from main table and relationship tables. 514 $this->instanceId = $this->getOne("SELECT nextval('seq_egw_wf_instances')"); 515 $iid=$this->instanceId; 516 513 517 $query = 'insert into '.GALAXIA_TABLE_PREFIX.'instances 514 (wf_started,wf_ended,wf_status,wf_p_id,wf_owner,wf_properties) 515 values(?,?,?,?,?,?)'; 516 $this->query($query,array($now,0,'active',$pid,$user,$this->security_cleanup(Array(),false))); 517 $this->instanceId = $this->getOne('select max(wf_instance_id) from '.GALAXIA_TABLE_PREFIX.'instances 518 where wf_started=? and wf_owner=?',array((int)$now,$user)); 519 $iid=$this->instanceId; 520 518 (wf_instance_id, wf_started,wf_ended,wf_status,wf_p_id,wf_owner,wf_properties) 519 values(?,?,?,?,?,?,?)'; 520 521 $this->query($query,array((int)$iid, $now,0,'active',$pid,$user,$this->security_cleanup(Array(),false))); 522 521 523 // Then add in ".GALAXIA_TABLE_PREFIX."instance_activities an entry for the 522 524 // activity the user and status running and started now
Note: See TracChangeset
for help on using the changeset viewer.