7 include_once
"FDL/freedom_util.php";
11 $keys = str_replace(
"\r\n",
"\n", $action->
getArgument(
"keys"));
22 $famdoc =
new_Doc($action->dbaccess, $famid);
23 if ($famdoc->isAlive()) {
27 $attr = $famdoc->getAttribute($attrid);
28 $alabels = $attr->getEnumLabel($keys);
32 "error" => sprintf(_(
"Document %s is not alive") , $famid) ,
36 if (!empty($alabels)) {
37 $return[
"data"] = $alabels;
39 $action->lay->template = json_encode($return);
40 $action->lay->noparse =
true;
41 header(
'Content-type: application/json');
get_enum_label(Action &$action)
new_Doc($dbaccess, $id= '', $latest=false)
static getArgument($k, $def= '')