Changeset 19188

Show
Ignore:
Timestamp:
22.04.2009 13:20:27 (11 years ago)
Author:
ak19
Message:

Changes made together with related changes in gliserver.pl for making the DownloadPane? available in the remote client-gli. DownloadInfo?.pl is called and gliserver now expects a downloader argument with the name of the downloader.

Files:
1 modified

Legend:

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

    r18412 r19188  
    228228    private Download loadDownload(String download_name, String lang) { 
    229229    Document document = null; 
    230     InputStream input_stream = null; 
    231230     
    232231    try { 
    233232        if (Gatherer.isGsdlRemote) { 
    234         StringBuffer launch_str = new StringBuffer(); 
    235         launch_str.append(Gatherer.cgiBase); 
    236         launch_str.append("launch"); 
    237         launch_str.append("?cmd=downloadinfo.pl&xml=&language="); 
    238         launch_str.append(lang); 
    239         launch_str.append("&plug="); 
    240         launch_str.append(download_name); 
    241  
    242         String launch = launch_str.toString();       
    243         System.err.println("*** launch = " + launch); 
    244  
    245         URL launch_url = new URL(launch); 
    246         URLConnection launch_connection = launch_url.openConnection(); 
    247         input_stream = launch_connection.getInputStream(); 
     233        String output = Gatherer.remoteGreenstoneServer.getScriptOptions("downloadinfo.pl", "&downloader="+download_name); //OR: "&listall"; 
     234        Reader reader = new StringReader(output); 
     235        document = XMLTools.parseXML(reader); 
    248236        } 
    249237        else { 
     
    270258        Process process = runtime.exec(args); 
    271259         
    272         input_stream = process.getErrorStream(); 
    273         } 
    274  
    275             document = XMLTools.parseXML(input_stream); 
     260        InputStream input_stream = process.getErrorStream(); 
     261        document = XMLTools.parseXML(input_stream); 
     262        } 
     263 
     264             
    276265    } 
    277266    catch (Exception error) {