diff options
author | Ralph Amissah <ralph@amissah.com> | 2010-03-10 16:45:06 -0500 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2010-03-10 16:45:06 -0500 |
commit | 438f9863e6a3e52b2d0db357c60f8ef93a4fee51 (patch) | |
tree | 2b1053131f40e0e23045f40c28fe14307bd51803 | |
parent | texpdf_format, where image missing, escape image markup loop (diff) |
sysenv, html_promo, db name prefix from constants (now SiSUv2_)
-rw-r--r-- | lib/sisu/v2/html_promo.rb | 6 | ||||
-rw-r--r-- | lib/sisu/v2/sysenv.rb | 12 |
2 files changed, 10 insertions, 8 deletions
diff --git a/lib/sisu/v2/html_promo.rb b/lib/sisu/v2/html_promo.rb index 962184f2..df13393e 100644 --- a/lib/sisu/v2/html_promo.rb +++ b/lib/sisu/v2/html_promo.rb @@ -146,10 +146,12 @@ module SiSU_HTML_promo end def search_form_sisu(table=true) db=if @prod['db']=~/\S+/ - (@prod['db']=~/^SiSU_\S+/) ? @prod['db'] : "SiSU_#{@prod['db']}" + (@prod['db']=~/^#{Db[:name_prefix]}\S+/) ? @prod['db'] : "#{Db[:name_prefix]}#{@prod['db']}" elsif defined? @rc['search']['sisu']['db'] \ and @rc['search']['sisu']['db'] =~/\S+/ - (@rc['search']['sisu']['db']=~/^SiSU_\S+/) ? @prod['search']['sisu']['db'] : "SiSU_#{@prod['db']}" + (@rc['search']['sisu']['db']=~/^#{Db[:name_prefix]}\S+/) \ + ? @prod['search']['sisu']['db'] \ + : "#{Db[:name_prefix]}#{@prod['db']}" else nil end action=if @prod['action']=~/^http:\/\// diff --git a/lib/sisu/v2/sysenv.rb b/lib/sisu/v2/sysenv.rb index 9f69ccfe..99d0beb1 100644 --- a/lib/sisu/v2/sysenv.rb +++ b/lib/sisu/v2/sysenv.rb @@ -1004,9 +1004,9 @@ module SiSU_Env elsif widget.search? db=if rc['search']['sisu']['flag']==true \ and rc['search']['sisu']['db']=~/\S+/ - (rc['search']['sisu']['db']=~/^SiSU_\S+/) \ + (rc['search']['sisu']['db']=~/^#{Db[:name_prefix]}\S+/) \ ? rc['search']['sisu']['db'] \ - : "SiSU_#{rc['search']['sisu']['db']}" + : "#{Db[:name_prefix]}#{rc['search']['sisu']['db']}" else nil end action=rc['search']['sisu']['action'] @@ -1074,9 +1074,9 @@ WOK elsif widget.search_fixed? db=if rc['search']['sisu']['flag']==true \ and rc['search']['sisu']['db']=~/\S+/ - (rc['search']['sisu']['db']=~/^SiSU_\S+/) \ + (rc['search']['sisu']['db']=~/^#{Db[:name_prefix]}\S+/) \ ? rc['search']['sisu']['db'] \ - : "SiSU_#{rc['search']['sisu']['db']}" + : "#{Db[:name_prefix]}#{rc['search']['sisu']['db']}" else nil end action=rc['search']['sisu']['action'] @@ -1171,9 +1171,9 @@ WOK elsif widget_static.search? \ and rc['search']['sisu']['flag']==true db=if rc['search']['sisu']['db']=~/\S+/ - (rc['search']['sisu']['db']=~/^SiSU_\S+/) \ + (rc['search']['sisu']['db']=~/^#{Db[:name_prefix]}\S+/) \ ? rc['search']['sisu']['db'] \ - : "SiSU_#{rc['search']['sisu']['db']}" + : "#{Db[:name_prefix]}#{rc['search']['sisu']['db']}" else nil end action=rc['search']['sisu']['action'] |