Skip to content

Commit

Permalink
Merge branch 'rails31-fixes' of github.com:paneidos/redmine into rail…
Browse files Browse the repository at this point in the history
…s31-fixes
  • Loading branch information
paneidos committed Mar 19, 2012
2 parents 2e4fc77 + 77b2e18 commit 33f3503
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 9 deletions.
5 changes: 3 additions & 2 deletions app/controllers/application_controller.rb
Expand Up @@ -127,10 +127,11 @@ def set_localization
def require_login
if !User.current.logged?
# Extract only the basic url parameters on non-GET requests
protocol = request.ssl? ? "https://" : nil
if request.get?
url = url_for(params)
url = url_for(params.merge(:protocol => protocol))
else
url = url_for(:controller => params[:controller], :action => params[:action], :id => params[:id], :project_id => params[:project_id])
url = url_for(:controller => params[:controller], :action => params[:action], :id => params[:id], :project_id => params[:project_id], :protocol => protocol)
end
respond_to do |format|
format.html { redirect_to :controller => "account", :action => "login", :back_url => url }
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/journals_helper.rb
Expand Up @@ -28,7 +28,7 @@ def render_notes(issue, journal, options={})
{ :controller => 'journals', :action => 'edit', :id => journal },
:title => l(:button_edit)) if editable
end
content << content_tag('div', links.join(' '), :class => 'contextual') unless links.empty?
content << content_tag('div', links.join(' ').html_safe, :class => 'contextual') unless links.empty?
content << textilizable(journal, :notes)
css_classes = "wiki"
css_classes << " editable" if editable
Expand Down
6 changes: 3 additions & 3 deletions app/helpers/watchers_helper.rb
Expand Up @@ -51,14 +51,14 @@ def watchers_list(object)
:object_type => object.class.to_s.underscore,
:object_id => object.id,
:user_id => user}
s += ' ' + link_to_remote(image_tag('delete.png'),
s << ' ' << link_to_remote(image_tag('delete.png'),
{:url => url},
:href => url_for(url),
:style => "vertical-align: middle",
:class => "delete")
end
"<li>#{ s }</li>"
content_tag :li, s
end
lis.empty? ? "" : "<ul>#{ lis.join("\n") }</ul>".html_safe
(lis.empty? ? "" : "<ul>#{ lis.join("\n") }</ul>").html_safe
end
end
2 changes: 1 addition & 1 deletion app/views/versions/_issue_counts.html.erb
Expand Up @@ -6,7 +6,7 @@
status_by_options_for_select(criteria),
:id => 'status_by_select',
:onchange => remote_function(:url => status_by_version_path(version),
:with => "Form.serialize('status_by_form')"))) %>
:with => "Form.serialize('status_by_form')"))).html_safe %>
</legend>
<% if counts.empty? %>
<p><em><%= l(:label_no_data) %></em></p>
Expand Down
2 changes: 1 addition & 1 deletion vendor/plugins/gravatar/lib/gravatar.rb
Expand Up @@ -52,7 +52,7 @@ def gravatar(email, options={})
src = h(gravatar_url(email, options))
options = DEFAULT_OPTIONS.merge(options)
[:class, :alt, :size, :title].each { |opt| options[opt] = h(options[opt]) }
"<img class=\"#{options[:class]}\" alt=\"#{options[:alt]}\" title=\"#{options[:title]}\" width=\"#{options[:size]}\" height=\"#{options[:size]}\" src=\"#{src}\" />"
image_tag src, options
end

# Returns the base Gravatar URL for the given email hash. If ssl evaluates to true,
Expand Down
Expand Up @@ -175,7 +175,7 @@ def submit_to_remote(name, value, options = {})
# { :update => "posts", :url => { :action => "destroy", :id => post.id } },
# :href => url_for(:action => "destroy", :id => post.id)
def link_to_remote(name, options = {}, html_options = nil)
link_to_function(name, remote_function(options), html_options || options.delete(:html))
link_to_function(name, remote_function(options), html_options || options.delete(:html)).html_safe
end

# Returns a form tag that will submit using XMLHttpRequest in the
Expand Down

0 comments on commit 33f3503

Please sign in to comment.