diff options
author | Ralph Amissah <ralph@amissah.com> | 2011-03-02 22:54:28 -0500 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2011-03-02 22:54:28 -0500 |
commit | 0569fd776ab4ce33689ca3337acd62f2415b6348 (patch) | |
tree | 4644037b28d876d8637a610f5df1a29535a4ef9a /lib/sisu/v3/cgi_pgsql.rb | |
parent | debian/changelog (3.0.1-1) (diff) | |
parent | CHANGELOG_v{1,2,3}, syslink, avoid duplication (diff) |
Merge branch 'upstream' into debian/sid
Diffstat (limited to 'lib/sisu/v3/cgi_pgsql.rb')
-rw-r--r-- | lib/sisu/v3/cgi_pgsql.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/sisu/v3/cgi_pgsql.rb b/lib/sisu/v3/cgi_pgsql.rb index 5271175c..5f23f22d 100644 --- a/lib/sisu/v3/cgi_pgsql.rb +++ b/lib/sisu/v3/cgi_pgsql.rb @@ -1,4 +1,4 @@ -# coding: utf-8 +# encoding: utf-8 =begin * Name: SiSU @@ -57,8 +57,8 @@ =end module SiSU_CGI_pgsql #% database building documents - require "#{SiSU_lib}/sysenv" # sysenv.rb - require "#{SiSU_lib}/cgi_sql_common" # cgi_sql_common.rb + require_relative 'sysenv' # sysenv.rb + require_relative 'cgi_sql_common' # cgi_sql_common.rb include SiSU_CGI_sql class SiSU_search_pgsql < SiSU_CGI_common def initialize(opt,webserv) @@ -145,7 +145,7 @@ module SiSU_CGI_pgsql @l,@t,@q,@c=l,t,q,cse end def string - search={ :search => [],:flag => false } + search={ search: [], flag: false } if @t =~/\S+/ or @q =~/\S+/ if @t =~/\S+/; unescaped_search=CGI.unescape(@t) elsif @q =~/\S+/; unescaped_search=CGI.unescape(@q) @@ -172,10 +172,10 @@ module SiSU_CGI_pgsql def search_query1 <<-'WOK_SQL' @search_text,@search_endnotes=[],[] - search[:text].each{|x| @search_text << "#{x} AND " } + search[:text].each {|x| @search_text << "#{x} AND " } @search_text=@search_text.join.gsub!(/AND\s+$/,'') #watch @search_text.gsub!(/(doc_objects\.clean~[*]?\(\s*'[^']+'\s*\)\s+(?:(?:AND|OR)\s+doc_objects\.clean~[*]?\(\s*'[^']+'\s*\))+)/,'(\1)') - search[:endnotes].each{|x| @search_endnotes << "#{x} AND " } + search[:endnotes].each {|x| @search_endnotes << "#{x} AND " } @search_endnotes=@search_endnotes.join.gsub!(/AND\s+$/,'') #watch @search_endnotes.gsub!(/(endnotes\.clean~\(\s*'[^']+'\s*\)\s+(?:(?:AND|OR)\s+endnotes\.clean~\(\s*'[^']+'\s*\))+)/,'(\1)') end |