Go to the documentation of this file.00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00035 include_once 'Services/Search/classes/class.ilMetaDataSearch.php';
00036
00037 class ilLikeMetaDataSearch extends ilMetaDataSearch
00038 {
00039
00044 function ilLikeMetaDataSearch(&$qp_obj)
00045 {
00046 parent::ilMetaDataSearch($qp_obj);
00047 }
00048
00049
00050 function __createKeywordWhereCondition()
00051 {
00052 $concat = ' keyword ';
00053 $where = " WHERE (";
00054 $counter = 0;
00055 foreach($this->query_parser->getQuotedWords() as $word)
00056 {
00057 if($counter++)
00058 {
00059 $where .= "OR";
00060 }
00061 $where .= $concat;
00062 $where .= (" LIKE ('%".$word."%')");
00063 }
00064 return $where.') ';
00065 }
00066
00067 function __createContributeWhereCondition()
00068 {
00069 $concat = ' entity ';
00070 $where = " WHERE (";
00071 $counter = 0;
00072 foreach($this->query_parser->getQuotedWords() as $word)
00073 {
00074 if($counter++)
00075 {
00076 $where .= "OR";
00077 }
00078 $where .= $concat;
00079 $where .= (" LIKE ('%".$word."%')");
00080 }
00081 return $where.') ';
00082 }
00083 function __createTitleWhereCondition()
00084 {
00085 #$concat = ' CONCAT(title,coverage) '; // broken if coverage is null
00086
00087 $concat = ' title ';
00088
00089 $where = " WHERE (";
00090 $counter = 0;
00091 foreach($this->query_parser->getQuotedWords() as $word)
00092 {
00093 if($counter++)
00094 {
00095 $where .= "OR";
00096 }
00097 $where .= $concat;
00098 $where .= (" LIKE ('%".$word."%')");
00099 }
00100 return $where.' )';
00101 }
00102
00103 function __createDescriptionWhereCondition()
00104 {
00105 $concat = ' description ';
00106 $where = " WHERE (";
00107 $counter = 0;
00108 foreach($this->query_parser->getQuotedWords() as $word)
00109 {
00110 if($counter++)
00111 {
00112 $where .= "OR";
00113 }
00114 $where .= $concat;
00115 $where .= (" LIKE ('%".$word."%')");
00116 }
00117 return $where.') ';
00118 }
00119 }
00120 ?>