From f559d8a06d0da5ca778c41a667986363f793ca5d Mon Sep 17 00:00:00 2001 From: Jacques Distler Date: Fri, 23 Oct 2009 10:05:02 -0500 Subject: [PATCH] Intra-Web Links in S5 Slideshows on Published Webs Never really thought through where those should go. They now point to the published version. --- lib/url_generator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/url_generator.rb b/lib/url_generator.rb index 196a06e7..9d64c88e 100644 --- a/lib/url_generator.rb +++ b/lib/url_generator.rb @@ -177,7 +177,7 @@ class UrlGenerator < AbstractUrlGenerator def wikilink_for(mode, name, text, web_address) web = Web.find_by_address(web_address) - action = web.published? && !(web == @web && mode != :publish) ? 'published' : 'show' + action = web.published? && !(web == @web && ![:publish, :s5].include?(mode) ) ? 'published' : 'show' href = @controller.url_for :controller => 'wiki', :web => web_address, :action => action, :id => name, :only_path => true %{#{text}}