X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fsettings.c;h=1f9246cbef7d40da11486d92e6f5a13908da6943;hb=9dd460a0fa32b387acc41eba0869fa50aed4ddfe;hp=759d4bc25e0c1e554ee50c4cfe9f208f4b531528;hpb=b13c46b73ad2b8e85340396cfcb0b46421db1d15;p=pazpar2-moved-to-github.git diff --git a/src/settings.c b/src/settings.c index 759d4bc..1f9246c 100644 --- a/src/settings.c +++ b/src/settings.c @@ -1,5 +1,5 @@ /* This file is part of Pazpar2. - Copyright (C) 2006-2011 Index Data + Copyright (C) 2006-2012 Index Data Pazpar2 is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free @@ -77,6 +77,7 @@ static char *hard_settings[] = { "pz:facetmap:", "pz:limitmap:", "pz:url", + "pz:sortmap:", 0 }; @@ -344,7 +345,7 @@ static void update_database_fun(void *context, struct database *db) int offset; // Is this the right database? - if (!match_zurl(db->url, set->target)) + if (!match_zurl(db->id, set->target)) return; offset = settings_create_offset(service, set->name); @@ -436,22 +437,10 @@ static void initialize_soft_settings(struct conf_service *service) static void prepare_target_dictionary(void *client_data, struct setting *set) { struct conf_service *service = (struct conf_service *) client_data; - struct setting_dictionary *dictionary = service->dictionary; - - int i; - char *p; // If target address is not wildcard, add the database if (*set->target && !zurl_wildcard(set->target)) create_database_for_service(set->target, service); - - // Determine if we already have a dictionary entry - if (!strncmp(set->name, "pz:", 3) && (p = strchr(set->name + 3, ':'))) - *(p + 1) = '\0'; - for (i = 0; i < dictionary->num; i++) - if (!strcmp(dictionary->dict[i], set->name)) - return; - yaz_log(YLOG_WARN, "Setting '%s' not configured as metadata", set->name); } void init_settings(struct conf_service *service)