Changeset 14358


Ignore:
Timestamp:
2007-08-09T16:19:12+12:00 (15 years ago)
Author:
qq6
Message:

fixed a bug in updateCollectionConfigXML()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gli/trunk/src/org/greenstone/gatherer/collection/CollectionManager.java

    r14322 r14358  
    14051405    Document new_cfg_doc = XMLTools.parseXMLFile(new_cfg);
    14061406    Element collection_config = new_cfg_doc.getDocumentElement();
    1407 
     1407   
    14081408    Node browseNode = XMLTools.getChildByTagNameIndexed(collection_config, StaticStrings.BROWSE_STR, 0);
    14091409    NodeList classifier_children = ((Element)browseNode).getElementsByTagName(StaticStrings.CLASSIFIER_STR);
     
    14701470            option_element.setAttribute(StaticStrings.VALUE_ATTRIBUTE, sort);
    14711471        }
    1472         else if(name_str.equals("buttonname") && buttonname == "") {
    1473             option_element.setAttribute(StaticStrings.VALUE_ATTRIBUTE, metadata);           
    1474         }
    1475         else if(buttonname == null) {
     1472        else if(name_str.equals("buttonname") && (buttonname == "" || buttonname == null)) {
    14761473            // No buttonname has been specified. Lets create one using the metadata as its value
    14771474            Element option = new_cfg_doc.createElement(StaticStrings.OPTION_STR);
     
    14821479        }
    14831480    }
    1484    
    14851481    }
    14861482   
Note: See TracChangeset for help on using the changeset viewer.