Upgrade to Rails 2.0.2

Upgraded to Rails 2.0.2, except that we maintain

   vendor/rails/actionpack/lib/action_controller/routing.rb

from Rail 1.2.6 (at least for now), so that Routes don't change. We still
get to enjoy Rails's many new features.

Also fixed a bug in Chunk-handling: disable WikiWord processing in tags (for real this time).
This commit is contained in:
Jacques Distler 2007-12-21 01:48:59 -06:00
parent 0f6889e09f
commit 6873fc8026
1083 changed files with 52810 additions and 41058 deletions

View file

@ -148,16 +148,16 @@ class ApplicationController < ActionController::Base
def set_content_type_header
if %w(atom_with_content atom_with_headlines).include?(action_name)
response.headers['Content-Type'] = 'application/atom+xml; charset=UTF-8'
response.headers['type'] = 'application/atom+xml; charset=UTF-8'
elsif %w(tex).include?(action_name)
response.headers['Content-Type'] = 'text/plain; charset=UTF-8'
response.headers['type'] = 'text/plain; charset=UTF-8'
elsif request.env['HTTP_USER_AGENT'] =~ /Validator/ or request.env.include?('HTTP_ACCEPT') &&
Mime::Type.parse(request.env["HTTP_ACCEPT"]).include?(Mime::XHTML)
response.headers['Content-Type'] = 'application/xhtml+xml; charset=UTF-8'
response.headers['type'] = 'application/xhtml+xml; charset=UTF-8'
elsif request.env['HTTP_USER_AGENT'] =~ /MathPlayer/
response.headers['Content-Type'] = 'application/xhtml+xml'
response.headers['type'] = 'application/xhtml+xml'
else
response.headers['Content-Type'] = 'text/html; charset=UTF-8'
response.headers['type'] = 'text/html; charset=UTF-8'
end
end

View file

@ -136,8 +136,8 @@ class WikiController < ApplicationController
if rss_with_content_allowed?
render_atom(hide_description = false)
else
render_text 'Atom feed with content for this web is blocked for security reasons. ' +
'The web is password-protected and not published', '403 Forbidden'
render :text => 'Atom feed with content for this web is blocked for security reasons. ' +
'The web is password-protected and not published', :status => 403
end
end
@ -268,7 +268,7 @@ class WikiController < ApplicationController
begin
@renderer = PageRenderer.new(@page.revisions.last)
@show_diff = (params[:mode] == 'diff')
render_action 'page'
render :action => 'page'
# TODO this rescue should differentiate between errors due to rendering and errors in
# the application itself (for application errors, it's better not to rescue the error at all)
rescue => e
@ -284,7 +284,7 @@ class WikiController < ApplicationController
if not @page_name.nil? and not @page_name.empty?
redirect_to :web => @web_name, :action => 'new', :id => @page_name
else
render_text 'Page name is not specified', '404 Not Found'
render :text => 'Page name is not specified', :status => 404
end
end
end