20 include_once (
"FDL/Class.Doc.php");
21 include_once (
"FDL/Class.Dir.php");
22 include_once (
"FDL/Class.DocAttr.php");
23 include_once (
"FDL/freedom_util.php");
29 $docid = GetHttpVars(
"docid");
30 $createp = GetHttpVars(
"create", 0);
31 $profid = GetHttpVars(
"profid");
32 $cvid = GetHttpVars(
"cvid");
33 $redirid = GetHttpVars(
"redirid");
35 if (
$docid == 0) $action->
exitError(_(
"the document is not referenced: cannot apply profile access modification"));
46 if (
$err !=
"") $action->ExitError(
$err);
49 if (
$err !=
"") $action->ExitError(
$err);
52 if (
$err !=
"") $action->ExitError(
$err);
54 if ($profid ==
"private") {
58 $action->
exitError(_(
"No privilege to set private profil"));
65 if (
$doc->cprofid != $profid) {
66 $doc->addHistoryEntry(sprintf(_(
"Change creation profil to %s [%d]") ,
$doc->getTitle($profid) , $profid));
67 $doc->cprofid = $profid;
70 if (
$doc->ccvid != $cvid) {
72 $doc->addHistoryEntry(sprintf(_(
"Change creation view control to %s [%d]") ,
$doc->getTitle($cvid) , $cvid));
76 if ((
$doc->profid ==
$doc->id) && ($profid == 0)) {
80 if (
$doc->profid != $profid)
$doc->addHistoryEntry(sprintf(_(
"Change profil to %s [%d]") ,
$doc->getTitle($profid) , $profid));
81 if (
$doc->cvid != $cvid)
$doc->addHistoryEntry(sprintf(_(
"Change view control to %s [%d]") ,
$doc->getTitle($cvid) , $cvid));
83 $doc->setProfil($profid);
91 $doc->disableEditControl();
99 if ($redirid)
$docid = $redirid;
100 redirect($action,
"FDL",
"FDL_CARD&props=Y&id=$docid", $action->GetParam(
"CORE_STANDURL"));
exitError($texterr, $exit=true, $code="")
getMyProfil($dbaccess, $create=true)
new_Doc($dbaccess, $id= '', $latest=false)
if($file) if($subject==""&&$file) if($subject=="") $err