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,20 +590,22 @@ class ActivityManager extends BaseManager {
die; die;
} }
// Should create the code file // Should create the code file
$wf_procname = $proc_info["wf_normalized_name"]; if ($create_files) {
$fw = fopen(GALAXIA_PROCESSES."/$wf_procname/code/activities/".$vars['wf_normalized_name'].'.php','w'); $wf_procname = $proc_info["wf_normalized_name"];
fwrite($fw,'<'.'?'.'php'."\n".'?'.'>'); $fw = fopen(GALAXIA_PROCESSES."/$wf_procname/code/activities/".$vars['wf_normalized_name'].'.php','w');
fclose($fw); fwrite($fw,'<'.'?'.'php'."\n".'?'.'>');
fclose($fw);
if($vars['wf_is_interactive']=='y') {
$fw = fopen(GALAXIA_PROCESSES."/$wf_procname/code/templates/".$vars['wf_normalized_name'].'.tpl','w'); if($vars['wf_is_interactive']=='y') {
if (defined('GALAXIA_TEMPLATE_HEADER') && GALAXIA_TEMPLATE_HEADER) { $fw = fopen(GALAXIA_PROCESSES."/$wf_procname/code/templates/".$vars['wf_normalized_name'].'.tpl','w');
fwrite($fw,GALAXIA_TEMPLATE_HEADER . "\n"); if (defined('GALAXIA_TEMPLATE_HEADER') && GALAXIA_TEMPLATE_HEADER) {
} fwrite($fw,GALAXIA_TEMPLATE_HEADER . "\n");
fclose($fw); }
} fclose($fw);
}
}
$this->compile_activity($pId,$activityId); $this->compile_activity($pId,$activityId);
} }
// Get the id // Get the id