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