mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ACE-1153: Alfresco Explorer: It is impossible to change start location for the users.
- Remove read-only transactions from UserPreferencesBean git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@66110 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -26,7 +26,6 @@ import java.util.ResourceBundle;
|
||||
|
||||
import javax.faces.context.FacesContext;
|
||||
import javax.faces.model.SelectItem;
|
||||
import javax.transaction.UserTransaction;
|
||||
|
||||
import org.alfresco.service.cmr.ml.ContentFilterLanguagesService;
|
||||
import org.alfresco.service.cmr.ml.MultilingualContentService;
|
||||
@@ -114,22 +113,7 @@ public class UserPreferencesBean implements Serializable
|
||||
{
|
||||
if (this.contentFilterLanguage == null)
|
||||
{
|
||||
Locale locale = null;
|
||||
UserTransaction tx = null;
|
||||
try
|
||||
{
|
||||
FacesContext context = FacesContext.getCurrentInstance();
|
||||
tx = Repository.getUserTransaction(context, true);
|
||||
tx.begin();
|
||||
|
||||
locale = (Locale) PreferencesService.getPreferences().getValue(PREF_CONTENTFILTERLANGUAGE);
|
||||
|
||||
tx.commit();
|
||||
}
|
||||
catch (Throwable err)
|
||||
{
|
||||
try { if (tx != null) {tx.rollback();} } catch (Exception tex) {}
|
||||
}
|
||||
Locale locale = (Locale) PreferencesService.getPreferences().getValue(PREF_CONTENTFILTERLANGUAGE);
|
||||
|
||||
// Null means All Languages
|
||||
if (locale == null)
|
||||
@@ -277,22 +261,8 @@ public class UserPreferencesBean implements Serializable
|
||||
*/
|
||||
public String getStartLocation()
|
||||
{
|
||||
String location = null;
|
||||
UserTransaction tx = null;
|
||||
try
|
||||
{
|
||||
FacesContext context = FacesContext.getCurrentInstance();
|
||||
tx = Repository.getUserTransaction(context, true);
|
||||
tx.begin();
|
||||
String location = (String)PreferencesService.getPreferences().getValue(PREF_STARTLOCATION);
|
||||
|
||||
location = (String)PreferencesService.getPreferences().getValue(PREF_STARTLOCATION);
|
||||
|
||||
tx.commit();
|
||||
}
|
||||
catch (Throwable err)
|
||||
{
|
||||
try { if (tx != null) {tx.rollback();} } catch (Exception tex) {}
|
||||
}
|
||||
if (location == null)
|
||||
{
|
||||
// default to value from client config
|
||||
|
Reference in New Issue
Block a user