Skip to content

Commit

Permalink
Remove unneeded function
Browse files Browse the repository at this point in the history
  • Loading branch information
hellcp committed Mar 25, 2022
1 parent bed4672 commit 1b8f62b
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
class ApplicationController < ActionController::Base
before_action :validate_configuration
before_action :set_language
before_action :set_external_urls

helper :all # include all helpers, all the time
require 'rexml/document'
Expand Down Expand Up @@ -155,25 +154,4 @@ def leap_appdata(version)
Appdata.new("leap/#{version}").data
end
end

# set wiki and forum urls, which are different for each language
def set_external_urls
@wiki_url = case @lang
when 'zh_CN'
'https://zh.opensuse.org/'
when 'zh_TW'
'https://zh-tw.opensuse.org/'
when 'pt_BR'
'https://pt.opensuse.org/'
else
"https://#{@lang}.opensuse.org/"
end

@forum_url = case @lang
when 'zh_CN'
'https://forum.suse.org.cn/'
else
'https://forums.opensuse.org/'
end
end
end

0 comments on commit 1b8f62b

Please sign in to comment.