diff options
| author | Ralph Amissah <ralph@amissah.com> | 2013-04-11 21:11:35 -0400 | 
|---|---|---|
| committer | Ralph Amissah <ralph@amissah.com> | 2013-04-11 21:11:35 -0400 | 
| commit | fbc98524bb7de090c92edb144a57617b5ee43699 (patch) | |
| tree | d2d1ad899ef3d162f47bf754d13e929696e564b2 /lib | |
| parent | debian/changelog (4.0.19-1) (diff) | |
| parent | v4: cgi sample search form, minor (diff) | |
Merge tag 'sisu_4.0.20' into debian/sid
SiSU 4.0.20
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/sisu/v4/cgi_pgsql.rb | 11 | ||||
| -rw-r--r-- | lib/sisu/v4/cgi_sql_common.rb | 4 | 
2 files changed, 8 insertions, 7 deletions
| diff --git a/lib/sisu/v4/cgi_pgsql.rb b/lib/sisu/v4/cgi_pgsql.rb index 36f9782b..d621d187 100644 --- a/lib/sisu/v4/cgi_pgsql.rb +++ b/lib/sisu/v4/cgi_pgsql.rb @@ -77,6 +77,11 @@ module  SiSU_CGI_PgSQL        and defined? @rc['webserv']['url_root'] =~/\S+/          @name_of[:host_url_docs]=@rc['webserv']['url_root']        end +      @name_of[:output_dir_structure]=if defined? @rc['output_dir_structure_by'] \ +      and defined? @rc['output_dir_structure_by'] =~/(language|filetype|filename)/ +        @rc['output_dir_structure_by'] +      else 'language' +      end        if defined? @rc['search'] \        and defined? @rc['search']['sisu'] \        and defined? @rc['search']['sisu']['action'] \ @@ -115,12 +120,8 @@ module  SiSU_CGI_PgSQL          serve.each do |x|            f1 << %{              <option value="#{Db[:name_prefix]}#{x}">#{x}</option>\n} unless x =~/apache|sisu\/image/ #check          end -        f2 <<  %{          selected_db=case cgi['db']\n} -        serve.each do |x| -          f2 << %{          when /#{Db[:name_prefix]}#{x}/;        '<option value="#{Db[:name_prefix]}#{x}">#{x}</option>'\n} unless x =~/apache|sisu\/image/ #check -        end        end -      f2 << "          end\n" +      f2 << %q{          selected_db=%{<option value="#{@db_name_prefix}#{@stub}">#{@stub}</option>}} + "\n"        if FileTest.writable?('.')          output=File.open(@cgi_file_name,'w')          output << header0 << header1 << header_desc << header2 << f1 << buttons1 << buttons1_pgsql << buttons2 << search_request << search_statement << search_statement_common << search_query1 << @common.pages << search_query2 << @common.tail << @common.main1 << f2 << dbi_connect << @common.main2 << @common.dir_structure << @common.main3 diff --git a/lib/sisu/v4/cgi_sql_common.rb b/lib/sisu/v4/cgi_sql_common.rb index 058d04ec..f7aab470 100644 --- a/lib/sisu/v4/cgi_sql_common.rb +++ b/lib/sisu/v4/cgi_sql_common.rb @@ -650,8 +650,8 @@ module SiSU_CGI_SQL          begin # all code goes in begin section            @search={ text: [], endnotes: [] }            q=CGI.new -          @db=if cgi['db'] =~/\S+/ -            @stub=/#{@db_name_prefix}(\S+)/.match(cgi['db'])[1] +          @db=if cgi['db'] =~ /#{@db_name_prefix}(\S+)/ +            @stub=$1              cgi['db']            else              @stub=@stub_default | 
