17 include_once (
"FDL/Class.Dir.php");
28 $docid = GetHttpVars(
"id");
32 if (
$doc->isAlive()) {
33 $la =
$doc->GetActionAttributes();
34 if (count(
$la) == 0) $action->
exitError(sprintf(_(
"no action found for %s document") ,
$doc->title));
37 foreach (
$la as $ka => $oa) {
38 $taction[$ka][
"label"] = $oa->getLabel();
40 $ta[
"exec_application"] = $oa->wapplication;
41 $ta[
"exec_idref"] =
$doc->id;
42 $ta[
"exec_ref"] =
$doc->title .
" (" . $oa->getLabel() .
")";
44 $p = explode(
'&', $oa->waction);
45 $ta[
"exec_action"] = current($p);
47 if ($oa->getOption(
"batchfolder") ==
"yes") $tp = array(
48 "wshfldid" =>
$doc->id
53 foreach ($p as $k => $v) {
54 list($var,
$value) = explode(
"=", $v);
57 $ta[
"exec_idvar"] = implode(
"\n", array_keys($tp));
58 $ta[
"exec_valuevar"] = implode(
"\n", $tp);
61 foreach ($ta as $k => $v) {
62 $url.=
"&$k=" . urlencode($v);
64 $taction[$ka][
"url"] = sprintf(
"%s&app=GENERIC&action=GENERIC_EDIT&classid=EXEC%s", $action->GetParam(
"CORE_STANDURL") , $url);
66 $action->lay->setBlockData(
"ACTIONS", $taction);
freedom_chooseaction(Action &$action)
exitError($texterr, $exit=true, $code="")
new_Doc($dbaccess, $id= '', $latest=false)