diff options
author | Ralph Amissah <ralph@amissah.com> | 2013-06-06 21:33:36 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2013-06-06 21:33:36 -0400 |
commit | 3c2a5c974750898a46faf844dc7c6dc2ad4173fd (patch) | |
tree | 2feaeadeefd6935e7b4d9a6b954b3276d4478dbe /lib/sisu/v5 | |
parent | debian/changelog (4.1.3-1) (diff) | |
parent | v4 v5: cgi helper script, sample search form generator, file name matching (diff) |
Merge tag 'sisu_4.1.4' into debian/sid
SiSU 4.1.4
Diffstat (limited to 'lib/sisu/v5')
-rw-r--r-- | lib/sisu/v5/cgi_sql_common.rb | 53 | ||||
-rw-r--r-- | lib/sisu/v5/db_import.rb | 4 | ||||
-rw-r--r-- | lib/sisu/v5/db_remove.rb | 8 | ||||
-rw-r--r-- | lib/sisu/v5/sysenv.rb | 4 |
4 files changed, 44 insertions, 25 deletions
diff --git a/lib/sisu/v5/cgi_sql_common.rb b/lib/sisu/v5/cgi_sql_common.rb index 9e872139..b551d6c8 100644 --- a/lib/sisu/v5/cgi_sql_common.rb +++ b/lib/sisu/v5/cgi_sql_common.rb @@ -165,7 +165,19 @@ module SiSU_CGI_SQL </head> <body bgcolor="#ffffff" text="#000000" link="#003090" lang="en" xml:lang="en"> <table summary="band" border="0" cellpadding="3" cellspacing="0"> - <tr><td align="left" bgcolor="#ffffff"><a href="http://www.jus.uio.no/sisu/" target="_top"><img border="0" src="#{@image_src}/sisu.png" alt="SiSU -->" /></a></td><td> + <tr><td width="20%"> + <table summary="home button / home information" border="0" cellpadding="3" cellspacing="0"> + <tr><td align="left" bgcolor="#ffffff"> + <br /><a href="http://sisudoc.org/" target="_top"> + <b>SiSU</b> + </a> + <br /><a href="http://git.sisudoc.org/" target="_top"> + git + </a> + </td></tr> + </table> + </td> + <td> <label for="find"><b>#{@env.sample_search_form_title(@opt.dir_structure_by)}</b></label> </td></tr> </table> @@ -541,26 +553,29 @@ module SiSU_CGI_SQL <table summary="SiSU summary" bgcolor="#ffffff" cellpadding="2" border="0"> <!-- widget sisu --> <tr><td valign="top" width="10%"> - <p class="tiny_left"><font color="#666666" size="2"> - <a href="http://www.jus.uio.no/sisu" > - <img border="0" src="#{@image_src}/sisu.png" alt="SiSU" width="120" height="39" /> - </a> - </font></p> -</td><td valign="top" width="45%"> + <table summary="home button / home information" border="0" cellpadding="3" cellspacing="0"> + <tr><td align="left" bgcolor="#ffffff"> + <br /><a href="http://sisudoc.org/" target="_top"> + <b>SiSU</b> + </a> + <br /><a href="http://git.sisudoc.org/" target="_top"> + git + </a> + </td></tr> + </table> +</td> +<td valign="top" width="45%"> <!-- SiSU Rights --> <p class="tiny_left"><font color="#666666" size="2"> Generated by - <a href="http://www.jus.uio.no/sisu" > - #{v[:project]}</a> #{v[:version]} #{v[:date]} (#{v[:date_stamp]}) + #{v[:project]} #{v[:version]} #{v[:date]} (#{v[:date_stamp]}) <br /> - <a href="http://www.jus.uio.no/sisu" > + <a href="http://www.sisudoc.org" > <b>#{v[:project]}</b></a> <sup>©</sup> Ralph Amissah 1993, current 2013. All Rights Reserved. <br /> - <a href="http://www.jus.uio.no/sisu" > - #{v[:project]}</a> - is software for document structuring, publishing and search, + #{v[:project]} is software for document structuring, publishing and search, <br /> <a href="http://www.jus.uio.no/sisu" > www.jus.uio.no/sisu @@ -569,6 +584,10 @@ module SiSU_CGI_SQL <a href="http://www.sisudoc.org" > www.sisudoc.org </a> + sources + <a href="http://git.sisudoc.org" > + git.sisudoc.org + </a> <br /> <i>w3 since October 3 1993</i> <a href="mailto:ralph@amissah.com" > @@ -589,7 +608,7 @@ module SiSU_CGI_SQL #{v[:project]} using: <br />Standard SiSU markup syntax, <br />Standard SiSU meta-markup syntax, and the - <br />Standard SiSU <u>object citation numbering</u> and system, (object/text positioning system) + <br />Standard SiSU <u>object citation numbering</u> and system, (object/text identifying/locating system) <br /> <sup>©</sup> Ralph Amissah 1997, current 2013. All Rights Reserved. @@ -599,7 +618,7 @@ module SiSU_CGI_SQL <tr><td valign="top" width="10%"> <p class="tiny_left"><font color="#666666" size="2"> <a href="http://www.gnu.org/licenses/gpl.html"> - <img border="0" src="#{@image_src}/gplv3_free_software.png" alt="GPLv3" width="127" height="51" /> + .: </a> </font></p> </td><td valign="top" width="45%"> @@ -898,7 +917,7 @@ module SiSU_CGI_SQL #% text_objects_body s_contents.each do |c| #% text body location=c['src_filename'][/(.+?)\.(?:ssm\.sst|sst)$/,1] - file_suffix=c['src_filename'][/.+?\.(_?sst|ssm)$/,1] + file_suffix=c['src_filename'][/.+?\.(ssm\.sst|sst)$/,1] lang=if location =~ /\S+?~(\S\S\S?)$/ l=location[/\S+?~(\S\S\S?)$/,1] location=location.gsub(/(\S+?)~\S\S\S?/,'\1') @@ -990,7 +1009,7 @@ module SiSU_CGI_SQL oldtid = 0 s_endnotes.each do |e| #% endnotes location=e['src_filename'][/(.+?)\.(?:ssm\.sst|sst)$/,1] - file_suffix=e['src_filename'][/.+?\.(_?sst|ssm)$/,1] + file_suffix=e['src_filename'][/.+?\.(ssm\.sst|sst)$/,1] lang=if location =~ /\S+?~(\S\S\S?)$/ l=location[/\S+?~(\S\S\S?)$/,1] location=location.gsub(/(\S+?)~\S\S\S?/,'\1') diff --git a/lib/sisu/v5/db_import.rb b/lib/sisu/v5/db_import.rb index a1d332bb..293071ff 100644 --- a/lib/sisu/v5/db_import.rb +++ b/lib/sisu/v5/db_import.rb @@ -129,9 +129,9 @@ module SiSU_DbImport select_first_match=%{ SELECT metadata_and_text.tid FROM metadata_and_text - WHERE metadata_and_text.src_filename = '#{@opt.fns}' + WHERE metadata_and_text.src_filename = '#{@md.fns}' AND metadata_and_text.language_document_char = '#{@opt.lng}' - ;} + ;} # note, for .ssm: @md.fns (is set during runtime & is) != @opt.fns @md.opt.fns file_exist=@sql_type=~/sqlite/ \ ? @conn.get_first_value(select_first_match) : @conn.select_one(select_first_match) diff --git a/lib/sisu/v5/db_remove.rb b/lib/sisu/v5/db_remove.rb index 1fb40e30..2e65d51a 100644 --- a/lib/sisu/v5/db_remove.rb +++ b/lib/sisu/v5/db_remove.rb @@ -78,17 +78,17 @@ module SiSU_DbRemove remove_selected=%{ SELECT tid FROM metadata_and_text - WHERE src_filename = '#{@opt.fns}' + WHERE src_filename = '#{@md.fns}' AND metadata_and_text.language_document_char = '#{@opt.lng}' - ;} + ;} # note, for .ssm: @md.fns (is set during runtime & is) != @opt.fns @md.opt.fns @conn.get_first_value(remove_selected).to_i else remove_selected=%{ SELECT metadata_and_text.tid FROM metadata_and_text - WHERE metadata_and_text.src_filename = '#{@opt.fns}' + WHERE metadata_and_text.src_filename = '#{@md.fns}' AND metadata_and_text.language_document_char = '#{@opt.lng}' - ;} + ;} # note, for .ssm: @md.fns (is set during runtime & is) != @opt.fns @md.opt.fns x=@conn.select_one(remove_selected) x ? (x.join.to_i) : nil end diff --git a/lib/sisu/v5/sysenv.rb b/lib/sisu/v5/sysenv.rb index 37492716..1a00baa7 100644 --- a/lib/sisu/v5/sysenv.rb +++ b/lib/sisu/v5/sysenv.rb @@ -254,8 +254,8 @@ module SiSU_Env require @prog else @mandatory \ - ? (SiSU_Screen::Ansi.new(@cmd,"*WARN* module required: #{@prog}").warn) - : (SiSU_Screen::Ansi.new(@cmd,"*WARN* #{@prog} load requested").warn) + ? (SiSU_Screen::Ansi.new(@prog,"*WARN* module required: #{@prog}").warn) + : '' #(SiSU_Screen::Ansi.new(@prog,"*WARN* #{@prog} load requested").warn) end load_prog end |