update action controller

This commit is contained in:
Thein Lin Kyaw
2020-01-20 16:12:27 +06:30
parent 0df7357cc9
commit a24ada5956
2 changed files with 7 additions and 7 deletions

View File

@@ -20,8 +20,8 @@ class ActionController::Base
end
elsif request.subdomain.present? && request.subdomain != "www" || ENV["SERVER_MODE"] == "application"
# check for license file
if check_license
current_license(ENV["SX_PROVISION_URL"])
if check_license(request.host)
current_license(ENV["SX_PROVISION_URL"], request.host)
else
redirect_to activate_path
end
@@ -37,8 +37,8 @@ class ActionController::Base
end
end
def current_license(url)
@license = License.new(url)
def current_license(url, lookup)
@license = License.new(url, lookup)
flag = @license.detail_with_local_file()
if (flag == 0)
flash[:notice] = 'Expired or No License!'
@@ -59,8 +59,8 @@ class ActionController::Base
end
end
def check_license
License.check_license_file
def check_license(lookup)
License.check_license_file(lookup)
end
def check_installation