ILIAS
Release_4_0_x_branch Revision 61816
◀ ilDoc Overview
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Groups
Pages
class.ilMediaPoolSearch.php
Go to the documentation of this file.
1
<?php
2
/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
15
include_once
'Services/Search/classes/class.ilAbstractSearch.php'
;
16
17
class
ilMediaPoolSearch
extends
ilAbstractSearch
18
{
23
function
ilMediaPoolSearch
(&
$query_parser
)
24
{
25
parent::ilAbstractSearch
(
$query_parser
);
26
}
27
28
29
30
function
&
performSearch
()
31
{
32
$this->
setFields
(array(
'title'
));
33
34
$and = $this->__createAndCondition();
35
$locate = $this->
__createLocateString
();
36
37
$query
=
"SELECT mep_id,obj_id "
.
38
$locate.
39
"FROM mep_tree JOIN mep_item ON child = obj_id "
.
40
$and;
41
42
$res
= $this->db->query(
$query
);
43
while
(
$row
=
$res
->fetchRow(
DB_FETCHMODE_OBJECT
))
44
{
45
$this->search_result->addEntry(
$row
->mep_id,
'mep'
,$this->__prepareFound(
$row
),
$row
->obj_id);
46
}
47
return
$this->search_result
;
48
}
49
50
public
function
performKeywordSearch
()
51
{
52
$this->
setFields
(array(
'keyword'
));
53
54
$and = $this->__createKeywordAndCondition();
55
$locate = $this->
__createLocateString
();
56
57
58
$query
=
"SELECT mep_id, child "
.
59
$locate.
60
"FROM mep_item mi "
.
61
"JOIN mep_tree ON mi.obj_id = child "
.
62
"JOIN il_meta_keyword mk ON foreign_id = mk.obj_id "
.
63
$and.
64
"AND obj_type = 'mob'"
;
65
66
$res
= $this->db->query(
$query
);
67
while
(
$row
=
$res
->fetchRow(
DB_FETCHMODE_OBJECT
))
68
{
69
$this->search_result->addEntry(
$row
->mep_id,
'mep'
,$this->__prepareFound(
$row
),
$row
->child);
70
}
71
return
$this->search_result
;
72
}
73
}
74
?>
Services
Search
classes
class.ilMediaPoolSearch.php
Generated on Wed Apr 27 2016 19:01:49 for ILIAS by
1.8.1.2 (using
Doxyfile
)