comparison app/controllers/projects_controller.rb @ 831:7614169e14ed bug_352

fixes bug #352. This fix needs to be reviewd, because it changes directly the redmine core.
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Tue, 31 Jan 2012 16:09:00 +0000
parents dd33798e514d
children 5e80956cc792
comparison
equal deleted inserted replaced
816:f3c3a1c55451 831:7614169e14ed
87 @issue_custom_fields = IssueCustomField.find(:all, :order => "#{CustomField.table_name}.position") 87 @issue_custom_fields = IssueCustomField.find(:all, :order => "#{CustomField.table_name}.position")
88 @trackers = Tracker.all 88 @trackers = Tracker.all
89 @project = Project.new 89 @project = Project.new
90 @project.safe_attributes = params[:project] 90 @project.safe_attributes = params[:project]
91 91
92
93 # todo: luisf: this should be removed from here...
94 if params && params[:project] && !params[:project][:tag_list].nil?
95 new_tags = params[:project][:tag_list].to_s.downcase
96
97 @project.tag_list = ActionController::Base.helpers.strip_tags(new_tags)
98 end
99 # end of code to be removed
100
101
92 if validate_parent_id && @project.save 102 if validate_parent_id && @project.save
93 @project.set_allowed_parent!(params[:project]['parent_id']) if params[:project].has_key?('parent_id') 103 @project.set_allowed_parent!(params[:project]['parent_id']) if params[:project].has_key?('parent_id')
94 # Add current user as a project member if he is not admin 104 # Add current user as a project member if he is not admin
95 unless User.current.admin? 105 unless User.current.admin?
96 r = Role.givable.find_by_id(Setting.new_project_user_role_id.to_i) || Role.givable.first 106 r = Role.givable.find_by_id(Setting.new_project_user_role_id.to_i) || Role.givable.first