瀏覽代碼

Fixed other_user_id bug in group_owner_* operations as well

Yentl Van Tendeloo 8 年之前
父節點
當前提交
d433142958
共有 1 個文件被更改,包括 6 次插入6 次删除
  1. 6 6
      core/core_algorithm.alc

+ 6 - 6
core/core_algorithm.alc

@@ -1010,14 +1010,14 @@ Void function user_function_skip_init(user_id : String):
 					if (other_user_id != ""):
 						Element overlap
 
-						overlap = set_overlap(allIncomingAssociationInstances(core, user_id, "owner"), allOutgoingAssociationInstances(core, group_id, "owner"))
+						overlap = set_overlap(allIncomingAssociationInstances(core, other_user_id, "owner"), allOutgoingAssociationInstances(core, group_id, "owner"))
 						if (read_nr_out(overlap) == 0):
-							instantiate_link(core, "owner", "", group_id, user_id)
+							instantiate_link(core, "owner", "", group_id, other_user_id)
 
-							overlap = set_overlap(allOutgoingAssociationInstances(core, user_id, "belongsTo"), allIncomingAssociationInstances(core, group_id, "belongsTo"))
+							overlap = set_overlap(allOutgoingAssociationInstances(core, other_user_id, "belongsTo"), allIncomingAssociationInstances(core, group_id, "belongsTo"))
 
 							if (read_nr_out(overlap) == 0):
-								instantiate_link(core, "belongsTo", "", user_id, group_id)
+								instantiate_link(core, "belongsTo", "", other_user_id, group_id)
 
 							output("New owner added to group!")
 						else:
@@ -1043,9 +1043,9 @@ Void function user_function_skip_init(user_id : String):
 					if (other_user_id != ""):
 						Element overlap
 
-						overlap = set_overlap(allOutgoingAssociationInstances(core, user_id, "belongsTo"), allIncomingAssociationInstances(core, group_id, "belongsTo"))
+						overlap = set_overlap(allOutgoingAssociationInstances(core, other_user_id, "belongsTo"), allIncomingAssociationInstances(core, group_id, "belongsTo"))
 						if (read_nr_out(overlap) > 0):
-							overlap = set_overlap(allIncomingAssociationInstances(core, user_id, "owner"), allOutgoingAssociationInstances(core, group_id, "owner"))
+							overlap = set_overlap(allIncomingAssociationInstances(core, other_user_id, "owner"), allOutgoingAssociationInstances(core, group_id, "owner"))
 							if (read_nr_out(overlap) > 0):
 								model_delete_element(core, set_pop(overlap))
 								output("Disowned group from user!")