Defect #5354 » redmine_patch_5354.diff
| J:/Coding/redmine_plug/Redmine/app/controllers/projects_controller.rb Wed May 12 15:53:49 2010 | ||
|---|---|---|
|
|
||
|
# Edit @project
|
||
|
def edit
|
||
|
if request.post?
|
||
|
@project.attributes = params[:project]
|
||
|
if validate_parent_id && @project.save
|
||
|
@project.set_allowed_parent!(params[:project]['parent_id']) if params[:project].has_key?('parent_id')
|
||
|
# Force a save of the project record with the correct updated_on time
|
||
|
# to cover corner cases of custom fields, etc. being updated by user
|
||
|
# which do not natively trigger the base project save method
|
||
|
@project.updated_on = Time.now
|
||
|
@project.save
|
||
|
flash[:notice] = l(:notice_successful_update)
|
||
|
redirect_to :action => 'settings', :id => @project
|
||
|
else
|
||
|
settings
|
||
|
render :action => 'settings'
|
||
|
end
|
||
|
end
|
||