/[drupal]/contributions/modules/swish/swish.module
ViewVC logotype

Diff of /contributions/modules/swish/swish.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.3.2.3.2.6, Fri Mar 7 19:03:36 2008 UTC revision 1.3.2.3.2.7, Fri Mar 7 19:22:40 2008 UTC
# Line 72  function swish_search ($op = 'search', Line 72  function swish_search ($op = 'search',
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){

Legend:
Removed from v.1.3.2.3.2.6  
changed lines
  Added in v.1.3.2.3.2.7

  ViewVC Help
Powered by ViewVC 1.1.2