Skip to content

Commit

Permalink
return after a redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
coolo committed Dec 21, 2012
1 parent df6d1dd commit 820f9c0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/controllers/main_controller.rb
Expand Up @@ -103,14 +103,17 @@ def redirectit(release)
notice = _("Konqueror of KDE 3 is unfortunately unmaintained and its javascript implementation contains bugs that " +
"make it impossible to use with this page. Please make sure you have javascript disabled before you " +
"<a href='%s'>continue</a>.") % url_for( :action => 'release', :release => release, :locale => FastGettext.locale )
render :template => "main/redirect_with_notice", :locals => { :notice => notice } and return
notice = notice.html_safe
render :template => "main/redirect_with_notice", :locals => { :notice => notice }
return
end
redirect_to :action => 'release', :release => release, :locale => FastGettext.locale
end


def developer
redirectit("developer") and return
redirectit("developer")
return

This comment has been minimized.

Copy link
@digitaltom

digitaltom Dec 21, 2012

Member

Does this really make a difference?

This comment has been minimized.

Copy link
@coolo

coolo Dec 21, 2012

Author Member

Yes. I could reproduce the bug in faking my user agent and couldn't after. the "and" stops when redirectit returns with false (line 108).

This comment has been minimized.

Copy link
@digitaltom

digitaltom Dec 21, 2012

Member

ah sure ok

flash.now[:warn] = _("We currently don't have a Factory Snapshot that is more recent than our last openSUSE release. <br/>" +
"Please check <a href='http://en.opensuse.org/Portal:Factory'>http://en.opensuse.org/Portal:Factory</a> for more information.")
@exclude_debug = true
Expand Down

0 comments on commit 820f9c0

Please sign in to comment.