Core  3.2
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
Lib.Dir.php File Reference

Go to the source code of this file.

Namespaces

 FDL
 

Functions

 getFirstDir ($dbaccess)
 
 getChildDir ($dbaccess, $userid, $dirid, $notfldsearch=false, $restype="LIST")
 
 isSimpleFilter ($sqlfilters)
 
 getSqlSearchDoc ($dbaccess, $dirid, $fromid, $sqlfilters=array(), $distinct=false, $latest=true, $trash="", $simplesearch=false, $folderRecursiveLevel=2, $join= '', $only="")
 
 getChildDocError ($dbaccess, $dirid)
 
 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)
 
 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)
 
 getFldDoc ($dbaccess, $dirid, $sqlfilters=array(), $limit=100, $reallylimit=true)
 
 sortbytitle ($td1, $td2)
 
 getMSearchDoc ($dbaccess, $dirid, $start="0", $slice="ALL", $sqlfilters=array(), $userid=1, $qtype="LIST", $fromid="", $distinct=false, $orderby="title", $latest=true)
 
 getKindDoc ($dbaccess, $famname, $aid, $kid, $name="", $sqlfilter=array(), $limit=100, $qtype="TABLE", $userid=0)
 
 sqlval2array ($sqlvalue)
 
 getChildDirId ($dbaccess, $dirid)
 
 getRChildDirId ($dbaccess, $dirid, $rchilds=array(), $level=0, $levelmax=2)
 
 isInDir ($dbaccess, $dirid, $docid)
 
 hasChildFld ($dbaccess, $dirid, $issearch=false)
 
 GetClassesDoc ($dbaccess, $userid, $classid=0, $qtype="LIST", $extraFilters=array())
 
 getNonSystemFamilies ($dbaccess, $userid, $qtype="TABLE")
 
 getSystemFamilies ($dbaccess, $userid, $qtype="TABLE")
 
 cmpfamtitle ($a, $b)
 
 GetProfileDoc ($dbaccess, $docid, $defProfFamId="")
 
 getFamilyCreationIds ($dbaccess, $uid, $tfid=array())
 
 getDocsFromIds ($dbaccess, $ids, $userid=0)
 
 getLatestDocsFromIds ($dbaccess, $ids, $userid=0)
 
 getVisibleDocsFromIds ($dbaccess, $ids, $userid)
 
 familyNeedDocread ($dbaccess, $id)
 

Function Documentation

cmpfamtitle (   $a,
  $b 
)

Definition at line 972 of file Lib.Dir.php.

+ Here is the call graph for this function:

familyNeedDocread (   $dbaccess,
  $id 
)

return true for optimization select

Parameters
string$dbaccessdatabase specification
int$ididentifier of the document family
Returns
int false if error occured

Definition at line 1082 of file Lib.Dir.php.

+ Here is the call graph for this function:

getChildDir (   $dbaccess,
  $userid,
  $dirid,
  $notfldsearch = false,
  $restype = "LIST" 
)

Definition at line 38 of file Lib.Dir.php.

+ Here is the call graph for this function:

getChildDirId (   $dbaccess,
  $dirid 
)

query to find child directories (no recursive - only in the specified folder)

Parameters
string$dbaccessdatabase specification
int$diridthe id of folder where search subfolders
Returns
array

Definition at line 797 of file Lib.Dir.php.

+ Here is the call graph for this 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 
)

return array of documents

Parameters
string$dbaccessdatabase specification
array$diridthe array of id or single id of folder where search document
string$startthe start index
string$slicethe maximum number of returned document
array$sqlfiltersarray of sql filter
int$useridthe current user id
string$qtypeLIST|TABLE the kind of return : list of object or list or values array
int | string$fromididentifier of family document
bool$distinctif true all revision of the document are returned else only latest
string$orderbyfield order
bool$latestif true only latest else all revision
string$trash(no|only|also) search in trash or not
null$debug
int$folderRecursiveLevel
string$join
\SearchDoc$searchDocthe SearchDoc object when getChildDoc is used by a SearchDoc object
Deprecated:
use SearchDoc instead
See Also
SearchDoc
Returns
array/Doc

Definition at line 400 of file Lib.Dir.php.

+ Here is the call graph for this function:

getChildDocError (   $dbaccess,
  $dirid 
)

get possibles errors before request of getChildDoc

Parameters
string$dbaccessdatabase specification
array | int$diridthe array of id or single id of folder where search document
Returns
array error codes

Definition at line 319 of file Lib.Dir.php.

+ Here is the call graph for this function:

GetClassesDoc (   $dbaccess,
  $userid,
  $classid = 0,
  $qtype = "LIST",
  $extraFilters = array() 
)

return families with the same usefor

Parameters
string$dbaccessdatabase specification
int$userididentifier of the user
int$classidthe reference family to find by usefor (if 0 all families) can be an array of id
string$qtype[TABLE|LIST] use TABLE if you can because LIST cost too many memory
Returns
array the families

Definition at line 906 of file Lib.Dir.php.

+ Here is the call graph for this function:

getDocsFromIds (   $dbaccess,
  $ids,
  $userid = 0 
)

get array of document values from array od document id

Parameters
string$dbaccessdatabase specification

Definition at line 1034 of file Lib.Dir.php.

+ Here is the call graph for this function:

getFamilyCreationIds (   $dbaccess,
  $uid,
  $tfid = array() 
)

get array of family id that the user can create interactivaly

Parameters
string$dbaccessdatabase specification
int$uiduser identifier
array$tfidrestriction of this set of family id
Returns
array of family identificators

Definition at line 1009 of file Lib.Dir.php.

+ Here is the call graph for this function:

getFirstDir (   $dbaccess)

Definition at line 22 of file Lib.Dir.php.

getFldDoc (   $dbaccess,
  $dirid,
  $sqlfilters = array(),
  $limit = 100,
  $reallylimit = true 
)

optimization for getChildDoc

Parameters
int$limitif -1 no limit
bool$reallylimitif false don't return false if limit is reached

Definition at line 664 of file Lib.Dir.php.

+ Here is the call graph for this function:

getKindDoc (   $dbaccess,
  $famname,
  $aid,
  $kid,
  $name = "",
  $sqlfilter = array(),
  $limit = 100,
  $qtype = "TABLE",
  $userid = 0 
)

return array of documents

based on {

See Also
getChildDoc()} it return document with enum attribute condition return document which the $aid attribute has the value $kid
Parameters
string$dbaccessdatabase specification
string$famnameinternal name of family document
string$aidthe attribute identifier
string$kidthe key for enum value to search
string$nameadditionnal filter on the title
array$sqlfiltersarray of sql filter
int$limitmax document returned
string$qtypeLIST|TABLE the kind of return : list of object or list or values array
int$useridthe current user id
Returns
array/Doc

Definition at line 740 of file Lib.Dir.php.

+ Here is the call graph for this function:

getLatestDocsFromIds (   $dbaccess,
  $ids,
  $userid = 0 
)

get array of document values from array od document id

Parameters
string$dbaccessdatabase specification

Definition at line 1047 of file Lib.Dir.php.

+ Here is the call graph for this function:

getMSearchDoc (   $dbaccess,
  $dirid,
  $start = "0",
  $slice = "ALL",
  $sqlfilters = array(),
  $userid = 1,
  $qtype = "LIST",
  $fromid = "",
  $distinct = false,
  $orderby = "title",
  $latest = true 
)

optimization for getChildDoc in case of grouped searches not used

Definition at line 711 of file Lib.Dir.php.

+ Here is the call graph for this function:

getNonSystemFamilies (   $dbaccess,
  $userid,
  $qtype = "TABLE" 
)

Return non-system families

Parameters
string$dbaccessdatabase specification
int$userididentifier of the user
string$qtyperesult format "TABLE" | "LIST" (Avoid using "LIST" as it's memory hungry)(default is "TABLE")
Returns
array the families

Definition at line 952 of file Lib.Dir.php.

+ Here is the call graph for this function:

GetProfileDoc (   $dbaccess,
  $docid,
  $defProfFamId = "" 
)

return array of possible profil for profile type

Parameters
string$dbaccessdatabase specification
int$famidthe id of family document
Returns
array/Doc
See Also
getChildDir()

Definition at line 984 of file Lib.Dir.php.

+ Here is the call graph for this function:

getRChildDirId (   $dbaccess,
  $dirid,
  $rchilds = array(),
  $level = 0,
  $levelmax = 2 
)

return array of subfolder id until sublevel 2 (RECURSIVE)

Parameters
string$dbaccessdatabase specification
int$diridthe id of folder where search subfolders
array$rchildsuse for recursion (dont't set anything)
int$leveluse for recursion (dont't set anything)
int$levelmaxmax recursion level (default 2)
Returns
array/int
See Also
getChildDir()

Definition at line 822 of file Lib.Dir.php.

+ Here is the call graph for this function:

getSqlSearchDoc (   $dbaccess,
  $dirid,
  $fromid,
  $sqlfilters = array(),
  $distinct = false,
  $latest = true,
  $trash = "",
  $simplesearch = false,
  $folderRecursiveLevel = 2,
  $join = '',
  $only = "" 
)

compose query to serach document

Parameters
string$dbaccessdatabase specification
array$diridthe array of id or single id of folder where search document (0 => in all DB)
string$fromidfor a specific familly (0 => all familly) (<0 strict familly)
array$sqlfiltersarray of sql filter
bool$distinct
bool$latestset false if search in all revised doc
string$trash(no|only|also) search in trash or not
bool$simplesearchset false if search is about specific attributes
int$folderRecursiveLevel
string$joindefined a join table like "id = dochisto(id)"
string$onlyset "only" to have only family (not descandent);
Returns
array|bool|string

Definition at line 108 of file Lib.Dir.php.

+ Here is the call graph for this function:

getSystemFamilies (   $dbaccess,
  $userid,
  $qtype = "TABLE" 
)

Return system families

Parameters
string$dbaccessdatabase specification
int$userididentifier of the user
string$qtyperesult format "TABLE" | "LIST" (Avoid using "LIST" as it's memory hungry)(default is "TABLE")
Returns
array the families

Definition at line 966 of file Lib.Dir.php.

+ Here is the call graph for this function:

getVisibleDocsFromIds (   $dbaccess,
  $ids,
  $userid 
)

get array of document values from array od document id

Parameters
string$dbaccessdatabase specification
string$idsarray of init id -only initid-
string$useridthe user where search visibility

Definition at line 1062 of file Lib.Dir.php.

hasChildFld (   $dbaccess,
  $dirid,
  $issearch = false 
)

return true if dirid has one or more child dir

Parameters
string$dbaccessdatabase specification
int$diridfolder id
Returns
bool

Definition at line 862 of file Lib.Dir.php.

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 
)

system only - used by core return array of documents

Parameters
string$dbaccessdatabase specification
array$diridthe array of id or single id of folder where search document
string$startthe start index
string$slicethe maximum number of returned document
array$sqlfiltersarray of sql filter
int$useridthe current user id
string$qtypeLIST|TABLE the kind of return : list of object or list or values array
int | string$fromididentifier of family document
bool$distinctif false all revision of the document are returned else only latest
string$orderbyfield order
bool$latestif true only latest else all revision
string$trash(no|only|also) search in trash or not
bool$debug
int$folderRecursiveLevel
string$join
\SearchDoc$searchDocthe SearchDoc object when getChildDoc is used by a SearchDoc object

Definition at line 428 of file Lib.Dir.php.

isInDir (   $dbaccess,
  $dirid,
  $docid 
)

Definition at line 846 of file Lib.Dir.php.

isSimpleFilter (   $sqlfilters)

Definition at line 68 of file Lib.Dir.php.

sortbytitle (   $td1,
  $td2 
)

Definition at line 703 of file Lib.Dir.php.

sqlval2array (   $sqlvalue)

Definition at line 778 of file Lib.Dir.php.

← centre documentaire © anakeen