Revision 826:cb27dd527bd3 vendor/plugins/redmine_tags/lib/redmine_tags
| vendor/plugins/redmine_tags/lib/redmine_tags/patches/project_patch.rb | ||
|---|---|---|
| 65 | 65 |
options = {}
|
| 66 | 66 |
visible = ARCondition.new |
| 67 | 67 |
|
| 68 |
visible << ["#{Project.table_name}.is_public = \"1\""]
|
|
| 68 |
visible << ["#{Project.table_name}.is_public = '1'"]
|
|
| 69 | 69 |
|
| 70 | 70 |
if name_like |
| 71 | 71 |
visible << ["#{ActsAsTaggableOn::Tag.table_name}.name LIKE ?", "%#{name_like.downcase}%"]
|
| vendor/plugins/redmine_tags/lib/redmine_tags/patches/projects_controller_patch.rb | ||
|---|---|---|
| 10 | 10 |
skip_before_filter :authorize, :only => [:set_fieldset_status] |
| 11 | 11 |
skip_before_filter :find_project, :only => [:set_fieldset_status] |
| 12 | 12 |
before_filter :add_tags_to_project, :only => [:save, :update] |
| 13 |
# before_filter :filter_projects, :only => :index |
|
| 14 | 13 |
|
| 15 | 14 |
alias :index filtered_index |
| 16 | 15 |
end |
| 17 | 16 |
end |
| 18 | 17 |
|
| 19 | 18 |
module InstanceMethods |
| 20 |
|
|
| 21 |
|
|
| 22 |
|
|
| 19 |
|
|
| 23 | 20 |
def add_tags_to_project |
| 24 | 21 |
|
| 25 | 22 |
if params && params[:project] && !params[:project][:tag_list].nil? |
| 26 |
old_tags = @project.tag_list.to_s |
|
| 27 |
new_tags = params[:project][:tag_list].to_s |
|
| 23 |
old_tags = @project.tag_list.to_s.downcase
|
|
| 24 |
new_tags = params[:project][:tag_list].to_s.downcase
|
|
| 28 | 25 |
|
| 29 | 26 |
unless (old_tags == new_tags) |
| 30 |
@project.tag_list = new_tags
|
|
| 27 |
@project.tag_list = ActionController::Base.helpers.strip_tags(new_tags)
|
|
| 31 | 28 |
end |
| 32 | 29 |
end |
| 33 | 30 |
end |
Also available in: Unified diff