ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilForumSearch Class Reference
+ Inheritance diagram for ilForumSearch:
+ Collaboration diagram for ilForumSearch:

Public Member Functions

 ilForumSearch (&$query_parser)
 Constructor public.
performSearch ()
 __createAndCondition ()
- Public Member Functions inherited from ilAbstractSearch
 ilAbstractSearch (&$qp_obj)
 Constructor public.
 setFields ($a_fields)
 Set fields to search.
 getFields ()
 Get fields to search.
 setFilter ($a_filter)
 set object type to search in
 setIdFilter ($a_id_filter)
 Set id filter Filters search by given object id.
 getIdFilter ()
 Get Id filter.
 appendToFilter ($a_type)
 Append object type to filter.
 getFilter ()
 get object type to search in
 __createLocateString ()
 build locate string in case of AND search
 __prepareFound (&$row)

Additional Inherited Members

- Data Fields inherited from ilAbstractSearch
 $db = null
 $query_parser = null
 $search_result = null
 $object_types

Detailed Description

Definition at line 37 of file class.ilForumSearch.php.

Member Function Documentation

ilForumSearch::__createAndCondition ( )

Definition at line 95 of file class.ilForumSearch.php.

{
echo "Overwrite me!";
}
ilForumSearch::ilForumSearch ( $query_parser)

Constructor public.

Reimplemented in ilLikeForumSearch.

Definition at line 43 of file class.ilForumSearch.php.

References ilAbstractSearch\$query_parser, and ilAbstractSearch\ilAbstractSearch().

Referenced by ilFulltextForumSearch\ilFulltextForumSearch().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

& ilForumSearch::performSearch ( )

Reimplemented from ilAbstractSearch.

Definition at line 48 of file class.ilForumSearch.php.

References $query, $res, $row, ilAbstractSearch\$search_result, ilAbstractSearch\__createLocateString(), DB_FETCHMODE_OBJECT, and ilAbstractSearch\setFields().

{
// Search in topic titles, posting title, posting
// First: search topics:
$this->setFields(array('thr_subject'));
$and = $this->__createTopicAndCondition();
$locate = $this->__createLocateString();
$query = "SELECT thr_pk,top_frm_fk frm_id ".
$locate.
"FROM frm_threads,frm_data ".
"WHERE top_pk = thr_top_fk ".
$and;
$res = $this->db->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
#$thread_post = $row->thr_pk.'_0';
$thread_post = $row->thr_pk;
$this->search_result->addEntry($row->frm_id,'frm',$this->__prepareFound($row),$thread_post);
}
// First: search post title, content:
$this->setFields(array('pos_subject','pos_message'));
$and = $this->__createPostAndCondition();
$locate = $this->__createLocateString();
$query = "SELECT top_frm_fk frm_id,pos_thr_fk,pos_pk ".
$locate.
"FROM frm_posts,frm_data ".
"WHERE pos_top_fk = top_pk ".
$and;
$res = $this->db->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
#$thread_post = $row->pos_thr_fk.'_'.$row->pos_pk;
$thread_post = $row->pos_thr_fk;
$this->search_result->addEntry($row->frm_id,'frm',$this->__prepareFound($row),$thread_post);
}
}

+ Here is the call graph for this function:


The documentation for this class was generated from the following file: