aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vendor/plugins/will_paginate/lib/will_paginate/view_helpers.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/vendor/plugins/will_paginate/lib/will_paginate/view_helpers.rb b/vendor/plugins/will_paginate/lib/will_paginate/view_helpers.rb
index b3702fc09..a1ce1c453 100644
--- a/vendor/plugins/will_paginate/lib/will_paginate/view_helpers.rb
+++ b/vendor/plugins/will_paginate/lib/will_paginate/view_helpers.rb
@@ -115,7 +115,12 @@ module WillPaginate
@template.content_tag :span, text, :class => span_class
else
# page links should preserve GET/POST parameters
- @template.link_to text, @template.params.merge(param => page != 1 ? page : nil)
+ if @template.params[:controller].match(/^admin_/)
+ # XXX hack for admin pages, for mySociety HTTP proxy, use relative URL
+ @template.link_to text, "?page=" + page.to_s
+ else
+ @template.link_to text, @template.params.merge(param => page != 1 ? page : nil)
+ end
end
end