Changeset 8261


Ignore:
Timestamp:
2004-10-08T16:44:07+13:00 (20 years ago)
Author:
mdewsnip
Message:

Moved another Gatherer dependency out of the Configuration class.

Location:
trunk/gli/src/org/greenstone/gatherer
Files:
2 edited

Legend:

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

    r8260 r8261  
    115115    static public String site_name = "";
    116116    /** The servlet path if we are using GS3 */
    117     static private String servlet_path = "";
     117    static public String servlet_path = "";
    118118    /** If true, overrides the mirroring enabled setting in the config.xml file. */
    119119    static private boolean mirroring_enabled = false;
     
    590590
    591591    static public String getServletPath() {
    592     if (servlet_path == null) {
    593         servlet_path = Gatherer.servlet_config.getServletPath(site_name);
    594     }
    595592    return servlet_path;
    596593    }
     594
    597595    /** Retrieve the value of the named property, and noting whether we consult the general or collection specific configuration. */
    598596    static public String getString(String property, boolean general) {
  • trunk/gli/src/org/greenstone/gatherer/Gatherer.java

    r8259 r8261  
    198198
    199199        // I don't really know what this is for but I've moved it here from Configuration
    200         if (isGsdlRemote && Utility.isWindows() && perl_path != null) {
    201         if (perl_path.toLowerCase().endsWith("perl.exe")) {
    202             perl_path = perl_path.substring(0, perl_path.length() - "perl.exe".length());
    203         }
    204         if (perl_path.endsWith(File.separator)) {
    205             perl_path = perl_path.substring(0, perl_path.length() - File.separator.length());
    206         }
     200        if (isGsdlRemote && Utility.isWindows() && Configuration.perl_path != null) {
     201        if (Configuration.perl_path.toLowerCase().endsWith("perl.exe")) {
     202            Configuration.perl_path = Configuration.perl_path.substring(0, Configuration.perl_path.length() - "perl.exe".length());
     203        }
     204        if (Configuration.perl_path.endsWith(File.separator)) {
     205            Configuration.perl_path = Configuration.perl_path.substring(0, Configuration.perl_path.length() - File.separator.length());
     206        }
     207        }
     208
     209        if (GS3 && Configuration.servlet_path == null) {
     210        Configuration.servlet_path = servlet_config.getServletPath(Configuration.site_name);
    207211        }
    208212
Note: See TracChangeset for help on using the changeset viewer.