From f31e286f4a73c5c0f355512b0cb45c6c82088516 Mon Sep 17 00:00:00 2001
From: Ralph Amissah
Date: Sat, 22 Jun 2013 01:13:46 -0400
Subject: v5: general code cleaning
* propagate back to v4 after testing
---
lib/sisu/v5/html_promo.rb | 17 +++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)
(limited to 'lib/sisu/v5/html_promo.rb')
diff --git a/lib/sisu/v5/html_promo.rb b/lib/sisu/v5/html_promo.rb
index a76a15fa..cd57e5fd 100644
--- a/lib/sisu/v5/html_promo.rb
+++ b/lib/sisu/v5/html_promo.rb
@@ -175,7 +175,7 @@ module SiSU_HTML_Promo
@rc['search']['sisu']['action']
else nil
end
- form=if action \
+ if action \
and db
@env.widget.search_form('sisusearch',action,db,table)
else ''
@@ -275,36 +275,34 @@ module SiSU_HTML_Promo
end
def site_link #Work area
if url_link.url
- <
#{url_link.url}
#{image}
#{title}
#{subtitle}
#{nick}
-WOK
+ WOK
else
- <
#{image}
#{title}
#{subtitle}
-WOK
+ WOK
end
end
self
end
def output_form_sponsor(type,id)
cell=cell(@ad[:promo][type][id],prod_id)
- prod_type=((id=~/id_(?:[0-9x]){10,13}/i) ? 'isbn' : 'id')
- id_detail=%{#{prod_type}: #{prod_id}
}
- <
#{cell.site_link}
#{cell.blurb}
#{cell.links}
-WOK
+ WOK
end
def output_form_link(type,id)
prod_id=id.gsub(/id_/,'')
@@ -404,7 +402,6 @@ WOK
@ad[:promo_list][category][type].each do |i|
if i
id=((i.inspect =~/^\d/) ? "id_#{i.to_s.strip}" : i.to_s.strip) #watch remove .to_s ?
- gbp=usd=euro=nil
if defined? @ad[:promo][type][id] \
and not @ad[:promo][type][id].nil?
adverts << output_form_select(type,id)
--
cgit v1.2.3