@@ -46,6 +46,7 class MessagesController < ApplicationController | |||
|
46 | 46 | @message.sticky = params[:message]['sticky'] |
|
47 | 47 | end |
|
48 | 48 | if request.post? && @message.save |
|
49 | call_hook(:controller_messages_new_after_save, { :params => params, :message => @message}) | |
|
49 | 50 | attach_files(@message, params[:attachments]) |
|
50 | 51 | redirect_to :action => 'show', :id => @message |
|
51 | 52 | end |
@@ -58,6 +59,7 class MessagesController < ApplicationController | |||
|
58 | 59 | @reply.board = @board |
|
59 | 60 | @topic.children << @reply |
|
60 | 61 | if !@reply.new_record? |
|
62 | call_hook(:controller_messages_reply_after_save, { :params => params, :message => @reply}) | |
|
61 | 63 | attach_files(@reply, params[:attachments]) |
|
62 | 64 | end |
|
63 | 65 | redirect_to :action => 'show', :id => @topic |
@@ -197,6 +197,9 class TimelogController < ApplicationController | |||
|
197 | 197 | render_403 and return if @time_entry && !@time_entry.editable_by?(User.current) |
|
198 | 198 | @time_entry ||= TimeEntry.new(:project => @project, :issue => @issue, :user => User.current, :spent_on => Date.today) |
|
199 | 199 | @time_entry.attributes = params[:time_entry] |
|
200 | ||
|
201 | call_hook(:controller_timelog_edit_before_save, { :params => params, :time_entry => @time_entry }) | |
|
202 | ||
|
200 | 203 | if request.post? and @time_entry.save |
|
201 | 204 | flash[:notice] = l(:notice_successful_update) |
|
202 | 205 | redirect_back_or_default :action => 'details', :project_id => @time_entry.project |
@@ -82,6 +82,7 class WikiController < ApplicationController | |||
|
82 | 82 | @content.author = User.current |
|
83 | 83 | # if page is new @page.save will also save content, but not if page isn't a new record |
|
84 | 84 | if (@page.new_record? ? @page.save : @content.save) |
|
85 | call_hook(:controller_wiki_edit_after_save, { :params => params, :page => @page}) | |
|
85 | 86 | redirect_to :action => 'index', :id => @project, :page => @page.title |
|
86 | 87 | end |
|
87 | 88 | end |
@@ -112,6 +112,8 class Changeset < ActiveRecord::Base | |||
|
112 | 112 | journal = issue.init_journal(user || User.anonymous, l(:text_status_changed_by_changeset, csettext)) |
|
113 | 113 | issue.status = fix_status |
|
114 | 114 | issue.done_ratio = done_ratio if done_ratio |
|
115 | Redmine::Hook.call_hook(:model_changeset_scan_commit_for_issue_ids_pre_issue_update, | |
|
116 | { :changeset => self, :issue => issue }) | |
|
115 | 117 | issue.save |
|
116 | 118 | Mailer.deliver_issue_edit(journal) if Setting.notified_events.include?('issue_updated') |
|
117 | 119 | end |
@@ -368,9 +368,9 class Query < ActiveRecord::Base | |||
|
368 | 368 | Time.now.at_beginning_of_week |
|
369 | 369 | sql = "#{db_table}.#{db_field} BETWEEN '%s' AND '%s'" % [connection.quoted_date(from), connection.quoted_date(from + 7.days)] |
|
370 | 370 | when "~" |
|
371 | sql = "#{db_table}.#{db_field} LIKE '%#{connection.quote_string(value.first)}%'" | |
|
371 | sql = "LOWER(#{db_table}.#{db_field}) LIKE '%#{connection.quote_string(value.first.to_s.downcase)}%'" | |
|
372 | 372 | when "!~" |
|
373 | sql = "#{db_table}.#{db_field} NOT LIKE '%#{connection.quote_string(value.first)}%'" | |
|
373 | sql = "LOWER(#{db_table}.#{db_field}) NOT LIKE '%#{connection.quote_string(value.first.to_s.downcase)}%'" | |
|
374 | 374 | end |
|
375 | 375 | |
|
376 | 376 | return sql |
@@ -24,7 +24,7 xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do | |||
|
24 | 24 | xml.email(author.mail) if author.is_a?(User) && !author.mail.blank? && !author.pref.hide_mail |
|
25 | 25 | end if author |
|
26 | 26 | xml.content "type" => "html" do |
|
27 |
xml.text! textilizable(item |
|
|
27 | xml.text! textilizable(item, :event_description, :only_path => false) | |
|
28 | 28 | end |
|
29 | 29 | end |
|
30 | 30 | end |
@@ -23,7 +23,7 xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do | |||
|
23 | 23 | xml.text! '<li>' + show_detail(detail, false) + '</li>' |
|
24 | 24 | end |
|
25 | 25 | xml.text! '</ul>' |
|
26 |
xml.text! textilizable(change |
|
|
26 | xml.text! textilizable(change, :notes, :only_path => false) unless change.notes.blank? | |
|
27 | 27 | end |
|
28 | 28 | end |
|
29 | 29 | end |
@@ -11,8 +11,10 http://www.redmine.org/ | |||
|
11 | 11 | * Do not require a non-word character after a comma in Redmine links |
|
12 | 12 | * Include issue hyperlinks in reminder emails |
|
13 | 13 | * Fixed: 500 Internal Server Error is raised if add an empty comment to the news |
|
14 |
* Fixe |
|
|
14 | * Fixed: Atom links for wiki pages are not correct | |
|
15 | 15 | * Fixed: Atom feeds leak email address |
|
16 | * Fixed: Case sensitivity in Issue filtering | |
|
17 | * Fixed: When reading RSS feed, the inline-embedded images are not properly shown | |
|
16 | 18 | |
|
17 | 19 | |
|
18 | 20 | == 2009-05-17 v0.8.4 |
@@ -109,4 +109,16 attachments_009: | |||
|
109 | 109 | filename: version_file.zip |
|
110 | 110 | author_id: 2 |
|
111 | 111 | content_type: application/octet-stream |
|
112 | attachments_010: | |
|
113 | created_on: 2006-07-19 21:07:27 +02:00 | |
|
114 | container_type: Issue | |
|
115 | container_id: 2 | |
|
116 | downloads: 0 | |
|
117 | disk_filename: 060719210727_picture.jpg | |
|
118 | digest: b91e08d0cf966d5c6ff411bd8c4cc3a2 | |
|
119 | id: 10 | |
|
120 | filesize: 452 | |
|
121 | filename: picture.jpg | |
|
122 | author_id: 2 | |
|
123 | content_type: image/jpeg | |
|
112 | 124 | No newline at end of file |
@@ -13,4 +13,11 journals_002: | |||
|
13 | 13 | journalized_type: Issue |
|
14 | 14 | user_id: 2 |
|
15 | 15 | journalized_id: 1 |
|
16 | journals_003: | |
|
17 | created_on: <%= 1.days.ago.to_date.to_s(:db) %> | |
|
18 | notes: "A comment with inline image: !picture.jpg!" | |
|
19 | id: 3 | |
|
20 | journalized_type: Issue | |
|
21 | user_id: 2 | |
|
22 | journalized_id: 2 | |
|
16 | 23 | No newline at end of file |
@@ -255,6 +255,14 class IssuesControllerTest < Test::Unit::TestCase | |||
|
255 | 255 | :child => { :tag => 'legend', |
|
256 | 256 | :content => /Notes/ } } |
|
257 | 257 | end |
|
258 | ||
|
259 | def test_show_atom | |
|
260 | get :show, :id => 2, :format => 'atom' | |
|
261 | assert_response :success | |
|
262 | assert_template 'changes' | |
|
263 | # Inline image | |
|
264 | assert @response.body.include?("<img src=\"http://test.host/attachments/download/10\" alt=\"\" />") | |
|
265 | end | |
|
258 | 266 | |
|
259 | 267 | def test_show_export_to_pdf |
|
260 | 268 | get :show, :id => 3, :format => 'pdf' |
@@ -150,15 +150,17 class QueryTest < Test::Unit::TestCase | |||
|
150 | 150 | |
|
151 | 151 | def test_operator_contains |
|
152 | 152 | query = Query.new(:project => Project.find(1), :name => '_') |
|
153 |
query.add_filter('subject', '~', [' |
|
|
154 |
assert query.statement.include?("#{Issue.table_name}.subject LIKE '% |
|
|
155 | find_issues_with_query(query) | |
|
153 | query.add_filter('subject', '~', ['uNable']) | |
|
154 | assert query.statement.include?("LOWER(#{Issue.table_name}.subject) LIKE '%unable%'") | |
|
155 | result = find_issues_with_query(query) | |
|
156 | assert result.empty? | |
|
157 | result.each {|issue| assert issue.subject.downcase.include?('unable') } | |
|
156 | 158 | end |
|
157 | 159 | |
|
158 | 160 | def test_operator_does_not_contains |
|
159 | 161 | query = Query.new(:project => Project.find(1), :name => '_') |
|
160 |
query.add_filter('subject', '!~', [' |
|
|
161 |
assert query.statement.include?("#{Issue.table_name}.subject NOT LIKE '% |
|
|
162 | query.add_filter('subject', '!~', ['uNable']) | |
|
163 | assert query.statement.include?("LOWER(#{Issue.table_name}.subject) NOT LIKE '%unable%'") | |
|
162 | 164 | find_issues_with_query(query) |
|
163 | 165 | end |
|
164 | 166 |
General Comments 0
You need to be logged in to leave comments.
Login now