summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-07 23:30:24 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-07 23:30:24 +0100
commit5cb5feb40a71fc04f1352f62ee55db1b13fc2169 (patch)
tree87fc775e6867980451621730e4b760959ee2b96f /app/controllers
parentb1fb25f0d6ee481cca54f69ed50e6196595ce777 (diff)
parent97e73758b2d61c90dc2d1bdbcfd61f7a80db21a8 (diff)
Merge branch 'PROVISIONING_SET_HTTP_USER' into develop
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/config_snom_controller.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/app/controllers/config_snom_controller.rb b/app/controllers/config_snom_controller.rb
index 123f2cd..7ee8276 100644
--- a/app/controllers/config_snom_controller.rb
+++ b/app/controllers/config_snom_controller.rb
@@ -199,19 +199,19 @@ class ConfigSnomController < ApplicationController
end
end
- if defined?(PROVISIONING_SET_HTTP_USER) && @phone.http_user.blank?
- if PROVISIONING_SET_HTTP_USER.class == Fixnum
- @phone.update_attributes({ :http_user => SecureRandom.hex(PROVISIONING_SET_HTTP_USER) })
- elsif PROVISIONING_SET_HTTP_USER.class == String
- @phone.update_attributes({ :http_user => PROVISIONING_SET_HTTP_USER })
+ if !GsParameter.get('PROVISIONING_SET_HTTP_USER').nil? && @phone.http_user.blank?
+ if GsParameter.get('PROVISIONING_SET_HTTP_USER').class == Fixnum
+ @phone.update_attributes({ :http_user => SecureRandom.hex(GsParameter.get('PROVISIONING_SET_HTTP_USER')) })
+ elsif GsParameter.get('PROVISIONING_SET_HTTP_USER').class == String
+ @phone.update_attributes({ :http_user => GsParameter.get('PROVISIONING_SET_HTTP_USER') })
end
end
- if defined?(PROVISIONING_SET_HTTP_PASSWORD) && @phone.http_password.blank?
- if PROVISIONING_SET_HTTP_PASSWORD.class == Fixnum
- @phone.update_attributes({ :http_password => SecureRandom.hex(PROVISIONING_SET_HTTP_PASSWORD) })
- elsif PROVISIONING_SET_HTTP_PASSWORD.class == String
- @phone.update_attributes({ :http_password => PROVISIONING_SET_HTTP_PASSWORD })
+ if !GsParameter.get('PROVISIONING_SET_HTTP_PASSWORD').nil? && @phone.http_password.blank?
+ if GsParameter.get('PROVISIONING_SET_HTTP_PASSWORD').class == Fixnum
+ @phone.update_attributes({ :http_password => SecureRandom.hex(GsParameter.get('PROVISIONING_SET_HTTP_PASSWORD')) })
+ elsif GsParameter.get('PROVISIONING_SET_HTTP_PASSWORD').class == String
+ @phone.update_attributes({ :http_password => GsParameter.get('PROVISIONING_SET_HTTP_PASSWORD') })
end
end