Do not create empty files if called from ProcessManager::new_process_version because they have already been copied (and recompiled with new path for shared code)

This commit is contained in:
alpeb 2005-01-17 19:22:36 +00:00
parent cd4cca923f
commit a3f705c358

View File

@ -505,7 +505,7 @@ class ActivityManager extends BaseManager {
$pId is the processId $pId is the processId
$activityId is the activityId $activityId is the activityId
*/ */
function replace_activity($pId, $activityId, $vars) function replace_activity($pId, $activityId, $vars, $create_files=true)
{ {
$TABLE_NAME = GALAXIA_TABLE_PREFIX."activities"; $TABLE_NAME = GALAXIA_TABLE_PREFIX."activities";
$now = date("U"); $now = date("U");
@ -590,6 +590,7 @@ class ActivityManager extends BaseManager {
die; die;
} }
// Should create the code file // Should create the code file
if ($create_files) {
$wf_procname = $proc_info["wf_normalized_name"]; $wf_procname = $proc_info["wf_normalized_name"];
$fw = fopen(GALAXIA_PROCESSES."/$wf_procname/code/activities/".$vars['wf_normalized_name'].'.php','w'); $fw = fopen(GALAXIA_PROCESSES."/$wf_procname/code/activities/".$vars['wf_normalized_name'].'.php','w');
fwrite($fw,'<'.'?'.'php'."\n".'?'.'>'); fwrite($fw,'<'.'?'.'php'."\n".'?'.'>');
@ -602,6 +603,7 @@ class ActivityManager extends BaseManager {
} }
fclose($fw); fclose($fw);
} }
}
$this->compile_activity($pId,$activityId); $this->compile_activity($pId,$activityId);