Patch #610 » add_xsd_as_xml_mimetype.patch
| app/controllers/projects_controller.rb (working copy) | ||
|---|---|---|
|
def add_file
|
||
|
if request.post?
|
||
|
@version = @project.versions.find_by_id(params[:version_id])
|
||
|
if @version == nil
|
||
|
flash[:error] = l(:error_need_version_to_upload_file)
|
||
|
else
|
||
|
attachments = attach_files(@version, params[:attachments])
|
||
|
Mailer.deliver_attachments_added(attachments) if !attachments.empty? && Setting.notified_events.include?('file_added')
|
||
|
redirect_to :controller => 'projects', :action => 'list_files', :id => @project
|
||
|
end
|
||
|
end
|
||
|
@versions = @project.versions.sort
|
||
|
end
|
||
| lang/en.yml (working copy) | ||
|---|---|---|
|
error_can_t_load_default_data: "Default configuration could not be loaded: %s"
|
||
|
error_scm_not_found: "Entry and/or revision doesn't exist in the repository."
|
||
|
error_scm_command_failed: "An error occurred when trying to access the repository: %s"
|
||
|
error_need_version_to_upload_file: "Version is required. Create a Version if one doesn't exist."
|
||
|
mail_subject_lost_password: Your Redmine password
|
||
|
mail_body_lost_password: 'To change your Redmine password, click on the following link:'
|
||
| lib/redmine/mime_type.rb (working copy) | ||
|---|---|---|
|
'text/x-python' => 'py',
|
||
|
'text/x-ruby' => 'rb,rbw,ruby,rake',
|
||
|
'text/x-sh' => 'sh',
|
||
|
'text/xml' => 'xml',
|
||
|
'text/xml' => 'xml,xsd',
|
||
|
'text/yaml' => 'yml,yaml',
|
||
|
'image/gif' => 'gif',
|
||
|
'image/jpeg' => 'jpg,jpeg,jpe',
|
||