-/* $Id: database.c,v 1.12 2007-04-11 13:05:50 quinn Exp $
+/* $Id: database.c,v 1.13 2007-04-11 16:48:09 quinn Exp $
Copyright (c) 2006-2007, Index Data.
This file is part of Pazpar2.
int database_match_criteria(struct setting **settings, struct database_criterion *cl)
{
- if (settings && settings[PZ_ALLOW] && *settings[PZ_ALLOW]->value == '0')
- return 0;
for (; cl; cl = cl->next)
if (!match_criterion(settings, cl))
break;
int i = 0;
for (p = se->databases; p; p = p->next)
+ {
+ if (p->settings && p->settings[PZ_ALLOW] && *p->settings[PZ_ALLOW]->value == '0')
+ continue;
if (database_match_criteria(p->settings, cl))
{
(*fun)(se, p);
i++;
}
+ }
return i;
}