ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 40 of file class.ilLikeForumSearch.php.

References $counter, $ilDB, and array.

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

◆ __createTopicAndCondition()

ilLikeForumSearch::__createTopicAndCondition ( )

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

References $counter, and $ilDB.

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

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