KocsisDaniel/liferay-portal — pull request #377 by vilmospapp (2014-03-18 13:47:24+00:00)
Title: LPS-29025 Structure and Template localization fix for export/import/staging

Hi Dani,

I've received this PR a long time ago from you, as you didn't have the time to finish it and some integration tests failed formerly. I managed to fix it so the integration test should run fine now (except some, because of a StaleObjectStateException caused in CompanyLocalServiceImpl but for testing it could be workaround by adding this modification:
```
-	User user = userLocalService.getDefaultUser(companyId);
+	long userId = userLocalService.getDefaultUserId(companyId);
+
+	User user = userPersistence.fetchByPrimaryKey(userId);
```

A related LPS will be opened by @laszlocsontos and he will commit the fix for that soon. Please review my changes and if you find it OK, please forward it.