|
@@ -66,6 +66,7 @@ from searx.search import SearchWithPlugins, get_search_query_from_webapp
|
66
|
66
|
from searx.query import RawTextQuery
|
67
|
67
|
from searx.autocomplete import searx_bang, backends as autocomplete_backends
|
68
|
68
|
from searx.plugins import plugins
|
|
69
|
+from searx.plugins.oa_doi_rewrite import get_doi_resolver
|
69
|
70
|
from searx.preferences import Preferences, ValidationException
|
70
|
71
|
from searx.answerers import answerers
|
71
|
72
|
from searx.url_utils import urlencode, urlparse, urljoin
|
|
@@ -164,14 +165,6 @@ def get_locale():
|
164
|
165
|
return locale
|
165
|
166
|
|
166
|
167
|
|
167
|
|
-def get_doi_resolver():
|
168
|
|
- doi_resolvers = settings['doi_resolvers']
|
169
|
|
- doi_resolver = request.args.get('doi_resolver', request.preferences.get_value('doi_resolver'))[0]
|
170
|
|
- if doi_resolver not in doi_resolvers:
|
171
|
|
- doi_resolvers = settings['default_doi_resolver']
|
172
|
|
- return doi_resolver
|
173
|
|
-
|
174
|
|
-
|
175
|
168
|
# code-highlighter
|
176
|
169
|
@app.template_filter('code_highlighter')
|
177
|
170
|
def code_highlighter(codelines, language=None):
|
|
@@ -704,7 +697,7 @@ def preferences():
|
704
|
697
|
themes=themes,
|
705
|
698
|
plugins=plugins,
|
706
|
699
|
doi_resolvers=settings['doi_resolvers'],
|
707
|
|
- current_doi_resolver=get_doi_resolver(),
|
|
700
|
+ current_doi_resolver=get_doi_resolver(request.args, request.preferences.get_value('doi_resolver')),
|
708
|
701
|
allowed_plugins=allowed_plugins,
|
709
|
702
|
theme=get_current_theme_name(),
|
710
|
703
|
preferences_url_params=request.preferences.get_as_url_params(),
|