Changeset 17801

Show
Ignore:
Timestamp:
10.11.2008 12:53:46 (11 years ago)
Author:
kjdon
Message:

never copy over library_url_gs2/3 or open_collection_gs2/3 when updating the gli config file as it may be wrong. affects the case when you are running several greenstone installations

Files:
1 modified

Legend:

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

    r17798 r17801  
    287287        // Argument found 
    288288        if (old_argument_element_name.equals(new_argument_element_name)) { 
    289             if (!new_argument_element_name.equals("general.open_collection"+Configuration.gliPropertyNameSuffix())) { 
    290             String old_argument_element_value = XMLTools.getElementTextValue(old_argument_element); 
    291             if (!old_argument_element_value.equals(new_argument_element_value)) { 
    292                 XMLTools.setElementTextValue(new_argument_element, old_argument_element_value); 
    293             } 
     289          // we don't want to carry over open_collection or library_url 
     290          // as these may be invalid 
     291          if (!new_argument_element_name.equals("general.open_collection"+Configuration.gliPropertyNameSuffix()) && !new_argument_element_name.equals("general.library_url"+Configuration.gliPropertyNameSuffix())) { 
     292             
     293            String old_argument_element_value = XMLTools.getElementTextValue(old_argument_element); 
     294            if (!old_argument_element_value.equals(new_argument_element_value)) { 
     295              XMLTools.setElementTextValue(new_argument_element, old_argument_element_value); 
    294296            } 
    295  
    296             // We don't care about this option any more 
     297          } 
     298           
     299          // We don't care about this option any more 
    297300            old_argument_element.getParentNode().removeChild(old_argument_element); 
    298301            break;