From: miker Date: Thu, 13 Nov 2008 22:07:51 +0000 (+0000) Subject: clearer logic, because I obviously got it wrong ... berick++ X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=899873ad41e5961250572958548ea547c46c98a5;p=Evergreen.git clearer logic, because I obviously got it wrong ... berick++ git-svn-id: svn://svn.open-ils.org/ILS/trunk@11175 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/c-apps/oils_cstore.c b/Open-ILS/src/c-apps/oils_cstore.c index d4c194c195..a10563f2d1 100644 --- a/Open-ILS/src/c-apps/oils_cstore.c +++ b/Open-ILS/src/c-apps/oils_cstore.c @@ -1953,9 +1953,10 @@ static char* SELECT ( if (is_agg->size || (flags & SELECT_DISTINCT)) { - if ( - !jsonBoolIsTrue( jsonObjectGetKey( selfield, "aggregate" ) ) || - !(((int)jsonObjectGetNumber(jsonObjectGetKey( selfield, "aggregate" ))) == 1) // support 1/0 for perl's sake + if ( !( + jsonBoolIsTrue( jsonObjectGetKey( selfield, "aggregate" ) ) || + ((int)jsonObjectGetNumber(jsonObjectGetKey( selfield, "aggregate" ))) == 1 // support 1/0 for perl's sake + ) ) { if (gfirst) { gfirst = 0; @@ -2324,9 +2325,10 @@ static char* buildSELECT ( jsonObject* search_hash, jsonObject* order_hash, osrf if (locale) { char* i18n = osrfHashGet(field, "i18n"); - if ( - !jsonBoolIsTrue( jsonObjectGetKey( order_hash, "no_i18n" ) ) || - !(((int)jsonObjectGetNumber(jsonObjectGetKey( order_hash, "no_i18n" ))) == 1) // support 1/0 for perl's sake + if ( !( + jsonBoolIsTrue( jsonObjectGetKey( order_hash, "no_i18n" ) ) || + ((int)jsonObjectGetNumber(jsonObjectGetKey( order_hash, "no_i18n" ))) == 1 // support 1/0 for perl's sake + ) ) i18n = NULL; if ( i18n && !strncasecmp("true", i18n, 4)) {