ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilLikeForumSearch Class Reference
+ Inheritance diagram for ilLikeForumSearch:
+ Collaboration diagram for ilLikeForumSearch:

Public Member Functions

 __createPostAndCondition ()
 
 __createTopicAndCondition ()
 
- Public Member Functions inherited from ilForumSearch
 performSearch ()
 
- Public Member Functions inherited from ilAbstractSearch
 __construct (ilQueryParser $qp_obj)
 
 setFields (array $a_fields)
 
 getFields ()
 
 setFilter (array $a_filter)
 
 setIdFilter (array $a_id_filter)
 
 getIdFilter ()
 
 appendToFilter (string $a_type)
 
 getFilter ()
 
 __createLocateString ()
 
 __prepareFound (object $row)
 
 performSearch ()
 

Additional Inherited Members

- Protected Attributes inherited from ilAbstractSearch
ilDBInterface $db
 
ilQueryParser $query_parser
 
ilSearchResult $search_result
 
array $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.

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

◆ __createTopicAndCondition()

ilLikeForumSearch::__createTopicAndCondition ( )

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

65  : string
66  {
67  $field = 'thr_subject ';
68  $and = " AND( ";
69 
70  $counter = 0;
71  foreach ($this->query_parser->getQuotedWords() as $word) {
72  if ($counter++) {
73  $and .= " OR ";
74  }
75  #$and .= $field;
76  #$and .= ("LIKE ('%".$word."%')");
77  $and .= $this->db->like($field, 'text', '%' . $word . '%');
78  }
79  return $and . " ) ";
80  }

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