Merge branch 'bzr/golem' of /Users/distler/Sites/code/instiki
This commit is contained in:
commit
a016729d89
1 changed files with 4 additions and 4 deletions
|
@ -7,8 +7,8 @@ class FileController < ApplicationController
|
||||||
|
|
||||||
layout 'default'
|
layout 'default'
|
||||||
|
|
||||||
before_filter :dnsbl_check
|
before_filter :dnsbl_check, :check_authorized
|
||||||
before_filter :check_allow_uploads, :except => :file
|
before_filter :check_allow_uploads, :except => [:file, :blahtex_png]
|
||||||
|
|
||||||
def file
|
def file
|
||||||
@file_name = params['id']
|
@file_name = params['id']
|
||||||
|
@ -28,7 +28,7 @@ class FileController < ApplicationController
|
||||||
# no form supplied, this is a request to download the file
|
# no form supplied, this is a request to download the file
|
||||||
file = @web.files_path + '/' + @file_name
|
file = @web.files_path + '/' + @file_name
|
||||||
if File.exists?(file)
|
if File.exists?(file)
|
||||||
send_file(file) if check_authorized
|
send_file(file)
|
||||||
else
|
else
|
||||||
return unless check_allow_uploads
|
return unless check_allow_uploads
|
||||||
@file = WikiFile.new(:file_name => @file_name)
|
@file = WikiFile.new(:file_name => @file_name)
|
||||||
|
@ -38,7 +38,7 @@ class FileController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def blahtex_png
|
def blahtex_png
|
||||||
send_file(@web.blahtex_pngs_path + '/' + params['id']) if check_authorized
|
send_file(@web.blahtex_pngs_path + '/' + params['id'])
|
||||||
end
|
end
|
||||||
|
|
||||||
def delete
|
def delete
|
||||||
|
|
Loading…
Reference in a new issue