Skip to content

Commit

Permalink
Merge pull request #161 from ncbo/develop
Browse files Browse the repository at this point in the history
Develop -> Master merge, Release v5.33.1
  • Loading branch information
alexskr authored Oct 22, 2024
2 parents f943ac3 + d4da86d commit 3c3ab5a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
4 changes: 4 additions & 0 deletions lib/goo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,10 @@ def self.sparql_backend_name(name=:main)
return @@sparql_backends[name][:backend_name]
end

def self.portal_language
@@main_languages.first.downcase.to_sym
end

def self.id_prefix
return @@id_prefix
end
Expand Down
8 changes: 0 additions & 8 deletions lib/goo/search/search.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,6 @@ def search(q, params={}, connection_name=:main)
def indexBatch(collection, connection_name=:main)
docs = Array.new
collection.each do |c|



# c.bring(:prefLabel)
# binding.pry if c.prefLabel == "biodiversity"



docs << c.indexable_object
end
Goo.search_connection(connection_name).add(docs)
Expand Down
6 changes: 1 addition & 5 deletions lib/goo/sparql/mixins/solution_lang_filter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -171,17 +171,13 @@ def show_all_languages?
end

def get_language(languages)
languages = portal_language if languages.nil? || languages.empty?
languages = Goo.portal_language if languages.nil? || languages.empty?
lang = languages
lang = languages.to_s.split(',') unless lang.is_a?(Array)
lang = lang.map { |l| l.upcase.to_sym }
lang.length == 1 ? lang.first : lang
end

def portal_language
Goo.main_languages.first
end

end
end
end
Expand Down

0 comments on commit 3c3ab5a

Please sign in to comment.