- Timestamp:
- 07/15/10 17:30:07 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/workflow/trunk/inc/class.so_move_instances.inc.php
r2466 r3060 318 318 } 319 319 320 /* format the array elements for use in a SELECT SQL statement, e.g. [iid => 12, aid = 27] would produce (12, 27) */321 $instanceActivityList = array_map(create_function('$e', 'return \'(\' . $e[\'iid\'] . \', \' . $e[\'aid\'] . \')\';'), $instanceActivityList);322 323 /* update the interinstance relations of the modified rows of the instance_activities table */324 $resultSet = $this->db->query("SELECT wf_parent_instance_id, wf_parent_activity_id FROM egw_wf_interinstance_relations WHERE ((wf_parent_instance_id, wf_parent_activity_id) IN (" . implode(', ', $instanceActivityList) . "))");325 $rows = $resultSet->GetArray(-1);326 if (is_array($rows))327 {328 foreach ($rows as $row)329 {330 /* update the activity ID */331 if (!$this->db->query("UPDATE egw_wf_interinstance_relations SET wf_parent_activity_id = ? WHERE (wf_parent_instance_id = ?) AND (wf_parent_activity_id = ?)", array($activitiesConvert[$row['wf_parent_activity_id']], $row['wf_parent_instance_id'], $row['wf_parent_activity_id'])))332 {333 $this->db->FailTrans();334 return array('error' => 'Erro atualizando a tabela de relacionamento inter-instância. Nenhuma modificação foi salva');335 }336 }337 }338 339 320 /* in case of success, commit the modifications */ 340 321 $this->db->CompleteTrans();
Note: See TracChangeset
for help on using the changeset viewer.