Changeset 793 for trunk


Ignore:
Timestamp:
1999-11-26T12:01:09+13:00 (24 years ago)
Author:
sjboddie
Message:

now need to be able to handle it if no collection is selected

File:
1 edited

Legend:

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

    r771 r793  
    2828/*
    2929   $Log$
     30   Revision 1.22  1999/11/25 23:01:09  sjboddie
     31   now need to be able to handle it if no collection is selected
     32
    3033   Revision 1.21  1999/11/03 22:50:13  sjboddie
    3134   now defaults to home page
     
    268271  text_t &arg_p = args["p"];
    269272
     273  recptproto* collectproto = protos->getrecptproto (args["c"], logout);
     274  if (collectproto != NULL) {
     275    comerror_t err;
     276    ColInfoResponse_t cinfo;
     277    collectproto->get_collectinfo (args["c"], cinfo, err, logout);
     278 
     279    disp.setmacro ("numdocs", "Global", cinfo.numDocs);
     280    unsigned long current_time = time(NULL);
     281    unsigned long builddate = (current_time - cinfo.buildDate) / 86400;
     282    disp.setmacro ("builddate", "Global", builddate);
     283  }
     284
    270285  if (arg_p == "home") set_homeextra_macro (disp, protos, logout);
    271286
    272287  else if (arg_p == "about" || arg_p == "help") {
    273     // get pointer to collection server
    274     recptproto* collectproto = protos->getrecptproto (args["c"], logout);
    275288    if (collectproto == NULL) return;
    276    
    277     if (arg_p == "about") {
    278       comerror_t err;
    279       ColInfoResponse_t cinfo;
    280       collectproto->get_collectinfo (args["c"], cinfo, err, logout);
    281 
    282       disp.setmacro ("numdocs", "about", cinfo.numDocs);
    283       unsigned long current_time = time(NULL);
    284       unsigned long builddate = (current_time - cinfo.buildDate) / 86400;
    285       disp.setmacro ("builddate", "about", builddate);
    286     }
    287289   
    288290    // _textbrowseoptions_ and _numbrowseoptions_
Note: See TracChangeset for help on using the changeset viewer.