diff options
author | spag <spag@golwen.net> | 2013-01-13 17:23:47 +0100 |
---|---|---|
committer | spag <spag@golwen.net> | 2013-01-13 17:23:47 +0100 |
commit | 0b717b40b596fcd6ba238b2b3066b33a91289fdf (patch) | |
tree | 5b225d4085ac89532413ed224438d3ba187fda5f /app/controllers/config_snom_controller.rb | |
parent | 0d5114566e73c44799eac83d46f159cd979f4fcc (diff) | |
parent | 9567f239586f253002dea0ed654b7bd18a15e572 (diff) |
Merge branch 'develop' of github.com:amooma/GS5 into develop
Diffstat (limited to 'app/controllers/config_snom_controller.rb')
-rw-r--r-- | app/controllers/config_snom_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/config_snom_controller.rb b/app/controllers/config_snom_controller.rb index cb664db..24f6e59 100644 --- a/app/controllers/config_snom_controller.rb +++ b/app/controllers/config_snom_controller.rb @@ -182,9 +182,9 @@ class ConfigSnomController < ApplicationController send_sensitve = @provisioning_authenticated || !@phone.provisioning_key_active @phone_settings = Hash.new() - if defined?(PROVISIONING_KEY_LENGTH) && PROVISIONING_KEY_LENGTH > 0 + if !GsParameter.get('PROVISIONING_KEY_LENGTH').nil? && GsParameter.get('PROVISIONING_KEY_LENGTH') > 0 if @phone.provisioning_key.blank? - @phone.update_attributes({ :provisioning_key => SecureRandom.hex(PROVISIONING_KEY_LENGTH), :provisioning_key_active => false }) + @phone.update_attributes({ :provisioning_key => SecureRandom.hex(GsParameter.get('PROVISIONING_KEY_LENGTH')), :provisioning_key_active => false }) elsif @provisioning_authenticated @phone.update_attributes({ :provisioning_key_active => true }) end |