diff options
author | Ralph Amissah <ralph@amissah.com> | 2013-03-29 20:28:29 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2013-03-29 20:28:29 -0400 |
commit | 1a21bfdc762d2dfb0de56dba75fa46d8a31861af (patch) | |
tree | c4635d5ec34e0395d09a57076f3ded93181ca645 /lib/sisu/v4/sysenv.rb | |
parent | v4: dbi, import composite files (.ssm) correctly (diff) |
v4: cgi, auto-generated sample search form
* for various sisu output directory structures
* fixes
Diffstat (limited to 'lib/sisu/v4/sysenv.rb')
-rw-r--r-- | lib/sisu/v4/sysenv.rb | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/sisu/v4/sysenv.rb b/lib/sisu/v4/sysenv.rb index 6ed94d5d..d77672a6 100644 --- a/lib/sisu/v4/sysenv.rb +++ b/lib/sisu/v4/sysenv.rb @@ -1668,8 +1668,6 @@ WOK and defined? @rc['search']['sisu']['action'] \ and @rc['search']['sisu']['action'] =~/https?:\/\// \ and defined? @rc['search']['sisu']['db'] \ - and @rc['search']['sisu']['db'] =~/\S+/ \ - and defined? @rc['search']['sisu']['db'] \ and @rc['search']['sisu']['db'] =~/\S+/ flag=if defined? @vz.widget_search \ and @vz.widget_search==true @@ -2394,7 +2392,7 @@ WOK end end def webserv_cgi #web url for local webserv (localhost, or hostname) - if defined? @rc['webserv_cgi']['host'] \ + http=if defined? @rc['webserv_cgi']['host'] \ and @rc['webserv_cgi']['host'].is_a?(String) http=((@rc['webserv_cgi']['host'] =~ /https?:\/\//) ? '' : 'http://') #check https? missing if port.webserv_port_cgi @@ -2408,9 +2406,10 @@ WOK else "#{http}#{webserv_host_base}/#{@stub_pwd}" end end + http=http.strip end def webserv_base_cgi #web url for local webserv (localhost, or hostname) - if defined? @rc['webserv_cgi']['host'] \ + http=if defined? @rc['webserv_cgi']['host'] \ and @rc['webserv_cgi']['host'].is_a?(String) http=((@rc['webserv_cgi']['host'] =~ /https?:\/\//) ? '' : 'http://') if port.webserv_port_cgi @@ -2424,6 +2423,7 @@ WOK else "#{http}#{webserv_host_base}" end end + http=http.strip end def webrick #must have a port #REMOVE if defined? @rc['webserv_cgi']['host'] \ @@ -2479,12 +2479,13 @@ WOK else webserv_base_cgi end end - def sample_search_form_title - if defined? @rc['search']['sisu']['title'] \ + def sample_search_form_title(organised_by=:language) + title=if defined? @rc['search']['sisu']['title'] \ and @rc['search']['sisu']['title'] =~/\S+/ @rc['search']['sisu']['title'] - else %{(SiSU (generated sample) search form} + else %{SiSU (generated sample) search form} end + title=title + " (content organised by #{organised_by})" end def output_tell #BROKEN Revisit 2011-02 output_type=if defined? @rc['show_output_on'] \ |