19 include_once (
"Class.SubForm.php");
20 include_once (
"Class.Param.php");
30 $direct = (
$action->getArgument(
"direct") ==
"yes");
39 if (!$ParamCour->isAffected()) {
40 $ParamCour->appid = $appid;
41 $ParamCour->type = $atype;
42 $ParamCour->name =
$name;
43 $ParamCour->val = $val;
44 $err = $ParamCour->Add();
48 $action->lay->set(
"textModify", _(
"param Changed"));
51 if (($pdef->kind ==
"password") && ($val ==
'*****')) {
52 $action->lay->set(
"textModify", _(
"param not changed"));
54 if ($ParamCour->val == $val || $pdef ==
'static' || $pdef ==
'readonly') {
55 $action->lay->set(
"textModify", _(
"param not changed"));
57 $ParamCour->val = $val;
58 $err = $ParamCour->Modify();
60 $action->addLogMsg(
$action->text(
"err_mod_parameter") .
" : $err");
62 $action->lay->set(
"textModify", _(
"param Changed"));
69 $prevact =
$action->Read(
"PARAM_ACT",
"PARAM_CULIST");
72 $action->parent->session->close();
74 $action->parent->session->closeAll();
77 if (!$direct) redirect(
$action,
"APPMNG", $prevact);
80 if ($pdef->kind ==
"password") {
81 if ($ParamCour->val ==
'')
$action->lay->set(
"value", json_encode($ParamCour->val));
82 else $action->lay->set(
"value", json_encode(
"*****"));
84 $action->lay->set(
"value", json_encode($ParamCour->val));
94 if ($atype[0] !=
PARAM_USER)
$action->exitError(_(
"only user parameters can be modified with its action"));
95 if (substr($atype, 1) !=
$action->user->id)
$action->exitError(_(
"only current user parameters can be modified with its action"));