safer version of previous update
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 13 Nov 2008 20:21:21 +0000 (20:21 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 13 Nov 2008 20:21:21 +0000 (20:21 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@11172 dcc99617-32d9-48b4-a31d-7c20da2025e4

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

index f7f05d5..d4c194c 100644 (file)
@@ -1955,7 +1955,7 @@ static char* SELECT (
 
                                    if (
                         !jsonBoolIsTrue( jsonObjectGetKey( selfield, "aggregate" ) ) ||
-                           ((int)jsonObjectGetNumber(jsonObjectGetKey( selfield, "aggregate" ))) == 0 // support 1/0 for perl's sake
+                           !(((int)jsonObjectGetNumber(jsonObjectGetKey( selfield, "aggregate" ))) == 1) // support 1/0 for perl's sake
                     ) {
                                            if (gfirst) {
                                                    gfirst = 0;
@@ -2326,7 +2326,7 @@ static char* buildSELECT ( jsonObject* search_hash, jsonObject* order_hash, osrf
                        char* i18n = osrfHashGet(field, "i18n");
                            if (
                     !jsonBoolIsTrue( jsonObjectGetKey( order_hash, "no_i18n" ) ) ||
-                    ((int)jsonObjectGetNumber(jsonObjectGetKey( order_hash, "no_i18n" ))) == 0 // support 1/0 for perl's sake
+                    !(((int)jsonObjectGetNumber(jsonObjectGetKey( order_hash, "no_i18n" ))) == 1) // support 1/0 for perl's sake
                 ) i18n = NULL;
 
                        if ( i18n && !strncasecmp("true", i18n, 4)) {