Revision deleting #580

This commit is contained in:
Karel Picman 2016-11-10 11:00:05 +01:00
parent 539daa5472
commit 70b56a0a53

View File

@ -242,6 +242,10 @@ class DmsfFilesController < ApplicationController
def delete_revision
if @revision
if @revision.delete(true)
if @file.name != @file.last_revision.name
@file.name = @file.last_revision.name
@file.save
end
flash[:notice] = l(:notice_revision_deleted)
log_activity('deleted')
else