Project

General

Profile

Defect #6996 ยป migrate_from_trac.patch

Jean-Philippe Lang, 2010-11-28 17:55

View differences:

lib/tasks/migrate_from_trac.rake (working copy)
167 167
        has_many :attachments, :class_name => "TracAttachment",
168 168
                               :finder_sql => "SELECT DISTINCT attachment.* FROM #{TracMigrate::TracAttachment.table_name}" +
169 169
                                              " WHERE #{TracMigrate::TracAttachment.table_name}.type = 'ticket'" +
170
                                              ' AND #{TracMigrate::TracAttachment.table_name}.id = \'#{id}\''
170
                                              ' AND #{TracMigrate::TracAttachment.table_name}.id = \'#{TracMigrate::TracAttachment.connection.quote_string(id.to_s)}\''
171 171
        has_many :customs, :class_name => "TracTicketCustom", :foreign_key => :ticket
172 172

  
173 173
        def ticket_type
......
207 207
        has_many :attachments, :class_name => "TracAttachment",
208 208
                               :finder_sql => "SELECT DISTINCT attachment.* FROM #{TracMigrate::TracAttachment.table_name}" +
209 209
                                      " WHERE #{TracMigrate::TracAttachment.table_name}.type = 'wiki'" +
210
                                      ' AND #{TracMigrate::TracAttachment.table_name}.id = \'#{id}\''
210
                                      ' AND #{TracMigrate::TracAttachment.table_name}.id = \'#{TracMigrate::TracAttachment.connection.quote_string(id.to_s)}\''
211 211

  
212 212
        def self.columns
213 213
          # Hides readonly Trac field to prevent clash with AR readonly? method (Rails 2.0)
    (1-1/1)