Commit 300ce8a4a98624421261e2d45d0a30c721d0c87c

Authored by JoenioCosta
1 parent 0c1b599c

ActionItem146: fixing warning 'constant already defined'


git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1622 3f533792-8f58-4932-b0fe-aaf55b0a4547
vendor/plugins/inverse_captcha/lib/inverse_captcha.rb
... ... @@ -2,9 +2,9 @@ module InverseCaptcha
2 2  
3 3 module ClassMethods
4 4 def inverse_captcha(opt = {})
5   - InverseCaptcha.const_set("ICAPTCHA_FIELD", opt[:field])
6   - InverseCaptcha.const_set("ICAPTCHA_LABEL", opt[:label] || N_("Don't fill this field"))
7   - InverseCaptcha.const_set("ICAPTCHA_STYLECLASS", opt[:class] || 'ghost')
  5 + InverseCaptcha.const_set("ICAPTCHA_FIELD", opt[:field]) unless InverseCaptcha.const_defined? "ICAPTCHA_FIELD"
  6 + InverseCaptcha.const_set("ICAPTCHA_LABEL", opt[:label] || N_("Don't fill this field")) unless InverseCaptcha.const_defined? "ICAPTCHA_LABEL"
  7 + InverseCaptcha.const_set("ICAPTCHA_STYLECLASS", opt[:class] || 'ghost') unless InverseCaptcha.const_defined? "ICAPTCHA_STYLECLASS"
8 8 self.send(:include, InverseCaptcha)
9 9 end
10 10 end
... ...