Changeset 10988 for trunk/gsdl


Ignore:
Timestamp:
2005-12-14T12:30:46+13:00 (18 years ago)
Author:
mdewsnip
Message:

Fixed a bug where entering an invalid "gp" value with a top-level "d" value would go to a bad page. Also removed the restriction that the "gp" value has to be numeric, since I have "i", "ii", "iii", "iv" etc. Title values.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/recpt/pagedbrowserclass.cpp

    r9620 r10988  
    6565  FilterResponse_t response;
    6666
    67   if ((!arg_d.empty()) && (!arg_gp.empty()) && (is_number (arg_gp))) {
     67  if (!arg_d.empty() && !arg_gp.empty()) {
    6868    text_t top;
    6969    get_top (arg_d, top);
     
    7575      if ((*dochere).metadata["Title"].values[0] == arg_gp) {
    7676        arg_d = (*dochere).OID;
    77         break;
     77        return;
    7878      }
    7979      ++dochere;
    8080    }
    81 
    82   } else if (!arg_d.empty() && is_top(arg_d)) { // if top level doc, check if not invisible
     81  }
     82
     83  // The "gp" argument was either empty or invalid, so display the first child if given a document OID
     84  if (!arg_d.empty() && is_top(arg_d)) { // if top level doc, check if not invisible
    8385    metadata.insert("thistype");
    8486    if (get_info(arg_d, args["c"], args["l"], metadata, getParents, collectproto, response, logout)) {
Note: See TracChangeset for help on using the changeset viewer.