update action controller
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user