aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v3/cgi_sql_common.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2011-04-20 21:10:04 -0400
committerRalph Amissah <ralph@amissah.com>2011-04-20 21:10:04 -0400
commit0f740e9c185b6aaed05e193828545ce7664fdbec (patch)
treed27e2672ad3a816c743ad65ac3de85e1eb237f46 /lib/sisu/v3/cgi_sql_common.rb
parentdebian/changelog (3.0.6-1) (diff)
parentv2 v3: sisu-mode.el, header notes copyright assignment to FSF (GNU EMACS) (diff)
Merge branch 'upstream' into debian/sid
Diffstat (limited to 'lib/sisu/v3/cgi_sql_common.rb')
-rw-r--r--lib/sisu/v3/cgi_sql_common.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/sisu/v3/cgi_sql_common.rb b/lib/sisu/v3/cgi_sql_common.rb
index 0ca9dca2..924b1533 100644
--- a/lib/sisu/v3/cgi_sql_common.rb
+++ b/lib/sisu/v3/cgi_sql_common.rb
@@ -299,9 +299,9 @@ module SiSU_CGI_sql
end
def text_to_match(identifier='')
m={
- :string => /#{identifier}\s*(.+?)/,
- :string => /#{identifier}\s*(.+?)(?:;|\n|\r|$)/,
- :word => /#{identifier}[\s(]*(\S+)/
+ string: /#{identifier}\s*(.+?)/,
+ string: /#{identifier}\s*(.+?)(?:;|\n|\r|$)/,
+ word: /#{identifier}[\s(]*(\S+)/
}
search_string=if @search_field =~m[:word]
search_string=if @search_field =~m[:braces]; m[:braces].match(@search_field)[1]
@@ -328,10 +328,10 @@ module SiSU_CGI_sql
def initialize(conn,search_for,q,c)
@conn=conn
@text_search_flag=false
- @sql_statement={ :body=>'',:endnotes=>'',:range=>'' }
+ @sql_statement={ body: '', endnotes: '',range: '' }
#@offset||=@@offset
#@offset+=@@limit
- search={ :text => [],:endnotes => [] }
+ search={ text: [], endnotes: [] }
cse=(c =~/\S/) ? true : false
st=Dbi_search_string.new('doc_objects.clean',search_for.text1,q['s1'],cse).string
se=Dbi_search_string.new('endnotes.clean',search_for.text1,q['s1'],cse).string
@@ -645,7 +645,7 @@ module SiSU_CGI_sql
@counters_txt,@counters_endn,@sql_select_body,@sql_select_endnotes='','','',''
FCGI.each_cgi do |cgi|
begin # all code goes in begin section
- @search={ :text => [],:endnotes => [] }
+ @search={ text: [], endnotes: [] }
q=CGI.new
@db=if cgi['db'] =~/\S+/;
@stub=/#{@db_name_prefix}(\S+)/.match(cgi['db'])[1]
@@ -656,13 +656,13 @@ module SiSU_CGI_sql
end
checked_url,checked_stats,checked_searched,checked_tip,checked_case,checked_echo,checked_sql,checked_all,checked_none,checked_selected,checked_default,selected_db='','','','','','','','',''
result_type=(cgi['view']=~/text/) \
- ? result_type={:index=>'',:text=>'checked'} \
- : result_type={:index=>'checked',:text=>''}
+ ? result_type={ index: '', text: 'checked'} \
+ : result_type={ index: 'checked', text: ''}
@@limit=if cgi['sql_match_limit'].to_s=~/2500/
- checked_sql_limit={:l1000=>'',:l2500=>'checked'}
+ checked_sql_limit={ l1000: '', l2500: 'checked'}
'2500'
else
- checked_sql_limit={:l1000=>'checked',:l2500=>''}
+ checked_sql_limit={ l1000: 'checked', l2500: ''}
'1000'
end
checked_echo='checked' if cgi['echo'] =~/\S/