20 include_once (
"FDL/Class.Doc.php");
21 include_once
"FDL/editutil.php";
40 $userId = $action->user->id;
48 $action->lay->
Set(
"title",
$doc->getHtmlTitle());
50 $ouser =
new Account(
'', $userId);
51 if (!$ouser->isAffected()) $action->
exitError(sprintf(_(
"unknow user #%s") , $userId));
52 $tiduser = $ouser->GetUserAndGroupList();
54 $action->lay->
Set(
"docid",
$doc->id);
55 $action->lay->
Set(
"userid", $ouser->id);
57 $action->lay->
Set(
"toProfil",
$doc->getDocAnchor(
$doc->id,
'account',
true,
false,
false,
'latest',
true));
59 $action->lay->
Set(
"dynamic",
true);
60 $action->lay->
Set(
"dprofid",
$doc->dprofid);
61 $action->lay->
Set(
"ComputedFrom", _(
"Computed from profil"));
62 $action->lay->
Set(
"toDynProfil",
$doc->getHTMLTitle(
$doc->dprofid));
63 } elseif (
$doc->profid !=
$doc->id) {
64 $action->lay->
Set(
"dynamic",
true);
65 $action->lay->
Set(
"dprofid",
$doc->profid);
66 $action->lay->
Set(
"ComputedFrom", _(
"Linked from profil"));
67 $action->lay->
Set(
"toDynProfil",
$doc->getHTMLTitle(
$doc->profid));
69 $action->lay->
Set(
"dynamic",
false);
71 if (
$doc->isRealProfile()) {
72 $action->lay->
Set(
"profprefix", _(
"Profile of"));
73 $origin = $action->lay->get(
"toProfil");
74 $action->lay->
Set(
"toProfil", preg_replace(
'/href="([^"]*)"/',
'href="?app=FREEDOM&action=FREEDOM_GACCESS&id=' .
$doc->id .
'"', $origin));
76 $action->lay->
Set(
"profprefix", _(
"Document Profile"));
79 $action->lay->
Set(
"fid",
$doc->getDocAnchor($ouser->fid,
'account',
true,
false,
false,
'latest',
true));
80 $action->lay->
Set(
"userid", ($userId == 1) ? $tiduser[0]->
id : $userId);
exitError($texterr, $exit=true, $code="")
freedom_access(Action &$action)
static getDisplayName($uid)
static getUidFromFid($fid)
new_Doc($dbaccess, $id= '', $latest=false)
static getArgument($k, $def= '')
editmode(Action &$action)
if($file) if($subject==""&&$file) if($subject=="") $err