Korrekturen
git-svn-id: https://svn.libreccm.org/ccm/trunk@962 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
a62873c8e9
commit
bb33575aef
|
|
@ -386,7 +386,10 @@ public class Category extends ACSObject {
|
|||
localizationExists(locale)) {
|
||||
|
||||
// Return value of isEnabled from localized version, so categories could be disabled depending on locale
|
||||
return m_categoryLocalizationCollection.getName();
|
||||
String name = m_categoryLocalizationCollection.getName();
|
||||
m_categoryLocalizationCollection.rewind();
|
||||
return name;
|
||||
//return m_categoryLocalizationCollection.getName();
|
||||
|
||||
} else {
|
||||
|
||||
|
|
@ -563,7 +566,10 @@ public class Category extends ACSObject {
|
|||
localizationExists(locale)) {
|
||||
|
||||
// Return value of isEnabled from localized version, so categories could be disabled depending on locale
|
||||
return m_categoryLocalizationCollection.getDescription();
|
||||
String description = m_categoryLocalizationCollection.getDescription();
|
||||
m_categoryLocalizationCollection.rewind();
|
||||
return description;
|
||||
//return m_categoryLocalizationCollection.getDescription();
|
||||
|
||||
} else {
|
||||
|
||||
|
|
@ -633,7 +639,10 @@ public class Category extends ACSObject {
|
|||
localizationExists(locale)) {
|
||||
|
||||
// Return value of isEnabled from localized version, so categories could be disabled depending on locale
|
||||
return m_categoryLocalizationCollection.getURL();
|
||||
String url = m_categoryLocalizationCollection.getURL();
|
||||
//return m_categoryLocalizationCollection.getURL();
|
||||
m_categoryLocalizationCollection.rewind();
|
||||
return url;
|
||||
|
||||
} else {
|
||||
|
||||
|
|
@ -704,7 +713,10 @@ public class Category extends ACSObject {
|
|||
localizationExists(locale)) {
|
||||
|
||||
// Return value of isEnabled from localized version, so categories could be disabled depending on locale
|
||||
return m_categoryLocalizationCollection.isEnabled();
|
||||
boolean isEnabled = m_categoryLocalizationCollection.isEnabled();
|
||||
m_categoryLocalizationCollection.rewind();
|
||||
return isEnabled;
|
||||
//return m_categoryLocalizationCollection.isEnabled();
|
||||
|
||||
} else {
|
||||
|
||||
|
|
|
|||
|
|
@ -33,6 +33,8 @@ import com.arsdigita.persistence.DataCollection;
|
|||
**/
|
||||
public class CategoryLocalizationCollection extends ACSObjectCollection {
|
||||
|
||||
private String lastFoundLocale;
|
||||
|
||||
public CategoryLocalizationCollection(Category category) {
|
||||
super(category.getLocalizations().getDataCollection());
|
||||
}
|
||||
|
|
@ -111,10 +113,11 @@ public class CategoryLocalizationCollection extends ACSObjectCollection {
|
|||
/**
|
||||
* Search for the requested localization in the Collection
|
||||
*
|
||||
* @param locale
|
||||
* @return result of the search. If true, the CollectionCursor is set to the position of the requested locale.
|
||||
*/
|
||||
public boolean localizationExists(String locale) {
|
||||
|
||||
|
||||
// Really string comparison using != ??
|
||||
// && !locale.isEmpty() ?
|
||||
if (!m_dataCollection.isEmpty() && locale != "") {
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ public class SciMemberSciDepartmentsCollection extends DomainCollection {
|
|||
public SciMemberSciDepartmentsCollection(DataCollection dataCollection) {
|
||||
super(dataCollection);
|
||||
|
||||
m_dataCollection.addFilter(String.format("type = %s",
|
||||
m_dataCollection.addFilter(String.format("type = '%s'",
|
||||
ContentType.
|
||||
findByAssociatedObjectType(SciDepartment.class.getName()).getID().
|
||||
toString()));
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ public class SciMemberSciOrganizationsCollection extends DomainCollection {
|
|||
public SciMemberSciOrganizationsCollection(DataCollection dataCollection) {
|
||||
super(dataCollection);
|
||||
|
||||
m_dataCollection.addFilter(String.format("type = %s",
|
||||
m_dataCollection.addFilter(String.format("type = '%s'",
|
||||
ContentType.
|
||||
findByAssociatedObjectType(SciOrganization.class.getName()).
|
||||
getID().toString()));
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ public class SciMemberSciProjectsCollection extends DomainCollection {
|
|||
public SciMemberSciProjectsCollection(DataCollection dataCollection) {
|
||||
super(dataCollection);
|
||||
|
||||
m_dataCollection.addFilter(String.format("type = %s",
|
||||
m_dataCollection.addFilter(String.format("type = '%s'",
|
||||
ContentType.
|
||||
findByAssociatedObjectType(SciProject.class.getName()).getID().
|
||||
toString()));
|
||||
|
|
|
|||
|
|
@ -194,7 +194,7 @@ public class SciOrganizationPanel extends SciOrganizationBasePanel {
|
|||
|
||||
GenericOrganizationalUnitPersonCollection heads;
|
||||
heads = department.getPersons();
|
||||
heads.addFilter("link.role_name = 'head'");
|
||||
heads.addFilter("link.role_name = 'head' and link.status = 'active'");
|
||||
heads.addOrder("surname asc, givenname asc");
|
||||
|
||||
if (heads.size() > 0) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue