ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilLikeForumSearch Class Reference
+ Inheritance diagram for ilLikeForumSearch:
+ Collaboration diagram for ilLikeForumSearch:

Public Member Functions

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

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

◆ __createPostAndCondition()

ilLikeForumSearch::__createPostAndCondition ( )

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

References $counter, $ilDB, and array.

40  {
41  global $ilDB;
42 
43  /*
44  $concat = " CONCAT(";
45  $concat .= 'pos_message,pos_subject';
46  $concat .= ") ";
47  */
48  $concat = $ilDB->concat(
49  array(
50  array('pos_subject','text'),
51  array('pos_message','text'))
52  );
53 
54  $and = " AND ( ";
55  $counter = 0;
56  foreach ($this->query_parser->getQuotedWords() as $word) {
57  if ($counter++) {
58  $and .= " OR";
59  }
60  #$and .= $concat;
61  #$and .= ("LIKE ('%".$word."%')");
62  $and .= $ilDB->like($concat, 'clob', '%' . $word . '%');
63  }
64  return $and . ") ";
65  }
$counter
Create styles array
The data for the language used.
global $ilDB

◆ __createTopicAndCondition()

ilLikeForumSearch::__createTopicAndCondition ( )

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

References $counter, and $ilDB.

68  {
69  global $ilDB;
70 
71  $field = 'thr_subject ';
72  $and = " AND( ";
73 
74  $counter = 0;
75  foreach ($this->query_parser->getQuotedWords() as $word) {
76  if ($counter++) {
77  $and .= " OR ";
78  }
79  #$and .= $field;
80  #$and .= ("LIKE ('%".$word."%')");
81  $and .= $ilDB->like($field, 'text', '%' . $word . '%');
82  }
83  return $and . " ) ";
84  }
$counter
global $ilDB

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