19 include_once (
"FDL/Class.Doc.php");
36 header(
'Content-type: text/xml; charset=utf-8');
40 $action->lay->set(
"CODE",
"OK");
41 $action->lay->set(
"warning",
"");
44 if (!
$doc->isAffected())
$err = sprintf(_(
"cannot see unknow reference %s") ,
$docid);
50 $a =
$doc->getAttribute($attrid);
61 if (!
$a)
$err = sprintf(_(
"unknown attribute %s for document %s") , $attrid,
$doc->title);
63 $vis =
$a->mvisibility;
64 if (strstr(
"WO", $vis) ===
false)
$err = sprintf(_(
"visibility %s does not allow modify attribute %s for document %s") , $vis,
$a->getLabel() ,
$doc->title);
67 if (
$a->type ==
"file") {
75 $action->AddActionDone(
"MODATTR",
$a->id);
76 $doc->AddComment(sprintf(_(
"modify [%s] attribute") ,
$a->getLabel()) ,
HISTO_INFO,
"MODATTR");
80 $action->lay->set(
"thetext",
$doc->getHtmlAttrValue($attrid));
84 if ($attrid)
$action->lay->set(
"thetext",
$doc->getHtmlAttrValue($attrid));
90 $action->getActionDone($actcode, $actarg);
92 foreach ($actcode as $k => $v) {