Changeset 13976 for trunk


Ignore:
Timestamp:
2007-03-14T11:25:14+13:00 (17 years ago)
Author:
kjdon
Message:

now have a new variable coll_ids_list_no_all - the list of collections without the 'all' option. use this as the list when the collection param is empty or all - don't want to send a request to all/TextQuery

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/src/java/org/greenstone/gsdl3/service/CrossCollectionSearch.java

    r13270 r13976  
    5151   
    5252    protected String [] coll_ids_list = null;
     53    protected String [] coll_ids_list_no_all = null;
    5354    protected String [] coll_names_list = null;
    5455
     
    148149
    149150    // get the collection list
    150     String [] colls_list;
     151    String [] colls_list = coll_ids_list_no_all;
    151152    Element coll_param = GSXML.getNamedElement(param_list, GSXML.PARAM_ELEM, GSXML.NAME_ATT,  COLLECTION_PARAM);
    152     if (coll_param == null) {
    153         colls_list = coll_ids_list;
    154     } else {
     153    if (coll_param != null) {
    155154        String coll_list = GSXML.getValue(coll_param);
    156         if (coll_list.equals("all") || coll_list.equals("")) {
    157         colls_list = coll_ids_list;
    158         } else {
     155        if (!coll_list.equals("all") &&  !coll_list.equals("")) {
    159156        colls_list = coll_list.split(",");
    160157        }
     
    283280        return false;
    284281    }
     282    // ids no all has the list without 'all' option.
     283    this.coll_ids_list_no_all = new String[1];
     284    this.coll_ids_list_no_all = (String []) valid_colls.toArray(coll_ids_list_no_all);
     285   
    285286    valid_colls.add(0, "all");
    286287    valid_coll_names.add(0, getTextString("param."+COLLECTION_PARAM+".all", "en" ));
Note: See TracChangeset for help on using the changeset viewer.