Changeset 13033
- Timestamp:
- 10/23/07 20:04:38 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/MidCOM_2_8/midcom.helper.search/config/manifest.inc
r12981 r13033 1 1 'name' => 'midcom.helper.search', 2 'version' => '1.0.4beta 2',2 'version' => '1.0.4beta3', 3 3 'state' => 'beta', 4 4 'purecode' => false, branches/MidCOM_2_8/midcom.helper.search/viewer.php
r12971 r13033 95 95 $final_query .= ' AND (__LANG:"' . $_MIDCOM->i18n->get_current_language() . '" OR __LANG:"")'; 96 96 } 97 } 98 99 /** 100 * Expand arrays of custom rules to end of query 101 * 102 * @param $final_query reference to the query string to be passed on to the indexer. 103 * @param $terms array or string to append 104 */ 105 function append_terms_recursive(&$final_query, $terms) 106 { 107 if (is_array($terms)) 108 { 109 foreach ($terms as $term) 110 { 111 $this->append_terms_recursive($final_query, $term); 112 } 113 return; 114 } 115 if (is_string($terms)) 116 { 117 $final_query .= " {$terms}"; 118 return; 119 } 120 debug_push_class(__CLASS__, __FUNCTION__); 121 debug_add('Don\'t know how to handle terms of type: ' . gettype($terms), MIDCOM_LOG_ERROR); 122 debug_print_r('$terms', $terms); 123 debug_pop(); 124 return; 97 125 } 98 126 … … 201 229 } 202 230 $final_query .= "__COMPONENT:{$data['component']}"; 231 } 232 233 // Way to add very custom terms 234 if (isset($_REQUEST['append_terms'])) 235 { 236 $this->append_terms_recursive($final_query, $_REQUEST['append_terms']); 203 237 } 204 238
