Changeset 32661


Ignore:
Timestamp:
2018-12-06T12:36:07+13:00 (5 years ago)
Author:
kjdon
Message:

when getting the list of collections from a group, use node.getElementsByTagName instead of GSXML.getChildrenByTagName, so that we get all collection in the subgroup as well

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/CollectionGroups.java

    r32648 r32661  
    207207        for (int i = 0; i < groups.length; i++) {
    208208            if (!groups[i].isEmpty()) {
    209                 Element groupContent = getRawCurrentContent(groups[i]);
     209                    Element groupContent = getRawCurrentContent(groups[i]);
    210210                // If group exists
    211211                if (groupContent != null) {
    212                     NodeList collectionNodes = GSXML.getChildrenByTagName(groupContent, GSXML.COLLECTION_ELEM);
     212                        NodeList collectionNodes = groupContent.getElementsByTagName(GSXML.COLLECTION_ELEM);
    213213                    for (int j = 0; j < collectionNodes.getLength(); j++) {
    214214                        String collName = ((Element) collectionNodes.item(j)).getAttribute(GSXML.NAME_ATT);
     
    230230
    231231    }
    232    
     232
    233233    protected Element processCollectionsHierarchy(Element request){
    234234       
Note: See TracChangeset for help on using the changeset viewer.