Project

General



Profile

« Previous | Next » 

Revision 1100

Mantis importer:
  • do not truncate projects descriptions
  • encode attachment filenames to utf8

View differences:

trunk/lib/tasks/migrate_from_mantis.rake
118 118
        read_attribute(:name)[0..29]
119 119
      end
120 120
      
121
      def description
122
        read_attribute(:description).blank? ? read_attribute(:name) : read_attribute(:description)[0..254]
123
      end
124
      
125 121
      def identifier
126 122
        read_attribute(:name).underscore[0..19].gsub(/[^a-z0-9\-]/, '-')
127 123
      end
......
186 182
      end
187 183
      
188 184
      def original_filename
189
        filename
185
        MantisMigrate.encode(filename)
190 186
      end
191 187
      
192 188
      def content_type
......
445 441
      end
446 442
    end
447 443
    
448
  private
449 444
    def self.encode(text)
450 445
      @ic.iconv text
451 446
    rescue

Also available in: Unified diff