From 4460d0b30f6c2350390c97a8f218fbdae9e71b63 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sun, 19 May 2013 00:23:50 -0400 Subject: v4 v5: cgi script for sample search form generator, sqlite, minor fixes * affects 'sisu -F' (repairs breakage) --- data/doc/sisu/CHANGELOG_v4 | 3 +++ data/doc/sisu/CHANGELOG_v5 | 3 +++ lib/sisu/v4/cgi_pgsql.rb | 14 +++++++------- lib/sisu/v4/cgi_sqlite.rb | 11 +++++------ lib/sisu/v5/cgi_pgsql.rb | 14 +++++++------- lib/sisu/v5/cgi_sqlite.rb | 11 +++++------ 6 files changed, 30 insertions(+), 26 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v4 b/data/doc/sisu/CHANGELOG_v4 index 02004006..78b7f0fe 100644 --- a/data/doc/sisu/CHANGELOG_v4 +++ b/data/doc/sisu/CHANGELOG_v4 @@ -32,6 +32,9 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_4.1.1.orig.tar.xz * vim, ftplugin, sisu.vim, statusline +* cgi script for sample search form generator, sqlite, minor fixes (affects + 'sisu -F') + %% 4.1.0.orig.tar.xz (2013-05-08:18/3) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.1.0 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.1.0-1 diff --git a/data/doc/sisu/CHANGELOG_v5 b/data/doc/sisu/CHANGELOG_v5 index d617b4b2..7d77f8b2 100644 --- a/data/doc/sisu/CHANGELOG_v5 +++ b/data/doc/sisu/CHANGELOG_v5 @@ -32,6 +32,9 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_5.0.1.orig.tar.xz * vim, ftplugin, sisu.vim, statusline +* cgi script for sample search form generator, sqlite, minor fixes (affects + 'sisu -F') + %% 5.0.0.orig.tar.xz (2013-05-08:18/3) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_5.0.0 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_5.0.0-1 diff --git a/lib/sisu/v4/cgi_pgsql.rb b/lib/sisu/v4/cgi_pgsql.rb index fd688244..70a60d81 100644 --- a/lib/sisu/v4/cgi_pgsql.rb +++ b/lib/sisu/v4/cgi_pgsql.rb @@ -158,13 +158,13 @@ module SiSU_CGI_PgSQL require 'cgi' require 'fcgi' require 'dbi' - @stub_default="#{@name_of[:db]}" - @image_src="#{@name_of[:host_url_docs]}/_sisu/image_sys" - @hosturl_cgi="#{@name_of[:host_url_cgi]}" - @hosturl_files="#{@name_of[:host_url_docs]}" - @output_dir_structure_by="#{@name_of[:output_dir_structure]}" - @port="#{@db.psql.port}" - @db_name_prefix="#{Db[:name_prefix]}" + @stub_default='#{@name_of[:db]}' + @image_src='#{@name_of[:host_url_docs]}/_sisu/image_sys' + @hosturl_cgi='#{@name_of[:host_url_cgi]}' + @hosturl_files='#{@name_of[:host_url_docs]}' + @output_dir_structure_by='#{@name_of[:output_dir_structure]}' + @port='#{@db.psql.port}' + @db_name_prefix='#{Db[:name_prefix]}' user='www-data' # check user name for access to pg database: e.g. www-data or '#{@env.user}' WOK_SQL end diff --git a/lib/sisu/v4/cgi_sqlite.rb b/lib/sisu/v4/cgi_sqlite.rb index d82cf8ec..05c7e6a7 100644 --- a/lib/sisu/v4/cgi_sqlite.rb +++ b/lib/sisu/v4/cgi_sqlite.rb @@ -131,12 +131,11 @@ module SiSU_CGI_SQLite require 'cgi' require 'fcgi' require 'dbi' - @stub_default="#{@name_of[:db]}" - @image_src="#{@name_of[:host_url_docs]}/_sisu/image_sys" - @hosturl_cgi="#{@name_of[:host_url_cgi]}" - @hosturl_files="#{@name_of[:host_url_docs]}" - @output_dir_structure_by="#{@name_of[:output_dir_structure]}" - @db_name_prefix="#{Db[:name_prefix]}" + @stub_default='sisu_sqlite' + @image_src='#{@env.url.webserv_cgi}/_sisu/image_sys' + @hosturl_cgi='#{@env.url.webserv_base_cgi}/cgi-bin' + @hosturl_files='#{@env.url.webserv_files_from_db}' + @db_name_prefix='#{Db[:name_prefix]}' WOK_SQL end def search_statement diff --git a/lib/sisu/v5/cgi_pgsql.rb b/lib/sisu/v5/cgi_pgsql.rb index 8d09f733..1fa19e0d 100644 --- a/lib/sisu/v5/cgi_pgsql.rb +++ b/lib/sisu/v5/cgi_pgsql.rb @@ -158,13 +158,13 @@ module SiSU_CGI_PgSQL require 'cgi' require 'fcgi' require 'dbi' - @stub_default="#{@name_of[:db]}" - @image_src="#{@name_of[:host_url_docs]}/_sisu/image_sys" - @hosturl_cgi="#{@name_of[:host_url_cgi]}" - @hosturl_files="#{@name_of[:host_url_docs]}" - @output_dir_structure_by="#{@name_of[:output_dir_structure]}" - @port="#{@db.psql.port}" - @db_name_prefix="#{Db[:name_prefix]}" + @stub_default='#{@name_of[:db]}' + @image_src='#{@name_of[:host_url_docs]}/_sisu/image_sys' + @hosturl_cgi='#{@name_of[:host_url_cgi]}' + @hosturl_files='#{@name_of[:host_url_docs]}' + @output_dir_structure_by='#{@name_of[:output_dir_structure]}' + @port='#{@db.psql.port}' + @db_name_prefix='#{Db[:name_prefix]}' user='www-data' # check user name for access to pg database: e.g. www-data or '#{@env.user}' WOK_SQL end diff --git a/lib/sisu/v5/cgi_sqlite.rb b/lib/sisu/v5/cgi_sqlite.rb index 45f6d1ca..cf891c5a 100644 --- a/lib/sisu/v5/cgi_sqlite.rb +++ b/lib/sisu/v5/cgi_sqlite.rb @@ -131,12 +131,11 @@ module SiSU_CGI_SQLite require 'cgi' require 'fcgi' require 'dbi' - @stub_default="#{@name_of[:db]}" - @image_src="#{@name_of[:host_url_docs]}/_sisu/image_sys" - @hosturl_cgi="#{@name_of[:host_url_cgi]}" - @hosturl_files="#{@name_of[:host_url_docs]}" - @output_dir_structure_by="#{@name_of[:output_dir_structure]}" - @db_name_prefix="#{Db[:name_prefix]}" + @stub_default='sisu_sqlite' + @image_src='#{@env.url.webserv_cgi}/_sisu/image_sys' + @hosturl_cgi='#{@env.url.webserv_base_cgi}/cgi-bin' + @hosturl_files='#{@env.url.webserv_files_from_db}' + @db_name_prefix='#{Db[:name_prefix]}' WOK_SQL end def search_statement -- cgit v1.2.3