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

Public Member Functions

 ilForumSearch (&$qp_obj)
 Constructor public.
 __createPostAndCondition ()
 __createTopicAndCondition ()
- Public Member Functions inherited from ilForumSearch
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.ilLikeForumSearch.php.

Member Function Documentation

ilLikeForumSearch::__createPostAndCondition ( )

Definition at line 50 of file class.ilLikeForumSearch.php.

References $ilDB.

{
global $ilDB;
/*
$concat = " CONCAT(";
$concat .= 'pos_message,pos_subject';
$concat .= ") ";
*/
$concat = $ilDB->concat(
array(
array('pos_subject','text'),
array('pos_message','text')));
$and = " AND ( ";
$counter = 0;
foreach($this->query_parser->getQuotedWords() as $word)
{
if($counter++)
{
$and .= " OR";
}
#$and .= $concat;
#$and .= ("LIKE ('%".$word."%')");
$and .= $ilDB->like($concat,'clob','%'.$word.'%');
}
return $and.") ";
}
ilLikeForumSearch::__createTopicAndCondition ( )

Definition at line 79 of file class.ilLikeForumSearch.php.

References $ilDB.

{
global $ilDB;
$field = 'thr_subject ';
$and = " AND( ";
$counter = 0;
foreach($this->query_parser->getQuotedWords() as $word)
{
if($counter++)
{
$and .= " OR ";
}
#$and .= $field;
#$and .= ("LIKE ('%".$word."%')");
$and .= $ilDB->like($field,'text','%'.$word.'%');
}
return $and." ) ";
}
ilLikeForumSearch::ilForumSearch ( $qp_obj)

Constructor public.

Reimplemented from ilForumSearch.

Definition at line 44 of file class.ilLikeForumSearch.php.

{
}

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