diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-05-21 06:16:19 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-05-21 06:16:19 +0000 |
commit | 5543ec5f5a4f55529c55f296fda69a09c30670ae (patch) | |
tree | 5a4615a72bf2830aa335336cf7820eb0c0961e7e /app/controllers/repositories_controller.rb | |
parent | 782f7ca3bf2b491035d26c1572b7eae0b9513afa (diff) | |
download | redmine-5543ec5f5a4f55529c55f296fda69a09c30670ae.tar.gz redmine-5543ec5f5a4f55529c55f296fda69a09c30670ae.zip |
scm: code clean up repositories controller.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5875 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/repositories_controller.rb')
-rw-r--r-- | app/controllers/repositories_controller.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index 5d38f7e2c..b660408ff 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -82,7 +82,10 @@ class RepositoriesController < ApplicationController def destroy @repository.destroy - redirect_to :controller => 'projects', :action => 'settings', :id => @project, :tab => 'repository' + redirect_to :controller => 'projects', + :action => 'settings', + :id => @project, + :tab => 'repository' end def show @@ -204,7 +207,8 @@ class RepositoriesController < ApplicationController User.current.pref[:diff_type] = @diff_type User.current.preference.save end - @cache_key = "repositories/diff/#{@repository.id}/" + Digest::MD5.hexdigest("#{@path}-#{@rev}-#{@rev_to}-#{@diff_type}") + @cache_key = "repositories/diff/#{@repository.id}/" + + Digest::MD5.hexdigest("#{@path}-#{@rev}-#{@rev_to}-#{@diff_type}") unless read_fragment(@cache_key) @diff = @repository.diff(@path, @rev, @rev_to) show_error_not_found unless @diff |