Update temp_file.

This commit is contained in:
BoHung Chiu 2022-09-20 00:33:36 +08:00
parent e237aba5f2
commit c6ed0c8112
1 changed files with 5 additions and 1 deletions

View File

@ -151,6 +151,10 @@ class Site
# puts "cache header failed" # puts "cache header failed"
# end # end
@changed = self.changed? @changed = self.changed?
if self.privileged_ip_login_only_changed? && self.privileged_ip_login_only
operation_result = Page.where(:module=>'login_page',:access_level.ne=>'ip').update_all(:access_level=>'ip')
self.privileged_page_count += operation_result.modified_count
end
if self.privileged_ip_changed? if self.privileged_ip_changed?
self.privileged_ip_range = self.privileged_ip.map do |a, b| self.privileged_ip_range = self.privileged_ip.map do |a, b|
if a.present? && b.blank? if a.present? && b.blank?
@ -319,4 +323,4 @@ class Site
def min_memory def min_memory
return 50000 #50k bytes return 50000 #50k bytes
end end
end end