##// END OF EJS Templates
scm: remove trailing white-spaces from repositories controller....
Toshi MARUYAMA -
r5754:782f7ca3bf2b
parent child
Show More
@@ -1,16 +1,16
1 1 # Redmine - project management software
2 # Copyright (C) 2006-2009 Jean-Philippe Lang
2 # Copyright (C) 2006-2011 Jean-Philippe Lang
3 3 #
4 4 # This program is free software; you can redistribute it and/or
5 5 # modify it under the terms of the GNU General Public License
6 6 # as published by the Free Software Foundation; either version 2
7 7 # of the License, or (at your option) any later version.
8 #
8 #
9 9 # This program is distributed in the hope that it will be useful,
10 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 12 # GNU General Public License for more details.
13 #
13 #
14 14 # You should have received a copy of the GNU General Public License
15 15 # along with this program; if not, write to the Free Software
16 16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -154,7 +154,7 class RepositoriesController < ApplicationController
154 154
155 155 def is_entry_text_data?(ent, path)
156 156 # UTF-16 contains "\x00".
157 # It is very strict that file contains less than 30% of ascii symbols
157 # It is very strict that file contains less than 30% of ascii symbols
158 158 # in non Western Europe.
159 159 return true if Redmine::MimeType.is_type?('text', path)
160 160 # Ruby 1.8.6 has a bug of integer divisions.
@@ -198,7 +198,7 class RepositoriesController < ApplicationController
198 198 else
199 199 @diff_type = params[:type] || User.current.pref[:diff_type] || 'inline'
200 200 @diff_type = 'inline' unless %w(inline sbs).include?(@diff_type)
201
201
202 202 # Save diff type as user preference
203 203 if User.current.logged? && @diff_type != User.current.pref[:diff_type]
204 204 User.current.pref[:diff_type] = @diff_type
@@ -308,7 +308,7 class RepositoriesController < ApplicationController
308 308 :data => changes_by_month[0..11].reverse,
309 309 :title => l(:label_change_plural)
310 310 )
311
311
312 312 graph.burn
313 313 end
314 314
@@ -318,18 +318,18 class RepositoriesController < ApplicationController
318 318
319 319 changes_by_author = repository.changes.count(:all, :group => :committer)
320 320 h = changes_by_author.inject({}) {|o, i| o[i.first] = i.last; o}
321
321
322 322 fields = commits_by_author.collect {|r| r.first}
323 323 commits_data = commits_by_author.collect {|r| r.last}
324 324 changes_data = commits_by_author.collect {|r| h[r.first] || 0}
325
325
326 326 fields = fields + [""]*(10 - fields.length) if fields.length<10
327 327 commits_data = commits_data + [0]*(10 - commits_data.length) if commits_data.length<10
328 328 changes_data = changes_data + [0]*(10 - changes_data.length) if changes_data.length<10
329
329
330 330 # Remove email adress in usernames
331 331 fields = fields.collect {|c| c.gsub(%r{<.+@.+>}, '') }
332
332
333 333 graph = SVG::Graph::BarHorizontal.new(
334 334 :height => 400,
335 335 :width => 800,
General Comments 0
You need to be logged in to leave comments. Login now