35 define(
'QP_COMBINATION_AND',
'and');
 
   36 define(
'QP_COMBINATION_OR',
'or');
 
   60                 define(MIN_WORD_LENGTH,3);
 
   64                 $this->query_str = $a_query_str;
 
   67                 include_once 
'./Services/Search/classes/class.ilSearchSettings.php';
 
   83                 if(!$a_force and $this->settings->enabledIndex() and $a_length < 3)
 
   85                         $GLOBALS[
'ilLog']->write(__METHOD__.
': Disabled min word length');
 
   88                 $this->min_word_length = $a_length;
 
  100                         $a_value = (int)$a_value;
 
  106                 $this->global_min_length = $a_value;
 
  116                 $this->wildcards_allowed = (bool)$a_value;
 
  126                 $this->message = $a_msg;
 
  136                         $this->message .= 
'<br />';
 
  138                 $this->message .= $a_msg;
 
  143                 $this->combination = $a_combination;
 
  152                 return trim($this->query_str);
 
  156                 return $this->words ? $this->words : array();
 
  163                         return $this->quoted_words ? $this->quoted_words : array();
 
  167                         foreach($this->quoted_words as $word)
 
  169                                 $tmp_word[] = str_replace(
'\"',
'',$word);
 
  171                         return $tmp_word ? $tmp_word : array();
 
  190                 $this->words = array();
 
  192                 #if(!strlen($this->getQueryString())) 
  198                 foreach($words as $word)
 
  200                         if(!strlen(trim($word)))
 
  207                                 $this->
setMessage($this->lng->txt(
'search_minimum_three'));
 
  214                 if (!in_array($fullstr, $this->words))
 
  222                         foreach($this->words as $idx => $word)
 
  224                                 if(!stristr($word, 
'\\'))
 
  226                                         $word = str_replace(
'%', 
'\%', $word);
 
  227                                         $word = str_replace(
'_', 
'\_', $word);                                  
 
  229                                 $this->words[$idx] = $word;
 
  245                         $this->quoted_words[] = 
'';
 
  249                 while(preg_match(
"/\".*?\"/",
$query_str,$matches))
 
  257                 foreach($words as $word)
 
  259                         if(!strlen(trim($word)))
 
  269                         foreach($this->quoted_words as $idx => $word)
 
  271                                 if(!stristr($word, 
'\\'))
 
  273                                         $word = str_replace(
'%', 
'\%', $word);
 
  274                                         $word = str_replace(
'_', 
'\_', $word);                                  
 
  276                                 $this->quoted_words[$idx] = $word;
 
  291                         $this->
setMessage($this->lng->txt(
'msg_no_search_string'));