| 72 |
} |
} |
| 73 |
|
|
| 74 |
$words = '"'.chop(str_replace('\(', '(', str_replace('\)', ')', str_replace('\*','*', escapeshellcmd($keys).' ')))).'"'; |
$words = '"'.chop(str_replace('\(', '(', str_replace('\)', ')', str_replace('\*','*', escapeshellcmd($keys).' ')))).'"'; |
| 75 |
|
// convert from UTF-8 input to ISO-8859-1 since swish can't handle UTF-8 |
| 76 |
|
// ATTENTION: this conversion should only be done if the string is not yet in ISO-8859-1 (how to check this?) |
| 77 |
|
$words = iconv ("UTF-8", "ISO-8859-1", $words); |
| 78 |
$swish_command = variable_get("swish_path","/usr/local/bin/swish-e") . escapeshellcmd(" -m 50 -f $swish_index -w ").$words; |
$swish_command = variable_get("swish_path","/usr/local/bin/swish-e") . escapeshellcmd(" -m 50 -f $swish_index -w ").$words; |
| 79 |
exec ($swish_command, $results, $return_val); |
exec ($swish_command, $results, $return_val); |
| 80 |
foreach ($results as $result){ |
foreach ($results as $result){ |