17 include_once (
'FDL/Class.Dir.php');
18 include_once (
'FDL/Class.DocSearch.php');
19 include_once (
'FDL/Class.DocRead.php');
20 include_once (
'FDL/Class.DocFam.php');
25 $qsql =
"select id from only doc2 where (doctype='D') order by id LIMIT 1;";
29 $tableq =
$query->Query(0, 0,
"TABLE", $qsql);
32 return $tableq[0][
"id"];
41 if (!(
$dirid > 0))
return array();
53 ) , $userid, $restype, 2,
false,
"title");
60 ) , $userid, $restype, 5,
false,
"title");
64 return array_merge($folders, $searches);
70 if (!is_array($sqlfilters))
return true;
71 static $props =
false;
76 $props = array_merge($props,
$d->sup_fields);
77 $props[] =
"fulltext";
81 foreach ($sqlfilters as $k => $v) {
82 $tok = ltrim($v,
"(");
83 $tok = ltrim($tok,
" ");
84 $tok = strtok($tok,
" !=~@");
85 if (!(strpos($tok,
'.') > 0)) {
87 if (($tok !==
false) && ($tok !==
"true") && ($tok !==
"false") && (!in_array(ltrim($tok,
"(") , $props)))
return false;
110 $trash =
"", $simplesearch =
false, $folderRecursiveLevel = 2, $join =
'', $only =
"")
113 if (($fromid !=
"") && (!is_numeric($fromid))) {
114 preg_match(
'/^(?P<sign>-?)(?P<fromid>.+)$/', trim($fromid) , $m);
119 if ($trash ==
"only") $distinct =
true;
120 if ($fromid == - 1) $table =
"docfam";
121 elseif ($simplesearch) $table =
"docread";
122 elseif ($fromid < 0) {
125 $table =
"doc$fromid";
131 $sqlfilters[-4] =
GetSqlCond(array_merge(array(
133 ) , array_keys($fdoc->GetChildFam())) ,
"fromid",
true);
135 $table =
"doc$fromid";
137 } elseif ($fromid == 0) {
143 if (preg_match(
'/([a-z0-9_\-:]+)\s*(=|<|>|<=|>=)\s*([a-z0-9_\-:]+)\(([^\)]*)\)/', $join, $reg)) {
145 $jointable = ($joinid) ?
"doc" . $joinid : $reg[3];
147 $sqlfilters[] = sprintf(
"%s.%s %s %s.%s", $table, $reg[1], $reg[2], $jointable, $reg[4]);
149 $table.=
", " . $jointable;
151 addWarningMsg(sprintf(_(
"search join syntax error : %s") , $join));
155 $maintabledot = ($maintable &&
$dirid == 0) ? $maintable .
'.' :
'';
158 $selectfields =
"distinct on ($maintable.initid) $maintable.*";
160 $selectfields =
"$maintable.*";
161 $sqlfilters[-2] = $maintabledot .
"doctype != 'T'";
166 if (count($sqlfilters) > 0) $sqlcond =
" (" . implode(
") and (", $sqlfilters) .
")";
172 if (strpos(implode(
",", $sqlfilters) ,
"archiveid") ===
false) $sqlfilters[-4] = $maintabledot .
"archiveid is null";
174 if ($trash ==
"only") {
175 $sqlfilters[-3] = $maintabledot .
"doctype = 'Z'";
177 $sqlfilters[] = $maintabledot .
"lmodify = 'D'";
179 } elseif ($trash ==
"also") {
180 $sqlfilters[-3] = sprintf(
"(%slocked != -1 or %slmodify='D')", $maintabledot, $maintabledot);
181 }
else if (!$fromid) {
182 $sqlfilters[-3] = $maintabledot .
"doctype != 'Z'";
185 if ((
$latest) && (($trash ==
"no") || (!$trash))) {
186 $sqlfilters[-1] = $maintabledot .
"locked != -1";
189 if (count($sqlfilters) > 0) $sqlcond =
" (" . implode(
") and (", $sqlfilters) .
")";
190 $qsql =
"select $selectfields " .
"from $only $table " .
"where " . $sqlcond;
197 if ((is_array($dirid)) || ($fld && $fld->defDoctype !=
'S')) {
199 if ($fld && method_exists($fld,
"getSpecificFilters")) {
203 $specFilters = $fld->getSpecificFilters();
204 if (is_array($specFilters) && (count($specFilters) > 0)) {
205 $sqlfilters = array_merge($sqlfilters, $specFilters);
209 if (strpos(implode(
",", $sqlfilters) ,
"archiveid") ===
false) $sqlfilters[-4] = $maintabledot .
"archiveid is null";
211 if ($trash ==
"only") {
212 $sqlfilters[-1] =
"locked = -1";
214 $sqlfilters[] = $maintabledot .
"lmodify = 'D'";
216 } elseif (
$latest) $sqlfilters[-1] =
"locked != -1";
218 if (count($sqlfilters) > 0) $sqlcond =
" (" . implode(
") and (", $sqlfilters) .
")";
220 if (is_array($dirid)) {
222 $qsql =
"select $selectfields " .
"from (select childid from fld where $sqlfld) as fld2 inner join $table on (initid=childid) " .
"where $sqlcond ";
224 $sqlfld =
"dirid=$dirid and qtype='S'";
225 if ($fromid == 2) $sqlfld.=
" and doctype='D'";
226 if ($fromid == 5) $sqlfld.=
" and doctype='S'";
228 $sqlcond =
" (" . implode(
") and (", $sqlfilters) .
")";
229 $qsql =
"select $selectfields from $only $table where $sqlcond ";
232 $q->AddQuery($sqlfld);
233 $tfld =
$q->Query(0, 0,
"TABLE");
236 foreach ($tfld as $onefld) {
237 $tfldid[] = $onefld[
"childid"];
239 if (count($tfldid) > 1000) {
240 $qsql =
"select $selectfields " .
"from $table where initid in (select childid from fld where $sqlfld) " .
"and $sqlcond ";
242 $sfldids = implode(
",", $tfldid);
243 if ($table ==
"docread") {
247 $qsql =
"select $selectfields " .
"from $table where initid in ($sfldids) " .
"and $sqlcond ";
252 $qsql =
"select $selectfields " .
"from $only $table where initid in ($sfldids) " .
"and $sqlcond ";
265 $docsearch->AddQuery(
"dirid=$dirid");
266 $docsearch->AddQuery(
"qtype = 'M'");
267 $ldocsearch = $docsearch->Query(0, 0,
"TABLE");
269 if (($docsearch->nb) > 0) {
270 switch ($ldocsearch[0][
"qtype"]) {
278 if ($trash) $fld->setValue(
"se_trash", $trash);
279 else $trash = $fld->getRawValue(
"se_trash");
280 $fld->folderRecursiveLevel = $folderRecursiveLevel;
281 $tsqlM = $fld->getQuery();
282 foreach ($tsqlM as $sqlM) {
283 if ($sqlM !=
false) {
284 if (!preg_match(
"/doctype[ ]*=[ ]*'Z'/", $sqlM, $reg)) {
285 if (($trash !=
"also") && ($trash !=
"only")) $sqlfilters[-3] =
"doctype != 'Z'";
287 foreach ($sqlfilters as $kf => $sf) {
288 if (strstr($sqlM, $sf)) {
289 unset($sqlfilters[$kf]);
292 if (count($sqlfilters) > 0) $sqlcond =
" (" . implode(
") and (", $sqlfilters) .
")";
295 if ($fromid > 0) $sqlM = str_replace(
"from doc ",
"from $only $table ", $sqlM);
296 if ($sqlcond) $qsql[] = $sqlM .
" and " . $sqlcond;
297 else $qsql[] = $sqlM;
308 if (is_array($qsql))
return $qsql;
335 if ($fld->getRawValue(
"se_phpfunc") !=
"")
return $terr;
338 if ((is_array(
$dirid)) || ($fld->defDoctype !=
'S')) {
348 $docsearch->AddQuery(
"dirid=$dirid");
350 $docsearch->AddQuery(
"qtype = 'M'");
351 $ldocsearch = $docsearch->Query(0, 0,
"TABLE");
353 if (($docsearch->nb) > 0) {
354 switch ($ldocsearch[0][
"qtype"]) {
361 $tsqlM = $fld->getQuery();
362 foreach ($tsqlM as $sqlM) {
364 if ($sqlM ==
false) $terr[
$dirid] = _(
"uncomplete request");
370 $terr[
$dirid] = _(
"request not found");
400 function getChildDoc(
$dbaccess,
$dirid,
$start =
"0",
$slice =
"ALL", $sqlfilters = array() , $userid = 1, $qtype =
"LIST", $fromid =
"", $distinct =
false, $orderby =
"title",
$latest =
true, $trash =
"", &$debug = null, $folderRecursiveLevel = 2, $join =
'', \
SearchDoc & $searchDoc = null)
403 return internalGetDocCollection(
$dbaccess,
$dirid,
$start,
$slice, $sqlfilters, $userid, $qtype, $fromid, $distinct, $orderby,
$latest, $trash, $debug, $folderRecursiveLevel, $join, $searchDoc);
428 function internalGetDocCollection(
$dbaccess,
$dirid,
$start =
"0",
$slice =
"ALL", $sqlfilters = array() , $userid = 1, $qtype =
"LIST", $fromid =
"", $distinct =
false, $orderby =
"title",
$latest =
true, $trash =
"", &$debug = null, $folderRecursiveLevel = 2, $join =
'', \
SearchDoc & $searchDoc = null)
430 return _internalGetDocCollection(
false,
$dbaccess,
$dirid,
$start,
$slice, $sqlfilters, $userid, $qtype, $fromid, $distinct, $orderby,
$latest, $trash, $debug, $folderRecursiveLevel, $join, $searchDoc);
432 function _internalGetDocCollection($returnSqlOnly =
false,
$dbaccess,
$dirid,
$start =
"0",
$slice =
"ALL", $sqlfilters = array() , $userid = 1, $qtype =
"LIST", $fromid =
"", $distinct =
false, $orderby =
"title",
$latest =
true, $trash =
"", &$debug = null, $folderRecursiveLevel = 2, $join =
'', \
SearchDoc & $searchDoc = null)
436 if ($fromid == 0) $fromid =
"";
437 if (($fromid ==
"") && (
$dirid != 0) && ($qtype ==
"TABLE")) {
447 return $fld->getDocList(
$start,
$slice, $qtype, $userid);
450 if ($fld->defDoctype !=
'S') {
452 if (!$fld->hasSpecificFilters()) {
454 if (is_array($td))
return $td;
457 if ($fld->getRawValue(
"se_famid")) {
458 $fromid = $fld->getRawValue(
"se_famid");
460 if (!is_object($fdoc) || !$fdoc->isAlive() || $fdoc->defDoctype !=
'C') {
461 throw new \Dcp\Exception(sprintf(_(
'Family [%s] not found') , abs($fromid)));
468 if (($fld->defDoctype ==
'S') && ($fld->getRawValue(
"se_famid"))) {
469 $fromid = $fld->getRawValue(
"se_famid");
471 if (!is_object($fdoc) || !$fdoc->isAlive() || $fdoc->defDoctype !=
'C') {
472 throw new \Dcp\Exception(sprintf(_(
'Family [%s] not found') , abs($fromid)));
477 if ($trash ==
"only") $distinct =
true;
480 $tqsql = $searchDoc->getQueries();
487 foreach ($tqsql as $k => & $qsql) {
488 if ($qsql ==
false) unset($tqsql[$k]);
490 $isgroup = (count($tqsql) > 1);
491 foreach ($tqsql as & $qsql) {
492 if ($fromid != - 1) {
494 if (preg_match(
'/from\s+docread/', $qsql) || $isgroup) {
498 if ($fdoc ===
false) {
499 throw new \Dcp\Exception(sprintf(_(
'Family [%s] not found') , abs($fromid)));
507 $tsqlfields = $searchDoc->getReturnsFields();
509 if ($tsqlfields == null) {
510 $tsqlfields = array();
511 if (isset($fdoc->fields) && is_array($fdoc->fields)) {
512 $tsqlfields = array_merge($tsqlfields, $fdoc->fields);
514 if (isset($fdoc->sup_fields) && is_array($fdoc->sup_fields)) {
515 $tsqlfields = array_merge($tsqlfields, $fdoc->sup_fields);
519 if (!$join && preg_match(
'/from\s+([a-z0-9])*,/', $qsql)) {
523 if (preg_match(
'/from\s+([a-z0-9]*)/', $qsql, $reg)) {
524 $maintable = $reg[1];
527 foreach ($tsqlfields as $kf =>
$vf) {
528 if ($if++ > 0) $tsqlfields[$kf] = $maintable .
'.' .
$vf;
533 $maintabledot = ($maintable) ? $maintable .
'.' :
'';
534 $sqlfields = implode(
", ", $tsqlfields);
537 $qsql.= sprintf(
" and (%sviews && '%s')", $maintabledot, searchDoc::getUserViewVector($userid));
539 $qsql = str_replace(
"* from ",
"$sqlfields from ", $qsql);
542 $qsql = str_replace(
"* from ",
"$sqlfields from ", $qsql);
544 if ((!$distinct) && strstr($qsql,
"distinct")) $distinct =
true;
547 if ($join || $maintable) {
548 $qsql.=
" ORDER BY $maintable.initid, $maintable.id desc";
550 $qsql.=
" ORDER BY initid, id desc";
552 if (!$isgroup) $qsql.=
" LIMIT $slice OFFSET $start";
554 if (($fromid ==
"") && $orderby ==
"") $orderby =
"title";
555 elseif (substr($qsql, 0, 12) ==
"select doc.*") $orderby = "title";
556 if ($orderby == "" && (!$isgroup)) $qsql.= " LIMIT
$slice OFFSET
$start;";
559 $orderby = $searchDoc->orderby;
562 if ($orderby !=
'') {
563 $qsql.=
" ORDER BY $orderby LIMIT $slice OFFSET $start;";
565 $qsql.=
" LIMIT $slice OFFSET $start;";
574 $qsql.= sprintf(
" and (views && '%s')", searchDoc::getUserViewVector($userid));
579 $qsql.=
" ORDER BY $orderby LIMIT $slice OFFSET $start;";
582 if ($fromid == - 1) {
583 include_once
"FDL/Class.DocFam.php";
586 $fromid = abs($fromid);
589 include_once
"FDL$GEN/Class.Doc$fromid.php";
594 if (count($tqsql) > 0) {
595 if (count($tqsql) == 1) {
596 $usql = isset($tqsql[0]) ? $tqsql[0] :
"";
599 $usql =
'(' . implode($tqsql,
") union (") .
')';
600 if ($orderby) $usql.=
" ORDER BY $orderby LIMIT $slice OFFSET $start;";
601 else $usql.=
" LIMIT $slice OFFSET $start;";
604 if ($returnSqlOnly) {
608 $usql = preg_replace(
'/\s+ORDER\s+BY\s+.*?$/i',
'', $usql);
609 $usql = preg_replace(
'/;+\s*$/',
'', $usql);
613 $tableq =
$query->Query(0, 0, $qtype, $usql);
616 if ($qtype ==
"ITEM") {
617 $tretdocs[] = $tableq;
618 }
else $tretdocs = array_merge($tretdocs, $tableq);
621 if (
$query->basic_elem->msg_err !=
"") {
622 addLogMsg(
$query->basic_elem->msg_err, 200);
624 "query" =>
$query->LastQuery,
625 "err" =>
$query->basic_elem->msg_err
630 if ($debug !== null) {
631 $debug[
"count"] =
$query->nb;
632 $debug[
"query"] =
$query->LastQuery;
633 $debug[
"error"] =
$query->basic_elem->msg_err;
634 $debug[
"delay"] = sprintf(
"%.03fs",
microtime_diff(microtime() , $mb));
635 if (!empty($debug[
"log"])) {
636 addLogMsg(
$query->basic_elem->msg_err, 200);
639 } elseif (
$query->basic_elem->msg_err !=
"") {
640 $debug[
"query"] =
$query->LastQuery;
641 $debug[
"error"] =
$query->basic_elem->msg_err;
645 if ($returnSqlOnly) {
650 if ($returnSqlOnly) {
670 $sqlfld =
"fld.dirid=$dirid";
676 $q->AddQuery($sqlfld);
677 $q->AddQuery(
"qtype='S'");
680 $tfld =
$q->Query(0, $limit + 1,
"TABLE");
682 if (($reallylimit) && (
$q->nb > $limit))
return false;
684 $tfld =
$q->Query(0, $limit + 1,
"TABLE");
688 foreach ($tfld as $k => $v) {
689 $t[$v[
"childid"]] =
getLatestTDoc(
$dbaccess, $v[
"childid"], $sqlfilters, ($v[
"doctype"] ==
"C") ? -1 : $v[
"fromid"]);
690 if ($t[$v[
"childid"]] ==
false) unset($t[$v[
"childid"]]);
691 elseif ($t[$v[
"childid"]][
"archiveid"]) unset($t[$v[
"childid"]]);
694 unset($t[$v[
"childid"]]);
699 uasort($t,
"sortbytitle");
705 return strcasecmp($td1[
"title"], $td2[
"title"]);
711 function getMSearchDoc(
$dbaccess,
$dirid, $start =
"0",
$slice =
"ALL", $sqlfilters = array() , $userid = 1, $qtype =
"LIST", $fromid =
"", $distinct =
false, $orderby =
"title",
$latest =
true)
716 $tidsearch = $sdoc->getMultipleRawValues(
"SEG_IDCOND");
718 foreach ($tidsearch as $k => $v) {
719 $tdoc = array_merge(
internalGetDocCollection(
$dbaccess, $v, $start,
$slice, $sqlfilters, $userid, $qtype, $fromid, $distinct, $orderby,
$latest) ,
$tdoc);
741 $sqlfilter = array() , $limit = 100, $qtype =
"TABLE", $userid = 0)
746 if ($userid == 0) $userid = $action->user->id;
755 $a = $fdoc->getAttribute($aid);
758 $enum =
$a->getEnum();
759 foreach ($enum as $k => $v) {
760 if (in_array($kid, explode(
".", $k))) {
761 $tkids[] = substr($k, strrpos(
"." . $k,
'.'));
765 if (
$a->type ==
"enum") {
767 $sqlfilter[] =
"in_textlist($aid,'" . implode(
"') or in_textlist($aid,'", $tkids) .
"')";
769 $sqlfilter[] =
"$aid='" . implode(
"' or $aid='", $tkids) .
"'";
774 if ($name !=
"") $sqlfilter[] =
"title ~* '$name'";
776 return internalGetDocCollection(
$dbaccess, 0, 0, $limit, $sqlfilter, $userid,
"TABLE",
getFamIdFromName(
$dbaccess, $famname) ,
false,
"title");
782 if ($sqlvalue !=
"") {
783 $vals = explode(
"][", substr($sqlvalue, 1, -1));
784 foreach ($vals as $k1 => $v1) {
785 list($aname, $aval) = explode(
";;", $v1);
803 foreach ($tdir as $k => $v) {
804 $tableid[] = $v[
"id"];
826 if ($level > $levelmax) {
835 if (count($childs) > 0) {
836 foreach ($childs as $k => $v) {
837 if (!in_array($v, $rchilds)) {
839 if (is_array($t)) $rchilds = array_values(array_unique($t));
853 $query->Query(0, 0,
"TABLE");
867 $query->AddQuery(
"qtype='M'");
868 $query->AddQuery(
"dirid=$dirid");
872 $oquery =
$list[0][
"query"];
873 if (preg_match(
"/select (.+) from (.+)/", $oquery, $reg)) {
874 if (preg_match(
"/doctype( *)=/", $reg[2], $treg))
return false;
875 $nq = sprintf(
"select count(%s) from %s and ((doctype='D')or(doctype='S')) limit 1", $reg[1], $reg[2]);
877 $count =
$query->Query(0, 0,
"TABLE", $nq);
878 if ((
$query->nb > 0) && (is_array($count)) && ($count[0][
"count"] > 0))
return true;
880 catch(Exception $e) {
887 $qfld->AddQuery(
"qtype='S'");
888 $qfld->AddQuery(sprintf(
"fld.dirid=%d",
$dirid));
889 $qfld->AddQuery(
"doctype='D' or doctype='S'");
890 $lq = $qfld->Query(0, 1,
"TABLE");
893 if (!is_array($lq))
return false;
894 return ($qfld->nb > 0);
912 $query->AddQuery(
"doctype='C'");
914 if (is_array($classid)) {
916 foreach ($classid as $fid) {
918 $use[] = $tcdoc[
"usefor"];
921 }
else if ($classid > 0) {
923 $query->AddQuery(
"usefor = '" . $cdoc->usefor .
"'");
926 if ($userid > 1)
$query->AddQuery(sprintf(
"views && '%s'", searchDoc::getUserViewVector($userid)));
927 if (is_array($extraFilters) && count($extraFilters) > 0) {
928 foreach ($extraFilters as
$filter) {
929 $query->AddQuery($filter);
932 if ($qtype ==
"TABLE") {
933 $t =
$query->Query(0, 0, $qtype);
934 foreach ($t as $k => $v) {
937 usort($t,
"cmpfamtitle");
940 $query->order_by =
"lower(title)";
941 return $query->Query(0, 0, $qtype);
990 $chdoc =
$doc->GetFromDoc();
991 if ($defProfFamId ==
"") $defProfFamId =
$doc->defProfFamId;
994 if ($cond !=
"")
$filter[] =
"dpdoc_famid is null or (" .
GetSqlCond($chdoc,
"dpdoc_famid") .
")";
995 else $filter[] =
"dpdoc_famid is null";
996 $filter[] =
"fromid=" . $defProfFamId;
1013 if (count($tfid) > 0) {
1020 $l =
$query->Query(0, 0,
"TABLE");
1024 foreach ($l as $k => $v) {
1037 foreach ($ids as $k => $id) {
1039 if ((($userid == 1) ||
controlTdoc($tdoc1,
"view")) && ($tdoc1[
"doctype"] !=
'Z'))
$tdoc[$id] = $tdoc1;
1050 foreach ($ids as $k => $id) {
1052 if (($tdoc1 !==
false) && (($userid == 1) ||
controlTdoc($tdoc1,
"view")) && ($tdoc1[
"doctype"] !=
'Z'))
$tdoc[$id] = $tdoc1;
1066 $query->AddQuery(
"initid in (" . implode(
",", $ids) .
')');
1067 $query->AddQuery(
"locked != -1");
1069 if ($userid > 1)
$query->AddQuery(sprintf(
"views && '%s'", searchDoc::getUserViewVector($userid)));
1085 $id = abs(intval($id));
1086 if ($id == 0)
return false;
1089 $result = pg_query($dbid,
"select id from docfam where id=$id and usedocread=1");
1090 if (pg_numrows($result) > 0) {
1091 $result = pg_query($dbid,
"select fromid from docfam where fromid=$id;");
1092 if (pg_numrows($result) > 0) {
getSystemFamilies($dbaccess, $userid, $qtype="TABLE")
static getMemberOfVector($uid=0, $strict=false)
getTDoc($dbaccess, $id, $sqlfilters=array(), $result=array())
getMSearchDoc($dbaccess, $dirid, $start="0", $slice="ALL", $sqlfilters=array(), $userid=1, $qtype="LIST", $fromid="", $distinct=false, $orderby="title", $latest=true)
getSqlSearchDoc($dbaccess, $dirid, $fromid, $sqlfilters=array(), $distinct=false, $latest=true, $trash="", $simplesearch=false, $folderRecursiveLevel=2, $join= '', $only="")
print< H1 > Check Database< i > $dbaccess</i ></H1 > $a
getDocsFromIds($dbaccess, $ids, $userid=0)
familyNeedDocread($dbaccess, $id)
getNonSystemFamilies($dbaccess, $userid, $qtype="TABLE")
getFldDoc($dbaccess, $dirid, $sqlfilters=array(), $limit=100, $reallylimit=true)
controlTdoc(&$tdoc, $aclname)
getLatestDocsFromIds($dbaccess, $ids, $userid=0)
isInDir($dbaccess, $dirid, $docid)
getLatestTDoc($dbaccess, $initid, $sqlfilters=array(), $fromid=false)
GetClassesDoc($dbaccess, $userid, $classid=0, $qtype="LIST", $extraFilters=array())
getChildDocError($dbaccess, $dirid)
getChildDir($dbaccess, $userid, $dirid, $notfldsearch=false, $restype="LIST")
hasChildFld($dbaccess, $dirid, $issearch=false)
createDoc($dbaccess, $fromid, $control=true, $defaultvalues=true, $temporary=false)
isSimpleFilter($sqlfilters)
getChildDirId($dbaccess, $dirid)
internalGetDocCollection($dbaccess, $dirid, $start="0", $slice="ALL", $sqlfilters=array(), $userid=1, $qtype="LIST", $fromid="", $distinct=false, $orderby="title", $latest=true, $trash="", &$debug=null, $folderRecursiveLevel=2, $join= '',\SearchDoc &$searchDoc=null)
getFamilyCreationIds($dbaccess, $uid, $tfid=array())
getFamIdFromName($dbaccess, $name)
getKindDoc($dbaccess, $famname, $aid, $kid, $name="", $sqlfilter=array(), $limit=100, $qtype="TABLE", $userid=0)
getRChildDirId($dbaccess, $dirid, $rchilds=array(), $level=0, $levelmax=2)
getChildDoc($dbaccess, $dirid, $start="0", $slice="ALL", $sqlfilters=array(), $userid=1, $qtype="LIST", $fromid="", $distinct=false, $orderby="title", $latest=true, $trash="", &$debug=null, $folderRecursiveLevel=2, $join= '',\SearchDoc &$searchDoc=null)
deprecatedFunction($msg= '')
new_Doc($dbaccess, $id= '', $latest=false)
GetSqlCond($Table, $column, $integer=false)
if(($docid!==0)&&(!is_numeric($docid))) $query
GetProfileDoc($dbaccess, $docid, $defProfFamId="")
getVisibleDocsFromIds($dbaccess, $ids, $userid)