mirror of
https://github.com/redmine/redmine.git
synced 2025-11-01 19:05:51 +01:00
AttachmentsController now handles attachments deletion.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2116 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -20,7 +20,7 @@ require 'diff'
|
||||
class WikiController < ApplicationController
|
||||
before_filter :find_wiki, :authorize
|
||||
|
||||
verify :method => :post, :only => [:destroy, :destroy_attachment, :protect], :redirect_to => { :action => :index }
|
||||
verify :method => :post, :only => [:destroy, :protect], :redirect_to => { :action => :index }
|
||||
|
||||
helper :attachments
|
||||
include AttachmentsHelper
|
||||
@@ -187,13 +187,6 @@ class WikiController < ApplicationController
|
||||
redirect_to :action => 'index', :page => @page.title
|
||||
end
|
||||
|
||||
def destroy_attachment
|
||||
@page = @wiki.find_page(params[:page])
|
||||
return render_403 unless editable?
|
||||
@page.attachments.find(params[:attachment_id]).destroy
|
||||
redirect_to :action => 'index', :page => @page.title
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def find_wiki
|
||||
|
||||
Reference in New Issue
Block a user