17 include_once (
"FDL/Class.DocSearch.php");
18 include_once (
"FDL/freedom_util.php");
19 include_once (
"GENERIC/generic_util.php");
21 include_once (
"FDL/Class.DocRel.php");
27 $docid = GetHttpVars(
"id");
28 $famid = GetHttpVars(
"famid", 0);
30 $generic = (GetHttpVars(
"generic") ==
"Y");
39 if (
$docid ==
"") $action->
exitError(_(
"related search aborted : no parameter found"));
44 $sdoc->setValue(
"ba_title", sprintf(_(
"related documents of %s") ,
$doc->title));
45 $sdoc->setValue(
"se_phpfile",
"fdlsearches.php");
46 $sdoc->setValue(
"se_phpfunc",
"relateddoc");
47 $sdoc->setValue(
"se_phparg",
"$docid,$famid");
50 if ((
$err = $sdoc->Add()) !=
'') {
53 if ((
$err = $sdoc->setControl(
false)) !=
'') {
57 if ($action->user->id != 1) {
58 if ((
$err = $sdoc->addControl($action->user->id,
'execute')) !=
'') {
64 catch(\Exception $e) {
65 if ($sdoc->isAffected()) {
71 setHttpVar(
"dirid", $sdoc->id);
73 include_once (
"GENERIC/generic_list.php");
78 include_once (
"FREEDOM/freedom_view.php");
79 $action->parent->name =
"FREEDOM";
81 $freedomApp->Set(
'FREEDOM', $action->parent);
82 $viewMode = $freedomApp->getParam(
'FREEDOM_VIEW');
83 setHttpVar(
"view", $viewMode);
84 setHttpVar(
"target",
"gisearch");
generic_isearch(Action &$action)
exitError($texterr, $exit=true, $code="")
getFamIdFromName($dbaccess, $name)
new_Doc($dbaccess, $id= '', $latest=false)
createTmpDoc($dbaccess, $fromid, $defaultvalue=true)
if($file) if($subject==""&&$file) if($subject=="") $err