aboutsummaryrefslogtreecommitdiffhomepage
path: root/data/sisu/conf/cgi-bin/sisu_search_pgsql.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'data/sisu/conf/cgi-bin/sisu_search_pgsql.cgi')
-rw-r--r--data/sisu/conf/cgi-bin/sisu_search_pgsql.cgi19
1 files changed, 9 insertions, 10 deletions
diff --git a/data/sisu/conf/cgi-bin/sisu_search_pgsql.cgi b/data/sisu/conf/cgi-bin/sisu_search_pgsql.cgi
index 2f6f93e4..704ea154 100644
--- a/data/sisu/conf/cgi-bin/sisu_search_pgsql.cgi
+++ b/data/sisu/conf/cgi-bin/sisu_search_pgsql.cgi
@@ -60,7 +60,7 @@
begin
require 'cgi'
require 'fcgi'
- require 'dbi'
+ require 'pg'
rescue LoadError
puts 'cgi, fcgi or dbi NOT FOUND (LoadError)'
end
@@ -71,7 +71,7 @@
@output_dir_structure_by='language'
@lingual='multi'
@port='5432'
- @db_name_prefix='SiSUv6a_'
+ @db_name_prefix='SiSUv6b_'
@user='ralph' # check user name for access to pg database: e.g. www-data or 'ralph'
@base="http://#{ENV['HTTP_HOST']}#{ENV['PATH_INFO']}#{ENV['SCRIPT_NAME']}"
#Common TOP
@@ -141,9 +141,9 @@
<br />
<select name="db" size="1">
#{@selected_db}
- <option value="SiSUv6a_manual">manual</option>
- <option value="SiSUv6a_samples">samples</option>
- <option value="SiSUv6a_sisu">sisu</option>
+ <option value="SiSUv6b_manual">manual</option>
+ <option value="SiSUv6b_samples">samples</option>
+ <option value="SiSUv6b_sisu">sisu</option>
</select>
<input type="submit" value="SiSU search" />
<input type="radio" name="view" value="index" #{@result_type[:index]}> index
@@ -520,10 +520,10 @@
%{<font color="#666666" size="2">#{sql_select_endnotes}</font>}
end
def contents
- @conn.select_all(sql_select_body)
+ @conn.exec(sql_select_body)
end
def endnotes
- @conn.select_all(sql_select_endnotes)
+ @conn.exec(sql_select_endnotes)
end
end
def tail
@@ -547,7 +547,7 @@
<!-- SiSU Rights -->
<p class="tiny_left"><font color="#666666" size="2">
Generated by
- SiSU 6.0.3 2014-02-06 (2014w05/4)
+ SiSU 6.0.6 2014-05-18 (2014w19/7)
<br />
<a href="http://www.sisudoc.org" >
<b>SiSU</b></a> <sup>&copy;</sup> Ralph Amissah
@@ -679,8 +679,7 @@
checked_searched=checked_tip=checked_case=checked_sql=''
end
selected_db=%{<option value="#{@db_name_prefix}#{@stub}">#{@stub}</option>}
- dbi="dbi:Pg:database=#{@db};port=#{@port}"
- @conn=DBI.connect(dbi,@user)
+ @conn=PG::Connection.open(dbname: @db, port: @port, user: @user)
search_field=cgi['find'] if cgi['find'] # =~/\S+/
@search_for=SearchRequest.new(search_field,q) #.analyze #% search_for
#% searches