CRM-21738 fix transfer of view_only custom data.
View only custom data was not being transferred during the merge despite code in order to achieve that. The reason was the metadata was being used from the (hateful) getGroupTree function, but without passing $permissions = FALSE it was not returning viewOnly fields. Note that this metadata retrieval function is a bad place for filtering - they should be in separate functions.
Showing with 38 additions and 5 deletions