preselected_filter_tags.diff
| b/lib/class.tx_kesearch_lib_div.php | ||
|---|---|---|
| 149 | 149 |
$tagsAgainst = array(); |
| 150 | 150 |
$tagChar = $this->pObj->extConf['prePostTagChar']; |
| 151 | 151 | |
| 152 |
foreach($this->pObj->preselectedFilter as $key => $value) {
|
|
| 152 |
foreach($this->pObj->preselectedFilter as $key => $filterTags) {
|
|
| 153 |
// Quote the tags for use in database query |
|
| 154 |
foreach ($filterTags as $k => $v) {
|
|
| 155 |
$filterTags[$k] = $GLOBALS['TYPO3_DB']->quoteStr($v, 'tx_kesearch_index'); |
|
| 156 |
} |
|
| 153 | 157 |
// if we are in checkbox mode |
| 154 | 158 |
if(count($this->pObj->preselectedFilter[$key]) >= 2) {
|
| 155 |
$tagsAgainst[$key] .= ' "' . $tagChar . implode($tagChar . '" "' . $tagChar, $GLOBALS['TYPO3_DB']->quoteStr($value, 'tx_kesearch_index')) . $tagChar . '"'; |
|
| 159 |
$tagsAgainst[$key] .= ' "' . $tagChar . implode($tagChar . '" "' . $tagChar, $filterTags) . $tagChar . '"'; |
|
| 156 | 160 |
// if we are in select or list mode |
| 157 | 161 |
} elseif(count($this->pObj->preselectedFilter[$key]) == 1) {
|
| 158 |
$tagsAgainst[$key] .= ' +"' . $tagChar. current($GLOBALS['TYPO3_DB']->quoteStr($value, 'tx_kesearch_index')) . $tagChar . '"'; |
|
| 162 |
$tagsAgainst[$key] .= ' +"' . $tagChar . array_shift($filterTags) . $tagChar . '"'; |
|
| 159 | 163 |
} |
| 160 | 164 |
} |
| 161 | 165 |
if(is_array($this->pObj->piVars['filter'])) {
|