Preserve uploaded files when on news.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8943 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
707ce0beef
commit
3871cbc75c
|
@ -71,7 +71,6 @@ class NewsController < ApplicationController
|
||||||
@news.attributes = params[:news]
|
@news.attributes = params[:news]
|
||||||
@news.save_attachments(params[:attachments])
|
@news.save_attachments(params[:attachments])
|
||||||
if @news.save
|
if @news.save
|
||||||
attachments = Attachment.attach_files(@news, params[:attachments])
|
|
||||||
render_attachment_warning_if_needed(@news)
|
render_attachment_warning_if_needed(@news)
|
||||||
flash[:notice] = l(:notice_successful_create)
|
flash[:notice] = l(:notice_successful_create)
|
||||||
redirect_to :controller => 'news', :action => 'index', :project_id => @project
|
redirect_to :controller => 'news', :action => 'index', :project_id => @project
|
||||||
|
@ -86,7 +85,6 @@ class NewsController < ApplicationController
|
||||||
def update
|
def update
|
||||||
@news.save_attachments(params[:attachments])
|
@news.save_attachments(params[:attachments])
|
||||||
if @news.update_attributes(params[:news])
|
if @news.update_attributes(params[:news])
|
||||||
attachments = Attachment.attach_files(@news, params[:attachments])
|
|
||||||
render_attachment_warning_if_needed(@news)
|
render_attachment_warning_if_needed(@news)
|
||||||
flash[:notice] = l(:notice_successful_update)
|
flash[:notice] = l(:notice_successful_update)
|
||||||
redirect_to :action => 'show', :id => @news
|
redirect_to :action => 'show', :id => @news
|
||||||
|
|
Loading…
Reference in New Issue