Ignore:
Timestamp:
2023-11-15T11:40:48+13:00 (7 months ago)
Author:
kjdon
Message:

if we are page action (used as default when no action was specified), and no subaction specified, if collection is specified, use about page, otherwise use home page. This is to allow urls like library/collection/lucene-demo. This means that MR must only set a=p as teh default, not sa=home

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/PageAction.java

    r36648 r38373  
    6565    // the page name is the subaction
    6666    String page_name = request.getAttribute(GSXML.SUBACTION_ATT);
    67     if (page_name.equals(""))
    68       { // if no page specified, assume home page
    69     page_name = HOME_PAGE;
    70       }
     67    if (page_name.equals("")) {
     68    if (collection.equals("")) {
     69        // if no page or collection specified, assume home page
     70        page_name = HOME_PAGE;
     71    } else {
     72        // we have specified a collection, assume about page
     73        page_name = ABOUT_PAGE;
     74    }
     75    // we need to save this to the request for other places to know whats going on, eg transforming receptionist
     76    request.setAttribute(GSXML.SUBACTION_ATT, page_name);
     77    }
    7178
    7279    Element result = doc.createElement(GSXML.MESSAGE_ELEM);
Note: See TracChangeset for help on using the changeset viewer.