More of the Same.
This commit is contained in:
parent
df28bd545a
commit
a2c7705de5
4 changed files with 54 additions and 6 deletions
|
@ -29,7 +29,7 @@ class AdminController < ApplicationController
|
|||
if params['address']
|
||||
unless (request.post? || ENV["RAILS_ENV"] == "test")
|
||||
headers['Allow'] = 'POST'
|
||||
render(:status => 405, :text => 'You must use an HTTP POST')
|
||||
render(:status => 405, :text => 'You must use an HTTP POST', :layout => 'error')
|
||||
return
|
||||
end
|
||||
# form submitted
|
||||
|
@ -56,7 +56,7 @@ class AdminController < ApplicationController
|
|||
if system_password
|
||||
unless (request.post? || ENV["RAILS_ENV"] == "test")
|
||||
headers['Allow'] = 'POST'
|
||||
render(:status => 405, :text => 'You must use an HTTP POST')
|
||||
render(:status => 405, :text => 'You must use an HTTP POST', :layout => 'error')
|
||||
return
|
||||
end
|
||||
# form submitted
|
||||
|
@ -93,7 +93,7 @@ class AdminController < ApplicationController
|
|||
def remove_orphaned_pages
|
||||
unless (request.post? || ENV["RAILS_ENV"] == "test")
|
||||
headers['Allow'] = 'POST'
|
||||
render(:status => 405, :text => 'You must use an HTTP POST')
|
||||
render(:status => 405, :text => 'You must use an HTTP POST', :layout => 'error')
|
||||
return
|
||||
end
|
||||
if wiki.authenticate(params['system_password_orphaned'])
|
||||
|
|
|
@ -36,7 +36,7 @@ class ApplicationController < ActionController::Base
|
|||
if @web_name
|
||||
@web = @wiki.webs[@web_name]
|
||||
if @web.nil?
|
||||
render(:status => 404, :text => "Unknown web '#{@web_name}'")
|
||||
render(:status => 404, :text => "Unknown web '#{@web_name}'", :layout => 'error')
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
|
|
@ -14,7 +14,7 @@ class FileController < ApplicationController
|
|||
if params['file']
|
||||
unless (request.post? || ENV["RAILS_ENV"] == "test")
|
||||
headers['Allow'] = 'POST'
|
||||
render(:status => 405, :text => 'You must use an HTTP POST')
|
||||
render(:status => 405, :text => 'You must use an HTTP POST', :layout => 'error')
|
||||
return
|
||||
end
|
||||
# form supplied
|
||||
|
@ -63,7 +63,7 @@ class FileController < ApplicationController
|
|||
protected
|
||||
|
||||
def check_allow_uploads
|
||||
render(:status => 404, :text => "Web #{params['web'].inspect} not found") and return false unless @web
|
||||
render(:status => 404, :text => "Web #{params['web'].inspect} not found", :layout => 'error') and return false unless @web
|
||||
if @web.allow_uploads?
|
||||
return true
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue