diff options
Diffstat (limited to 'lib/sisu/v3dv/cgi_sql_common.rb')
-rw-r--r-- | lib/sisu/v3dv/cgi_sql_common.rb | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/lib/sisu/v3dv/cgi_sql_common.rb b/lib/sisu/v3dv/cgi_sql_common.rb index 59844d2b..0f17bb79 100644 --- a/lib/sisu/v3dv/cgi_sql_common.rb +++ b/lib/sisu/v3dv/cgi_sql_common.rb @@ -311,12 +311,10 @@ module SiSU_CGI_SQL elsif @search_field =~m[:string]; m[:string].match(@search_field)[1] else str=m[:word].match(@search_field)[1] - str.gsub!(/[()]/,'') + str=str.gsub(/[()]/,'') str end - search_string.strip! - search_string.gsub!(/\s+/,'+') - search_string + search_string=search_string.strip.search_string.gsub(/\s+/,'+') #else # "__" end @@ -756,13 +754,13 @@ module SiSU_CGI_SQL elsif checked_all =~/checked/ or checked_url =~/checked/ canned_search=@@canned_search_url.scan(/(?:s1|ft|au|ti|fns|tr)=[^&]+/) af=canned_search.join('; ') - af.gsub!(/s1=/,'text: ') - af.gsub!(/ft=/,'fulltxt: ') - af.gsub!(/au=/,'author: ') - af.gsub!(/ti=/,'title: ') - af.gsub!(/fns=/,'filename: ') - af.gsub!(/tr=/,'topic_register: ') - af.gsub!(/%2B/,' ') + af=af.gsub(/s1=/,'text: '). + gsub(/ft=/,'fulltxt: '). + gsub(/au=/,'author: '). + gsub(/ti=/,'title: '). + gsub(/fns=/,'filename: '). + gsub(/tr=/,'topic_register: '). + gsub(/%2B/,' ') analyze_format=af st=af.split(/\s*;\s*/) search_field=st.join("\n") @@ -916,7 +914,7 @@ module SiSU_CGI_SQL file_suffix=c['src_filename'][/.+?\.(_?sst|ssm)$/,1] lang=if location =~ /\S+?~(\S\S\S?)$/ l=location[/\S+?~(\S\S\S?)$/,1] - location.gsub!(/(\S+?)~\S\S\S?/,'\1') + location=location.gsub(/(\S+?)~\S\S\S?/,'\1') l=".#{l}" else '' end @@ -1008,7 +1006,7 @@ module SiSU_CGI_SQL file_suffix=e['src_filename'][/.+?\.(_?sst|ssm)$/,1] lang=if location =~ /\S+?~(\S\S\S?)$/ l=location[/\S+?~(\S\S\S?)$/,1] - location.gsub!(/(\S+?)~\S\S\S?/,'\1') + location=location.gsub(/(\S+?)~\S\S\S?/,'\1') l=".#{l}" else '' end |