Merge branch 'master' into indev
This commit is contained in:
commit
acdff2d3a2
2 changed files with 14 additions and 5 deletions
3
Makefile
3
Makefile
|
|
@ -7,8 +7,9 @@ GIT_HASH := $(shell git rev-parse --short HEAD)
|
||||||
GIT_DATE := $(shell git log -1 --format='%ad' --date='format:%y.%m.%d')
|
GIT_DATE := $(shell git log -1 --format='%ad' --date='format:%y.%m.%d')
|
||||||
GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
|
GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
|
||||||
GIT_REMOTE := $(shell git remote get-url origin)
|
GIT_REMOTE := $(shell git remote get-url origin)
|
||||||
|
GIT_TAG := $(shell git describe --tags --exact-match HEAD 2>/dev/null)
|
||||||
|
|
||||||
VERSION := $(GIT_DATE)+$(GIT_HASH)_$(GIT_BRANCH)
|
VERSION := $(if $(GIT_TAG),$(GIT_TAG),$(GIT_DATE)+$(GIT_HASH)_$(GIT_BRANCH))
|
||||||
|
|
||||||
CFLAGS := -Wall -Wextra -O2 -Isrc -DVERSION='"$(VERSION)"' -DGIT_REMOTE='"$(GIT_REMOTE)"'
|
CFLAGS := -Wall -Wextra -O2 -Isrc -DVERSION='"$(VERSION)"' -DGIT_REMOTE='"$(GIT_REMOTE)"'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -486,8 +486,8 @@ int results_handler(UrlParams *params) {
|
||||||
|
|
||||||
const SearchEngine *selected_engine = find_enabled_engine(selected_engine_id);
|
const SearchEngine *selected_engine = find_enabled_engine(selected_engine_id);
|
||||||
if (selected_engine &&
|
if (selected_engine &&
|
||||||
!engine_allowed_for_user(selected_engine, user_engines,
|
!engine_allowed_for_user(selected_engine, user_engines, user_engine_count,
|
||||||
user_engine_count, has_user_pref)) {
|
has_user_pref)) {
|
||||||
selected_engine = NULL;
|
selected_engine = NULL;
|
||||||
}
|
}
|
||||||
if (selected_engine) {
|
if (selected_engine) {
|
||||||
|
|
@ -717,9 +717,17 @@ int results_handler(UrlParams *params) {
|
||||||
if (!warning_message)
|
if (!warning_message)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (jobs[i].http_status >= 400) {
|
||||||
|
char warning_with_status[BUFFER_SIZE_LARGE];
|
||||||
|
snprintf(warning_with_status, sizeof(warning_with_status),
|
||||||
|
"%s (HTTP %ld)", warning_message, jobs[i].http_status);
|
||||||
|
add_warning_to_collection(jobs[i].engine->name, warning_with_status,
|
||||||
|
&warning_matrix);
|
||||||
|
} else {
|
||||||
add_warning_to_collection(jobs[i].engine->name, warning_message,
|
add_warning_to_collection(jobs[i].engine->name, warning_message,
|
||||||
&warning_matrix);
|
&warning_matrix);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (warning_matrix.count > 0) {
|
if (warning_matrix.count > 0) {
|
||||||
context_set_array_of_arrays(&ctx, "engine_warnings", warning_matrix.rows,
|
context_set_array_of_arrays(&ctx, "engine_warnings", warning_matrix.rows,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue