aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v3dv/cgi_sql_common.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2012-01-23 21:42:25 -0500
committerRalph Amissah <ralph@amissah.com>2012-01-23 21:42:27 -0500
commit21f5e220b738add01c19c2b15a76f2d240b2c0d5 (patch)
tree287dac6e47cab1da0d0567e9dc79683bc8d757b0 /lib/sisu/v3dv/cgi_sql_common.rb
parentv3dv: call most methods by full name (include associated module & class names) (diff)
v3dv: replace use of most ruby exclamation (!) method actionssisu_3.1.12
Diffstat (limited to 'lib/sisu/v3dv/cgi_sql_common.rb')
-rw-r--r--lib/sisu/v3dv/cgi_sql_common.rb24
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