clearer logic, because I obviously got it wrong ... berick++
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 13 Nov 2008 22:07:51 +0000 (22:07 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 13 Nov 2008 22:07:51 +0000 (22:07 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@11175 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/c-apps/oils_cstore.c

index d4c194c..a10563f 100644 (file)
@@ -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)) {