19 include_once (
"FDL/Class.Doc.php");
20 include_once (
"FDL/mailcard.php");
39 if (!
$doc->isAlive())
$action->exitError(sprintf(_(
"document #%s not found. Affectation aborded") ,
$docid));
43 if (!$docu->isAlive())
$action->addWarningMsg(sprintf(_(
"user #%s not found. Affectation aborded") ,
$uid));
45 $wuid = $docu->getValue(
"us_whatid");
46 if (!($wuid > 0))
$action->addWarningMsg(sprintf(_(
"user #%s has not a real account. Affectation aborded") ,
$uid));
49 $err =
$doc->changeFreeState($newstate, $commentstate);
53 $action->addWarningMsg(sprintf(_(
"document %s has the new state %s") ,
$doc->title,
$doc->getState()));
57 $err =
$doc->allocate($wuid, $commentaction, $revstate);
63 $action->addWarningMsg(sprintf(_(
"document %s has been allocate to %s") ,
$doc->title, $docu->title));
65 $to = $docu->getValue(
"us_mail");
66 $subject = sprintf(_(
"allocation for %s document") ,
$doc->title);
67 $err =
sendCard(
$action,
$doc->id,
$to,
"",
$subject,
"",
true, $commentaction,
"",
"",
"htmlnotif");