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

svn at svn.open-ils.org svn at svn.open-ils.org
Sun Dec 14 16:41:26 EST 2008


Author: miker
Date: 2008-12-14 16:41:22 -0500 (Sun, 14 Dec 2008)
New Revision: 11546

Modified:
   trunk/Open-ILS/src/c-apps/oils_idl-core.c
Log:
always attach the permission list, even if it is empty; attach the constructed foreign_context structure

Modified: trunk/Open-ILS/src/c-apps/oils_idl-core.c
===================================================================
--- trunk/Open-ILS/src/c-apps/oils_idl-core.c	2008-12-14 21:30:44 UTC (rev 11545)
+++ trunk/Open-ILS/src/c-apps/oils_idl-core.c	2008-12-14 21:41:22 UTC (rev 11546)
@@ -335,8 +335,8 @@
 									}
 								}
 								free(map_list);
-								osrfHashSet( _tmp, map, "permission");
 							}
+							osrfHashSet( _tmp, map, "permission");
 
 					    	osrfHashSet( _tmp, (char*)xmlGetProp(_l, BAD_CAST "global_required"), "global_required");
 
@@ -359,6 +359,9 @@
 							}
 							osrfHashSet( _tmp, map, "local_context");
 
+							osrfHash* foreign_context = osrfNewHash();
+							osrfHashSet( _tmp, foreign_context, "foreign_context");
+
 							xmlNodePtr _f = _l->children;
 
 							while(_f) {
@@ -371,11 +374,11 @@
 								if( (string_tmp = (char*)xmlGetProp(_f, BAD_CAST "link")) ) {
 									osrfLogDebug(OSRF_LOG_MARK, "Permacrud context link definition is %s", string_tmp );
 
-									osrfHash* _tmp_fcontext = osrfNewHash();
 									osrfHash* _flink = oilsIDLFindPath("/%s/links/%s", osrfHashGet(usrData, "classname"), string_tmp);
 
-									osrfHashSet( _tmp_fcontext, osrfNewHash(), osrfHashGet(_flink, "class") );
-									_tmp_fcontext = osrfHashGet( _tmp_fcontext, osrfHashGet(_flink, "class") );
+									osrfHashSet( foreign_context, osrfNewHash(), osrfHashGet(_flink, "class") );
+									osrfHash* _tmp_fcontext = osrfHashGet( foreign_context, osrfHashGet(_flink, "class") );
+
 									osrfHashSet( _tmp_fcontext, osrfHashGet(_flink, "field"), "fkey" );
 									osrfHashSet( _tmp_fcontext, osrfHashGet(_flink, "key"), "field" );
 



More information about the open-ils-commits mailing list