[open-ils-commits] r11750 - trunk/Open-ILS/src/c-apps
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Jan 5 21:54:34 EST 2009
Author: miker
Date: 2009-01-05 21:54:33 -0500 (Mon, 05 Jan 2009)
New Revision: 11750
Modified:
trunk/Open-ILS/src/c-apps/oils_cstore.c
Log:
force no_i18n mode for id_list queries; simplify "select" list builing for id_list mode; remove left over frees
Modified: trunk/Open-ILS/src/c-apps/oils_cstore.c
===================================================================
--- trunk/Open-ILS/src/c-apps/oils_cstore.c 2009-01-06 02:20:31 UTC (rev 11749)
+++ trunk/Open-ILS/src/c-apps/oils_cstore.c 2009-01-06 02:54:33 UTC (rev 11750)
@@ -748,19 +748,25 @@
#endif
if (jsonObjectGetIndex( _p, 1 )) {
+ jsonObjectRemoveKey( jsonObjectGetIndex( _p, 1 ), "select" );
+ jsonObjectRemoveKey( jsonObjectGetIndex( _p, 1 ), "no_i18n" );
jsonObjectRemoveKey( jsonObjectGetIndex( _p, 1 ), "flesh" );
jsonObjectRemoveKey( jsonObjectGetIndex( _p, 1 ), "flesh_columns" );
} else {
jsonObjectSetIndex( _p, 1, jsonNewObjectType(JSON_HASH) );
}
- growing_buffer* sel_list = buffer_init(64);
- buffer_fadd(sel_list, "{ \"%s\":[\"%s\"] }", osrfHashGet( class_obj, "classname" ), osrfHashGet( class_obj, "primarykey" ));
- char* _s = buffer_release(sel_list);
+ jsonObjectSetKey( jsonObjectGetIndex( _p, 1 ), "no_i18n", jsonParseString("true") );
- jsonObjectSetKey( jsonObjectGetIndex( _p, 1 ), "select", jsonParseString(_s) );
- osrfLogDebug(OSRF_LOG_MARK, "%s: Select qualifer set to [%s]", MODULENAME, _s);
- free(_s);
+ jsonObjectSetKey(
+ jsonObjectGetIndex( _p, 1 ),
+ "select",
+ jsonParseStringFmt(
+ "{ \"%s\":[\"%s\"] }",
+ osrfHashGet( class_obj, "classname" ),
+ osrfHashGet( class_obj, "primarykey" )
+ )
+ );
obj = doFieldmapperSearch(ctx, class_obj, _p, &err);
@@ -972,8 +978,6 @@
if (!param) {
osrfLogDebug( OSRF_LOG_MARK, "Object not found in the database with primary key %s of %s", pkey, pkey_value );
- jsonObjectFree(_tmp_params);
- jsonObjectFree(_list);
growing_buffer* msg = buffer_init(128);
buffer_fadd(
More information about the open-ils-commits
mailing list