Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop -> Master merge, Release v5.33.1 #161

Merged
merged 2 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading