From f8b10f70971ac2aedd990a5d3f62a85c2606f102 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Leroy?= Date: Sun, 27 Mar 2005 09:03:07 +0000 Subject: [PATCH] Bugfix: user was not setted when forms were launched, this lett multiple users run the same activity on the same instance at the same time. WARNING:: You should recompile all your activities to fix the bug. --- phpgwapi/inc/galaxia_workflow/compiler/activity_pre.php | 4 ++-- phpgwapi/inc/galaxia_workflow/compiler/end_pre.php | 4 ++-- phpgwapi/inc/galaxia_workflow/compiler/join_pre.php | 4 ++-- phpgwapi/inc/galaxia_workflow/compiler/split_pre.php | 4 ++-- phpgwapi/inc/galaxia_workflow/compiler/switch_pre.php | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/phpgwapi/inc/galaxia_workflow/compiler/activity_pre.php b/phpgwapi/inc/galaxia_workflow/compiler/activity_pre.php index 5f9d6f87d6..f38dabe2ec 100644 --- a/phpgwapi/inc/galaxia_workflow/compiler/activity_pre.php +++ b/phpgwapi/inc/galaxia_workflow/compiler/activity_pre.php @@ -13,8 +13,8 @@ if(empty($instance->instanceId)) { } } // Set the current user for this activity -if(isset($user) && !empty($instance->instanceId) && !empty($activity->activityId)) { - $instance->setActivityUser($activity->activityId,$user); +if(isset($GLOBALS['user']) && !empty($instance->instanceId) && !empty($activity_id)) { + $instance->setActivityUser($activity_id,$GLOBALS['user']); } ?> diff --git a/phpgwapi/inc/galaxia_workflow/compiler/end_pre.php b/phpgwapi/inc/galaxia_workflow/compiler/end_pre.php index af2afaf7c4..7d5b5fd5e4 100644 --- a/phpgwapi/inc/galaxia_workflow/compiler/end_pre.php +++ b/phpgwapi/inc/galaxia_workflow/compiler/end_pre.php @@ -13,8 +13,8 @@ if(empty($instance->instanceId)) { } } // Set the current user for this activity -if(isset($user) && !empty($instance->instanceId) && !empty($activity->activityId)) { - $instance->setActivityUser($activity->activityId,$user); +if(isset($GLOBALS['user']) && !empty($instance->instanceId) && !empty($activity_id)) { + $instance->setActivityUser($activity_id,$GLOBALS['user']); } ?> diff --git a/phpgwapi/inc/galaxia_workflow/compiler/join_pre.php b/phpgwapi/inc/galaxia_workflow/compiler/join_pre.php index 7936b9825c..94ee4f4b4c 100644 --- a/phpgwapi/inc/galaxia_workflow/compiler/join_pre.php +++ b/phpgwapi/inc/galaxia_workflow/compiler/join_pre.php @@ -13,8 +13,8 @@ if(empty($instance->instanceId)) { } } // Set the current user for this activity -if(isset($user) && !empty($instance->instanceId) && !empty($activity->activityId)) { - $instance->setActivityUser($activity->activityId,$user); +if(isset($GLOBALS['user']) && !empty($instance->instanceId) && !empty($activity_id)) { + $instance->setActivityUser($activity_id,$GLOBALS['user']); } ?> diff --git a/phpgwapi/inc/galaxia_workflow/compiler/split_pre.php b/phpgwapi/inc/galaxia_workflow/compiler/split_pre.php index 893754c02d..4cf70715dd 100644 --- a/phpgwapi/inc/galaxia_workflow/compiler/split_pre.php +++ b/phpgwapi/inc/galaxia_workflow/compiler/split_pre.php @@ -13,8 +13,8 @@ if(empty($instance->instanceId)) { } } // Set the current user for this activity -if(isset($user) && !empty($instance->instanceId) && !empty($activity->activityId)) { - $instance->setActivityUser($activity->activityId,$user); +if(isset($GLOBALS['user']) && !empty($instance->instanceId) && !empty($activity_id)) { + $instance->setActivityUser($activity_id,$GLOBALS['user']); } ?> diff --git a/phpgwapi/inc/galaxia_workflow/compiler/switch_pre.php b/phpgwapi/inc/galaxia_workflow/compiler/switch_pre.php index 03292d5b69..436a40e2cf 100644 --- a/phpgwapi/inc/galaxia_workflow/compiler/switch_pre.php +++ b/phpgwapi/inc/galaxia_workflow/compiler/switch_pre.php @@ -13,8 +13,8 @@ if(empty($instance->instanceId)) { } } // Set the current user for this activity -if(isset($user) && !empty($instance->instanceId) && !empty($activity->activityId)) { - $instance->setActivityUser($activity->activityId,$user); +if(isset($GLOBALS['user']) && !empty($instance->instanceId) && !empty($activity_id)) { + $instance->setActivityUser($activity_id,$GLOBALS['user']); } ?>