Changeset 37363


Ignore:
Timestamp:
2023-02-28T11:59:57+13:00 (15 months ago)
Author:
kjdon
Message:

GSXML.extractParams will put namespaced params eg p.c into a sub-map. so can't just ask for param p.c

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/core/DefaultReceptionist.java

    r36642 r37363  
    5656                HashMap<String, Serializable> params = GSXML.extractParams(param_list, false);
    5757                String coll_name = (String)params.get(GSParams.COLLECTION);
    58         if (coll_name == null)
    59         {
    60             logger.debug(" coll param is null, returning");
    61             return;
     58        if (coll_name == null || coll_name.equals(""))
     59        {
     60                  // try p.c
     61                  HashMap<String,String> prev_params = (HashMap<String,String>)params.get(GSParams.PREVIOUS_PREFIX);
     62                  if (prev_params != null) {
     63                    coll_name = prev_params.get(GSParams.COLLECTION);
     64                  }
     65                }
     66
     67                if (coll_name == null || coll_name.equals(""))
     68                {
     69                  logger.debug(" coll/p.c params both empty, not adding extra info");
     70                  return;
    6271        }
    6372
    6473        UserContext userContext = new UserContext(page_request);
    65 
    66         if (coll_name.equals(""))
    67         {
    68                   coll_name = (String)params.get("p.c");
    69         }
    7074
    7175        boolean get_service_description = false;
Note: See TracChangeset for help on using the changeset viewer.