diff --git a/lib/redmine_git_hosting/cache/abstract_cache.rb b/lib/redmine_git_hosting/cache/abstract_cache.rb index 171a60d15..bc3c4dee2 100644 --- a/lib/redmine_git_hosting/cache/abstract_cache.rb +++ b/lib/redmine_git_hosting/cache/abstract_cache.rb @@ -49,14 +49,14 @@ def logger def time_limit return if max_cache_time.to_i.negative? # No expiration needed - current_time = ActiveRecord::Base.default_timezone == :utc ? Time.now.utc : Time.zone.now + current_time = ActiveRecord.default_timezone == :utc ? Time.now.utc : Time.zone.now current_time - max_cache_time end def valid_cache_entry?(cached_entry_date) return true if max_cache_time.to_i.negative? # No expiration needed - current_time = ActiveRecord::Base.default_timezone == :utc ? Time.now.utc : Time.zone.now + current_time = ActiveRecord.default_timezone == :utc ? Time.now.utc : Time.zone.now expired = current_time.to_i - cached_entry_date.to_i > max_cache_time !expired end diff --git a/lib/redmine_git_hosting/patches/repositories_controller_patch.rb b/lib/redmine_git_hosting/patches/repositories_controller_patch.rb index fa0919957..ec76bc48d 100644 --- a/lib/redmine_git_hosting/patches/repositories_controller_patch.rb +++ b/lib/redmine_git_hosting/patches/repositories_controller_patch.rb @@ -152,7 +152,7 @@ def diff_with_options @changeset = @repository.find_changeset_by_name @rev @changeset_to = @rev_to ? @repository.find_changeset_by_name(@rev_to) : nil @diff_format_revisions = @repository.diff_format_revisions @changeset, @changeset_to - render :diff, formats: :html, layout: 'base.html.erb' + render :diff, formats: :html, layout: 'base' end end end