From 438f9863e6a3e52b2d0db357c60f8ef93a4fee51 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 10 Mar 2010 16:45:06 -0500 Subject: sysenv, html_promo, db name prefix from constants (now SiSUv2_) --- lib/sisu/v2/html_promo.rb | 6 ++++-- 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'] -- cgit v1.2.3