[open-ils-commits] r11159 - trunk/Open-ILS/src/c-apps

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Nov 13 10:10:26 EST 2008


Author: miker
Date: 2008-11-13 10:10:25 -0500 (Thu, 13 Nov 2008)
New Revision: 11159

Modified:
   trunk/Open-ILS/src/c-apps/oils_cstore.c
Log:
make aggregate and no_i18n flags perl friendly

Modified: trunk/Open-ILS/src/c-apps/oils_cstore.c
===================================================================
--- trunk/Open-ILS/src/c-apps/oils_cstore.c	2008-11-13 14:26:23 UTC (rev 11158)
+++ trunk/Open-ILS/src/c-apps/oils_cstore.c	2008-11-13 15:10:25 UTC (rev 11159)
@@ -1953,7 +1953,10 @@
 
 			    if (is_agg->size || (flags & SELECT_DISTINCT)) {
 
-				    if (!jsonBoolIsTrue( jsonObjectGetKey( selfield, "aggregate" ) )) {
+				    if (
+                        !jsonBoolIsTrue( jsonObjectGetKey( selfield, "aggregate" ) ) ||
+	                    ((int)jsonObjectGetNumber(jsonObjectGetKey( selfield, "aggregate" ))) == 1 // support 1/0 for perl's sake
+                    ) {
 					    if (gfirst) {
 						    gfirst = 0;
 					    } else {
@@ -2321,8 +2324,10 @@
 
             if (locale) {
         		char* i18n = osrfHashGet(field, "i18n");
-	            if (jsonBoolIsTrue(jsonObjectGetKey( order_hash, "no_i18n" )))
-                    i18n = NULL;
+			    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)) {
         	        char* pkey = osrfHashGet(idlClass, "primarykey");



More information about the open-ils-commits mailing list