17 include_once (
"FDL/Class.Doc.php");
18 include_once (
"FDL/Class.SearchDoc.php");
19 include_once (
"FDL/Lib.Attr.php");
20 include_once (
"FDL/Class.DocFam.php");
25 $docid = GetHttpVars(
"id");
27 $action->
exitError(_(
"workflow_init :: id is empty"));
35 if (!$wdoc->isAlive()) {
38 if ((
$err = $wdoc->control(
"edit")) !==
"") {
41 $wdoc->CreateProfileAttribute();
42 if ($wdoc->doctype ==
'C') $cid = $wdoc->id;
43 else $cid = $wdoc->fromid;
46 $query->AddQuery(
"id=$cid");
49 if ($wdoc->isAffected() && strstr($wdoc->usefor,
'W')) {
52 $action->
exitError(sprintf(_(
"workflow_init :: id %s is not a workflow") ,
$docid));
55 $action->
exitError(sprintf(_(
"workflow_init :: workflow id %s not found") , $cid));
59 $s->setObjectReturn();
61 while (
$doc =
$s->getNextDoc()) {
66 redirect($action,
"FDL",
"FDL_CARD&id=$docid");
workflow_init(Action &$action)
refreshPhpPgDoc($dbaccess, $docid)
exitError($texterr, $exit=true, $code="")
new_Doc($dbaccess, $id= '', $latest=false)
if(($docid!==0)&&(!is_numeric($docid))) $query
if($file) if($subject==""&&$file) if($subject=="") $err