Go to the source code of this file.
Namespaces | |
FDL | |
Functions | |
GetSqlCond2 ($Table, $column) | |
GetSqlCond ($Table, $column, $integer=false) | |
first ($a) | |
notEmpty ($a) | |
HandleXmlError ($errno, $errstr, $errfile, $errline) | |
clearCacheDoc ($id=0) | |
new_Doc ($dbaccess, $id= '', $latest=false) | |
createDoc ($dbaccess, $fromid, $control=true, $defaultvalues=true, $temporary=false) | |
createTmpDoc ($dbaccess, $fromid, $defaultvalue=true) | |
getFromId ($dbaccess, $id) | |
getFromName ($dbaccess, $id) | |
getFamFromId ($dbaccess, $id) | |
getDocTitle ($id, $latest=true) | |
getDocProperties ($id, $latest=true, array $prop=array("title")) | |
getTDoc ($dbaccess, $id, $sqlfilters=array(), $result=array()) | |
getv (&$t, $k, $d="") | |
getvs (&$t) | |
tordered ($a, $b) | |
cmp_cvorder3 ($a, $b) | |
controlTdoc (&$tdoc, $aclname) | |
getDocObject ($dbaccess, $v, $k=0) | |
getNextDbObject ($dbaccess, $res) | |
getNextDoc ($dbaccess, &$tres) | |
countDocs (&$tres) | |
getFamIdFromName ($dbaccess, $name) | |
getIdFromTitle ($dbaccess, $title, $famid="", $only=false) | |
getIdFromName ($dbaccess, $name) | |
getInitidFromName ($name) | |
getNameFromId ($dbaccess, $id) | |
setFamidInLayout (Action &$action) | |
getDocFromUserId ($dbaccess, $userid) | |
getFamTitle (&$tdoc) | |
isFixedDoc ($dbaccess, $id) | |
fixMultipleAliveDocument (Doc &$doc) | |
ComputeVisibility ($vis, $fvis, $ffvis= '') | |
getLatestTDoc ($dbaccess, $initid, $sqlfilters=array(), $fromid=false) | |
getLatestDocIds ($dbaccess, $ids) | |
getLatestDocId ($dbaccess, $initid) | |
getRevTDoc ($dbaccess, $initid, $rev) | |
getLatestRevisionNumber ($dbaccess, $initid, $fromid=0) | |
createAutoFolder (&$doc) | |
getMyProfil ($dbaccess, $create=true) | |
xt_innerXML (&$node) | |
cleanhtml ($html) | |
cleanhtml | ( | $html | ) |
clearCacheDoc | ( | $id = 0 | ) |
clear all cache used by new_doc function
int | $id | document identifier : limit to destroy cache of only this document |
Definition at line 94 of file freedom_util.php.
cmp_cvorder3 | ( | $a, | |
$b | |||
) |
Definition at line 500 of file freedom_util.php.
ComputeVisibility | ( | $vis, | |
$fvis, | |||
$ffvis = '' |
|||
) |
Definition at line 811 of file freedom_util.php.
controlTdoc | ( | & | $tdoc, |
$aclname | |||
) |
control privilege for a document in the array form the array must provide from getTdoc the function is equivalent of Doc::Control
array | $tdoc | document |
string | $aclname | identifier of the privilege to test |
Definition at line 515 of file freedom_util.php.
countDocs | ( | & | $tres | ) |
count returned document in sql select ressources
array | $tres | of ressources return Doc the next doc (false if the end) |
Definition at line 593 of file freedom_util.php.
createAutoFolder | ( | & | $doc | ) |
Create default folder for a family with default constraint
Doc | $Doc | the family object document |
Definition at line 983 of file freedom_util.php.
createDoc | ( | $dbaccess, | |
$fromid, | |||
$control = true , |
|||
$defaultvalues = true , |
|||
$temporary = false |
|||
) |
create a new document object in type concordance
the document is set with default values and default profil of the family
string | $dbaccess | database specification |
string | $fromid | identifier of the family document (the number or internal name) |
bool | $control | if false don't control the user hability to create this kind of document |
bool | $defaultvalues | if false not affect default values |
bool | $temporary | if true create document as temporary doc (use Doc::createTmpDoc instead) |
Definition at line 211 of file freedom_util.php.
createTmpDoc | ( | $dbaccess, | |
$fromid, | |||
$defaultvalue = true |
|||
) |
create a temporary document object in type concordance
the document is set with default values and has no profil the create privilege is not tested in this case
string | $dbaccess | database specification |
string | $fromid | identifier of the family document (the number or internal name) |
bool | $defaultvalue | set to false to not set default values |
Definition at line 262 of file freedom_util.php.
first | ( | $a | ) |
return first element of array
array | $a |
Definition at line 63 of file freedom_util.php.
fixMultipleAliveDocument | ( | Doc & | $doc | ) |
lock oldest alive revision in case of conflict
Doc | $doc |
Definition at line 789 of file freedom_util.php.
getDocFromUserId | ( | $dbaccess, | |
$userid | |||
) |
return freedom user document in concordance with what user id
string | $dbaccess | database specification |
int | $userid | what user identifier |
Definition at line 744 of file freedom_util.php.
getDocObject | ( | $dbaccess, | |
$v, | |||
$k = 0 |
|||
) |
get document object from array document values
string | $dbaccess | database specification |
array | $v | values of document |
Definition at line 542 of file freedom_util.php.
getDocProperties | ( | $id, | |
$latest = true , |
|||
array | $prop = array( "title") |
||
) |
get some properties for a document
$id | ||
bool | $latest | |
array | $prop | properties list to retrieve |
Definition at line 372 of file freedom_util.php.
getDocTitle | ( | $id, | |
$latest = true |
|||
) |
get document title from document identifier
int | string | $id | document identifier |
bool | $latest | set to false for a fixed id or true for latest |
Definition at line 348 of file freedom_util.php.
getFamFromId | ( | $dbaccess, | |
$id | |||
) |
return from id for family document
string | $dbaccess | database specification |
int | $id | identifier of the object |
Definition at line 326 of file freedom_util.php.
getFamIdFromName | ( | $dbaccess, | |
$name | |||
) |
return the identifier of a family from internal name
string | $dbaccess | database specification |
string | $name | internal family name |
Definition at line 607 of file freedom_util.php.
getFamTitle | ( | & | $tdoc | ) |
Definition at line 766 of file freedom_util.php.
getFromId | ( | $dbaccess, | |
$id | |||
) |
return from id for document (not for family (use
string | $dbaccess | database specification |
int | $id | identifier of the object |
Definition at line 279 of file freedom_util.php.
getFromName | ( | $dbaccess, | |
$id | |||
) |
return from name for document (not for family (use
string | $dbaccess | database specification |
int | $id | identifier of the object |
Definition at line 303 of file freedom_util.php.
getIdFromName | ( | $dbaccess, | |
$name | |||
) |
return the latest identifier of a document from its logical name
string | $dbaccess | database specification |
string | $name | logical name |
Definition at line 661 of file freedom_util.php.
getIdFromTitle | ( | $dbaccess, | |
$title, | |||
$famid = "" , |
|||
$only = false |
|||
) |
return the identifier of a document from a search with title
string | $dbaccess | database specification |
string | $name | logical name |
string | $famid | must be set to increase speed search |
boolean | $only | set to true to not search in subfamilies |
Definition at line 642 of file freedom_util.php.
getInitidFromName | ( | $name | ) |
return the initial identifier of a document from its logical name
string | $name |
Definition at line 692 of file freedom_util.php.
getLatestDocId | ( | $dbaccess, | |
$initid | |||
) |
return latest id of document from its initid or other id
string | $dbaccess | database specification |
int | $initid | document identificator |
Definition at line 909 of file freedom_util.php.
getLatestDocIds | ( | $dbaccess, | |
$ids | |||
) |
return identificators according to latest revision the order is not the same as parameters. The key of result containt initial id
string | $dbaccess | database specification |
array | $ids | array of document identificators |
Definition at line 885 of file freedom_util.php.
getLatestRevisionNumber | ( | $dbaccess, | |
$initid, | |||
$fromid = 0 |
|||
) |
return really latest revision number use only for debug mode
string | $dbaccess | database specification |
int | $initid | initial identifier of the document |
int | $fromid | family identicator of document |
Definition at line 960 of file freedom_util.php.
getLatestTDoc | ( | $dbaccess, | |
$initid, | |||
$sqlfilters = array() , |
|||
$fromid = false |
|||
) |
return doc array of latest revision of initid
string | $dbaccess | database specification |
string | $initid | initial identifier of the document |
array | $sqlfilters | add sql supply condition |
Definition at line 837 of file freedom_util.php.
getMyProfil | ( | $dbaccess, | |
$create = true |
|||
) |
get personal profil
return the profil named "PERSONAL-PROFIL-<$uid>" the document return is a folder profil that can be use also for "normal" documents
Definition at line 1005 of file freedom_util.php.
getNameFromId | ( | $dbaccess, | |
$id | |||
) |
return the logical name of a document from its initial identifier
string | $dbaccess | database specification |
string | $id | initial identifier |
Definition at line 705 of file freedom_util.php.
getNextDbObject | ( | $dbaccess, | |
$res | |||
) |
return the next document in sql select ressources use with "ITEM" type searches direct in QueryDb return Doc the next doc (false if the end)
Definition at line 564 of file freedom_util.php.
getNextDoc | ( | $dbaccess, | |
& | $tres | ||
) |
return the next document in sql select ressources use with "ITEM" type searches with getChildDoc return Doc the next doc (false if the end)
Definition at line 575 of file freedom_util.php.
getRevTDoc | ( | $dbaccess, | |
$initid, | |||
$rev | |||
) |
return doc array of specific revision of document initid
string | $dbaccess | database specification |
string | $initid | initial identifier of the document |
int | $rev | revision number |
Definition at line 931 of file freedom_util.php.
GetSqlCond | ( | $Table, | |
$column, | |||
$integer = false |
|||
) |
Definition at line 38 of file freedom_util.php.
GetSqlCond2 | ( | $Table, | |
$column | |||
) |
Definition at line 22 of file freedom_util.php.
getTDoc | ( | $dbaccess, | |
$id, | |||
$sqlfilters = array() , |
|||
$result = array() |
|||
) |
return document table value
string | $dbaccess | database specification |
int | $id | identifier of the object |
array | $sqlfilters | add sql supply condition |
array | $result |
Definition at line 398 of file freedom_util.php.
getv | ( | & | $t, |
$k, | |||
$d = "" |
|||
) |
return the value of an doc array item
array | &$t | the array where get value |
string | $k | the index of the value |
string | $d | default value if not found or if it is empty |
Definition at line 447 of file freedom_util.php.
getvs | ( | & | $t | ) |
complete all values of an doc array item
array | &$t | the array where get value |
Definition at line 472 of file freedom_util.php.
HandleXmlError | ( | $errno, | |
$errstr, | |||
$errfile, | |||
$errline | |||
) |
function use by Doc::getOOoValue() use to trap XML parsing error : raise exception
int | $errno | error number |
string | $errstr | error message |
string | $errfile | |
string | $errline | error line |
Definition at line 83 of file freedom_util.php.
isFixedDoc | ( | $dbaccess, | |
$id | |||
) |
verify in database if document is fixed
Definition at line 777 of file freedom_util.php.
new_Doc | ( | $dbaccess, | |
$id = '' , |
|||
$latest = false |
|||
) |
return document object in type concordance
string | $dbaccess | database specification |
int | string | $id | identifier of the object |
bool | $latest | if true set to latest revision of doc |
Definition at line 119 of file freedom_util.php.
notEmpty | ( | $a | ) |
Definition at line 70 of file freedom_util.php.
setFamidInLayout | ( | Action & | $action | ) |
tordered | ( | $a, | |
$b | |||
) |
use to usort attributes
BasicAttribute | $a | |
BasicAttribute | $b |
Definition at line 488 of file freedom_util.php.
xt_innerXML | ( | & | $node | ) |