Ignore:
Timestamp:
2018-07-20T20:17:46+12:00 (6 years ago)
Author:
Georgiy Litvinov
Message:

Fixed a bug in collectionGroups

File:
1 edited

Legend:

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

    r32176 r32293  
    206206        groups = GSXML.getValue(groupParam).split(",");
    207207        for (int i = 0; i < groups.length; i++) {
    208             Element groupContent = getRawCurrentContent(groups[i]);
    209             //If group exists
    210             if (groupContent != null) {
    211                 NodeList collectionNodes = GSXML.getChildrenByTagName(groupContent, GSXML.COLLECTION_ELEM);
    212                 for (int j = 0; j < collectionNodes.getLength(); j++) {
    213                     String collName = ((Element) collectionNodes.item(j)).getAttribute(GSXML.NAME_ATT);
    214                     uniq_colls.add(collName);
     208            if (!groups[i].isEmpty()) {
     209                Element groupContent = getRawCurrentContent(groups[i]);
     210                // If group exists
     211                if (groupContent != null) {
     212                    NodeList collectionNodes = GSXML.getChildrenByTagName(groupContent, GSXML.COLLECTION_ELEM);
     213                    for (int j = 0; j < collectionNodes.getLength(); j++) {
     214                        String collName = ((Element) collectionNodes.item(j)).getAttribute(GSXML.NAME_ATT);
     215                        uniq_colls.add(collName);
     216                    }
    215217                }
    216218            }
Note: See TracChangeset for help on using the changeset viewer.