<%
  link_args = defined?(link_to_arguments) ? link_to_arguments : {}
  page_link_url = refinery.url_for(page_link.url)
  # current_link is relative so check against the relative url portion before conditionally making it absolute
  linked = params[:current_link].present? && page_link_url == params[:current_link]
  page_link_url = "#{[request.protocol, request.host_with_port].join}#{page_link_url}" if Refinery::Pages.absolute_page_links
-%>
<li class='clearfix<%= " child#{child}" if child %><%= " linked" if linked%>' id="<%= dom_id(page_link) -%>">
  <%= link_to page_link.title_with_meta.html_safe, page_link_url, {
                :title => t('.link_to_this_page'),
                :rel => page_link.title,
                :class => 'page_link'
              }.merge(link_args) %>
</li>
<%= render :partial => 'page_link',
           :collection => page_link.children,
           :locals => {
             :child => (child ||= 0) + 1,
             :link_to_arguments => link_args
           } -%>

<%
  link_args = defined?(link_to_arguments) ? link_to_arguments : {}
  page_link_url = refinery.url_for(page_link.url)
  # current_link is relative so check against the relative url portion before conditionally making it absolute
  linked = params[:current_link].present? && page_link_url == params[:current_link]
  page_link_url = "#{[request.protocol, request.host_with_port].join}#{page_link_url}" if Refinery::Pages.absolute_page_links
-%>
<li class='clearfix<%= " child#{child}" if child %><%= " linked" if linked%>' id="<%= dom_id(page_link) -%>">
  <%= link_to page_link.title_with_meta.html_safe, controller.asset_host.nil? ? refinery.url_for(page_link.url) : "#{request.protocol}#{request.host_with_port}#{refinery.url_for(page_link.url)}",
              { :title => t('.link_to_this_page'),
              :rel => page_link.title,
              :class => 'page_link' }.merge(link_args) %>
</li>
<%= render :partial => 'page_link',
           :collection => page_link.children,
           :locals => {
             :child => (child ||= 0) + 1,
             :link_to_arguments => link_args
           } -%>

Fix compute_public_path use for rails 3.1 and use request's host for page links
Fix compute_public_path use for rails 3.1 and use request's host for page links
