17 include_once (
"FDL/Class.DocSearch.php");
18 include_once (
"FDL/freedom_util.php");
19 include_once (
"GENERIC/generic_util.php");
29 $docid = GetHttpVars(
"id");
33 $action->lay->set(
"docid",
$doc->id);
34 if (
$doc->isAlive()) {
35 $la =
$doc->GetActionAttributes();
36 if (count(
$la) == 0) $action->
exitError(sprintf(_(
"no action found for %s document") ,
$doc->title));
37 if (count(
$la) == 1) {
39 $ta[
"exec_application"] = $oa->wapplication;
40 $ta[
"exec_idref"] =
$doc->id;
41 $ta[
"exec_ref"] =
$doc->title .
" (" . $oa->getLabel() .
")";
43 $p = explode(
'&', $oa->waction);
44 $ta[
"exec_action"] = current($p);
46 if ($oa->getOption(
"batchfolder") ==
"yes") $tp = array(
47 "wshfldid" =>
$doc->id
52 foreach ($p as $k => $v) {
53 list($var,
$value) = explode(
"=", $v);
56 $ta[
"exec_idvar"] = implode(
"\n", array_keys($tp));
57 $ta[
"exec_valuevar"] = implode(
"\n", $tp);
60 foreach ($ta as $k => $v) {
61 $url.=
"&$k=" . urlencode($v);
63 $action->lay->set(
"url", sprintf(
"%s&app=GENERIC&action=GENERIC_EDIT&classid=EXEC%s", $action->GetParam(
"CORE_STANDURL") , $url));
65 $action->lay->set(
"url", sprintf(
"%s&app=FREEDOM&action=FREEDOM_CHOOSEACTION&id=%s", $action->GetParam(
"CORE_STANDURL") ,
$doc->id));
exitError($texterr, $exit=true, $code="")
new_Doc($dbaccess, $id= '', $latest=false)
freedom_processtoexec(Action &$action)