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

svn at svn.open-ils.org svn at svn.open-ils.org
Mon Dec 15 00:55:47 EST 2008


Author: miker
Date: 2008-12-15 00:55:44 -0500 (Mon, 15 Dec 2008)
New Revision: 11561

Modified:
   trunk/Open-ILS/src/c-apps/oils_cstore.c
Log:
proper param format

Modified: trunk/Open-ILS/src/c-apps/oils_cstore.c
===================================================================
--- trunk/Open-ILS/src/c-apps/oils_cstore.c	2008-12-15 05:50:20 UTC (rev 11560)
+++ trunk/Open-ILS/src/c-apps/oils_cstore.c	2008-12-15 05:55:44 UTC (rev 11561)
@@ -855,7 +855,7 @@
 	    osrfLogDebug( OSRF_LOG_MARK, "global-level permissions required, fetching top of the org tree" );
 
         // check for perm at top of org tree
-        jsonObject* _tmp_params = jsonParseString("{\"parent_ou\":null}");
+        jsonObject* _tmp_params = jsonParseString("[{\"parent_ou\":null}]");
 		jsonObject* _list = doFieldmapperSearch(ctx, oilsIDLFindPath("/aou"), _tmp_params, &err);
 
         jsonObject* _tree_top = jsonObjectGetIndex(_list, 0);
@@ -903,7 +903,7 @@
             pkey_value = jsonObjectToSimpleString( param );
 	        osrfLogDebug( OSRF_LOG_MARK, "Object not supplied, using primary key value of %s and retrieving from the database", pkey_value );
 
-            jsonObject* _tmp_params = jsonParseStringFmt("{\"%s\":\"%s\"}", pkey, pkey_value);
+            jsonObject* _tmp_params = jsonParseStringFmt("[{\"%s\":\"%s\"}]", pkey, pkey_value);
     		jsonObject* _list = doFieldmapperSearch(
                 ctx,
                 class,
@@ -969,7 +969,7 @@
 	                osrfLogDebug( OSRF_LOG_MARK, "%d foreign context fields(s) specified for class", ((osrfStringArray*)osrfHashGet(fcontext,"context"))->size, class_name);
     
                     jsonObject* _tmp_params = jsonParseStringFmt(
-                        "{\"%s\":\"%s\"}",
+                        "[{\"%s\":\"%s\"}]",
                         osrfHashGet(fcontext, "field"),
                         oilsFMGetString(param, osrfHashGet(fcontext, "fkey"))
                     );



More information about the open-ils-commits mailing list