Changeset 912

Show
Ignore:
Timestamp:
07.02.2000 10:29:11 (20 years ago)
Author:
sjboddie
Message:

fixed a bug - made some functions virtual for use with cstr collection

Location:
trunk/gsdl/src/recpt
Files:
2 modified

Legend:

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

    r753 r912  
    2828/* 
    2929   $Log$ 
     30   Revision 1.5  2000/02/06 21:29:11  sjboddie 
     31   fixed a bug - made some functions virtual for use with cstr collection 
     32 
    3033   Revision 1.4  1999/10/30 23:06:25  sjboddie 
    3134   tidied up a bit 
     
    6770} 
    6871 
    69 // if the "gp" (go to page) argument is set we need to set  
     72// if the "gp" (go to page) argument is set we need to set 
    7073// the "d" argument to the corresponding page 
    7174void pagedbrowserclass::processOID (cgiargsclass &args, recptproto *collectproto, 
    72                     ostream &logout) { 
     75                                    ostream &logout) { 
    7376 
    7477  text_t &arg_d = args["d"]; 
    7578  text_t &arg_gp = args["gp"]; 
    76    
     79  text_tset metadata; 
     80  bool getParents = false; 
     81  FilterResponse_t response; 
     82 
    7783  if ((!arg_d.empty()) && (!arg_gp.empty()) && (is_number (arg_gp))) { 
    7884    text_t top; 
    7985    get_top (arg_d, top); 
    80     text_tset metadata; 
    8186    metadata.insert ("Title"); 
    82     bool getParents = false; 
    83     FilterResponse_t response; 
    8487    get_children (top, args["c"], metadata, getParents, collectproto, response, logout); 
    8588    ResultDocInfo_tarray::iterator dochere = response.docInfo.begin(); 
     
    8790    while (dochere != docend) { 
    8891      if ((*dochere).metadata["Title"].values[0] == arg_gp) { 
    89     arg_d = (*dochere).OID; 
    90     break; 
     92        arg_d = (*dochere).OID; 
     93        break; 
    9194      } 
    9295      dochere ++; 
    9396    } 
    94   } 
    95 } 
    96  
     97 
     98  } else if (!arg_d.empty() && is_top(arg_d)) { // if top level doc, check if not invisible 
     99    metadata.insert("thistype"); 
     100    if(get_info(arg_d, args["c"], metadata, getParents, collectproto, response, logout)) { 
     101      text_t type = response.docInfo[0].metadata["thistype"].values[0]; 
     102      if (type=="Invisible") { // display first child 
     103        arg_d = arg_d + ".1"; 
     104      } 
     105    } 
     106  } 
     107} 
    97108 
    98109int pagedbrowserclass::output_section_group (ResultDocInfo_t &section, cgiargsclass &args, 
     
    156167    previousarrow = "_document:parentarrow_"; 
    157168 
    158       if (thissection != sections.docInfo.end()) { 
     169      if ((thissection+1) != endsection) { 
    159170    nextOID = (*(thissection+1)).OID; 
    160171    nexttitle = (*(thissection+1)).metadata["Title"].values[0]; 
  • trunk/gsdl/src/recpt/pagedbrowserclass.h

    r752 r912  
    4747  text_t get_default_formatstring (); 
    4848 
    49   void processOID (cgiargsclass &args, recptproto *collectproto, 
    50            ostream &logout); 
     49  virtual void processOID (cgiargsclass &args, recptproto *collectproto, 
     50               ostream &logout); 
    5151 
    52   int output_section_group (ResultDocInfo_t &section, cgiargsclass &args, 
    53                 const text_t &collection, int colnumber, format_t *formatlistptr,  
    54                 bool use_table, text_tset &metadata, bool &getParents, 
    55                 recptproto *collectproto, displayclass &disp,  
    56                 outconvertclass &outconvert, ostream &textout, ostream &logout); 
     52  virtual int output_section_group (ResultDocInfo_t &section, cgiargsclass &args, 
     53                    const text_t &collection, int colnumber, format_t *formatlistptr,  
     54                    bool use_table, text_tset &metadata, bool &getParents, 
     55                    recptproto *collectproto, displayclass &disp,  
     56                    outconvertclass &outconvert, ostream &textout, ostream &logout); 
    5757 
    58   int output_section_group (FilterResponse_t &sections, cgiargsclass &args, 
    59                 const text_t &collection, int colnumber, format_t *formatlistptr,  
    60                 bool use_table, text_tset &metadata, bool &getParents, 
    61                 recptproto *collectproto, displayclass &disp,  
    62                 outconvertclass &outconvert, ostream &textout, ostream &logout); 
     58  virtual int output_section_group (FilterResponse_t &sections, cgiargsclass &args, 
     59                    const text_t &collection, int colnumber, format_t *formatlistptr,  
     60                    bool use_table, text_tset &metadata, bool &getParents, 
     61                    recptproto *collectproto, displayclass &disp,  
     62                    outconvertclass &outconvert, ostream &textout, ostream &logout); 
    6363 
    6464};