</BUG>
}
}
long previousScopeGroupId = context.getScopeGroupId();
<BUG>Element portletsEl = root.addElement("portlets");
</BUG>
for (Map.Entry<String, Object[]> portletIdsEntry :
portletIds.entrySet()) {
String portletId = (String)portletIdsEntry.getValue()[0];
long plid = (Long)portletIdsEntry.getValue()[1];

if (PropsValues.PERMISSIONS_USER_CHECK_ALGORITHM < 5) {
Element rolesElement = rootElement.addElement("roles");
if (exportPermissions) {
_permissionExporter.exportLayoutRoles(
layoutCache, companyId, groupId, rolesElement);
}
}
long previousScopeGroupId = context.getScopeGroupId();
Element portletsElement = rootElement.addElement("portlets");
for (Map.Entry<String, Object[]> portletIdsEntry :
portletIds.entrySet()) {
String portletId = (String)portletIdsEntry.getValue()[0];
long plid = (Long)portletIdsEntry.getValue()[1];
