Platform
3.1
PHP API documentation
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Pages
Lib.Document.php
Go to the documentation of this file.
1
<?php
2
/*
3
* @author Anakeen
4
* @license http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ Anakeen - licence CC
5
* @package FDL
6
*/
7
/**
8
* Document Library
9
*
10
* @author Anakeen 2009
11
* @version $Id: $
12
* @license http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ Anakeen - licence CC
13
* @package FDL
14
*/
15
/**
16
*/
17
18
function
getDavUrl
(
$docid
, $vid)
19
{
20
if
(include_once (
"DAV/getsessionid.php"
)) {
21
return
dav_getdavurl
(
$docid
, $vid);
22
}
23
}
24
/**
25
* return document list for relation attribute
26
* @return array
27
*/
28
function
searchByTitle
(
$famid
, $key)
29
{
30
include_once (
"FDL/Class.SearchDoc.php"
);
31
$doc
=
new
Fdl_Collection
();
32
$s
=
new
SearchDoc
(
$doc
->dbaccess,
$famid
);
33
$s
->addFilter(sprintf(
"title ~* '%s'"
, pg_escape_string($key)));
34
$s
->slice = 100;
35
$res =
$s
->search();
36
$out
= array();
37
foreach
($res as $v) {
38
$out
[] = array(
39
"display"
=> $v[
"title"
],
40
"id"
=> $v[
"id"
],
41
"title"
=> $v[
"title"
]
42
);
43
}
44
return
$out
;
45
}
46
?>
← centre documentaire
© anakeen
- published under
CC License
-
Dynacase