Project

General

Profile

Patch #610 » add_xsd_as_xml_mimetype.patch

Kit Plummer, 2008-02-05 19:35

View differences:

app/controllers/projects_controller.rb (working copy)
262 262
  def add_file
263 263
    if request.post?
264 264
      @version = @project.versions.find_by_id(params[:version_id])
265
      if @version == nil
266
        flash[:error] = l(:error_need_version_to_upload_file)
267
      else
265 268
      attachments = attach_files(@version, params[:attachments])
266 269
      Mailer.deliver_attachments_added(attachments) if !attachments.empty? && Setting.notified_events.include?('file_added')
267 270
      redirect_to :controller => 'projects', :action => 'list_files', :id => @project
271
      end
268 272
    end
269 273
    @versions = @project.versions.sort
270 274
  end
lang/en.yml (working copy)
80 80
error_can_t_load_default_data: "Default configuration could not be loaded: %s"
81 81
error_scm_not_found: "Entry and/or revision doesn't exist in the repository."
82 82
error_scm_command_failed: "An error occurred when trying to access the repository: %s"
83
error_need_version_to_upload_file: "Version is required.  Create a Version if one doesn't exist."
83 84

  
84 85
mail_subject_lost_password: Your Redmine password
85 86
mail_body_lost_password: 'To change your Redmine password, click on the following link:'
lib/redmine/mime_type.rb (working copy)
31 31
      'text/x-python' => 'py',
32 32
      'text/x-ruby' => 'rb,rbw,ruby,rake',
33 33
      'text/x-sh' => 'sh',
34
      'text/xml' => 'xml',
34
      'text/xml' => 'xml,xsd',
35 35
      'text/yaml' => 'yml,yaml',
36 36
      'image/gif' => 'gif',
37 37
      'image/jpeg' => 'jpg,jpeg,jpe',
(1-1/3)