Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
And a fix from Ari Stern.
  • Loading branch information
distler committed Jun 18, 2009
1 parent 73120cd commit 2ffa1ea
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/controllers/file_controller.rb
Expand Up @@ -7,8 +7,8 @@ class FileController < ApplicationController

layout 'default'

before_filter :dnsbl_check
before_filter :check_allow_uploads, :except => :file
before_filter :dnsbl_check, :check_authorized
before_filter :check_allow_uploads, :except => [:file, :blahtex_png]

def file
@file_name = params['id']
Expand All @@ -28,7 +28,7 @@ def file
# no form supplied, this is a request to download the file
file = @web.files_path + '/' + @file_name
if File.exists?(file)
send_file(file) if check_authorized
send_file(file)
else
return unless check_allow_uploads
@file = WikiFile.new(:file_name => @file_name)
Expand All @@ -38,7 +38,7 @@ def file
end

def blahtex_png
send_file(@web.blahtex_pngs_path + '/' + params['id']) if check_authorized
send_file(@web.blahtex_pngs_path + '/' + params['id'])
end

def delete
Expand Down

0 comments on commit 2ffa1ea

Please sign in to comment.