From 18eb90ea56f05981fdb97c18a25754928b6d5f23 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Tue, 18 Dec 2012 20:42:44 +0100 Subject: [PATCH] do not pretend to support more than we have in set_release --- app/controllers/main_controller.rb | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/app/controllers/main_controller.rb b/app/controllers/main_controller.rb index d3f95a66c..a6bbe44b7 100644 --- a/app/controllers/main_controller.rb +++ b/app/controllers/main_controller.rb @@ -87,8 +87,15 @@ def set_release(release) @repourl = "http://download.opensuse.org/distribution/12.3" @medium = "dvd" @gpg = "22C0 7BA5 3417 8CD0 2EFE 22AA B88B 2FD4 3DBD C284" + else + flash[:warn] = _("#{release} is not a supported release.") + @exclude_debug = true + @include_home = 'false' + redirect_to action: :index + return false end @release = release + return true end def redirectit(release) @@ -121,18 +128,18 @@ def release @exclude_debug = true @include_home = 'false' flash.now[:info] = _("Please note that this is not the latest openSUSE release. You can get the latest version here. ") if params[:outdated] - set_release(params[:release]) + set_release(params[:release]) || return render :template => "main/release" end def change_install - set_release(params[:release]) + set_release(params[:release]) || return @medium = params[:medium] render :template => "main/release" end def download_js - set_release(params[:release]) + set_release(params[:release]) || return render :template => "main/download", :content_type => 'text/javascript', :layout => false end @@ -141,7 +148,7 @@ def show_request end def download - set_release(params[:release]) + set_release(params[:release]) || return medium = params[:medium] if params[:arch] == "i686"