Ignore:
Timestamp:
2000-07-13T10:21:53+12:00 (24 years ago)
Author:
sjboddie
Message:

merged changes to trunk into New_Config_Format branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/New_Config_Format-branch/gsdl/src/recpt/documentaction.cpp

    r1258 r1279  
    2828/*
    2929   $Log$
     30   Revision 1.37.2.3  2000/07/12 22:21:37  sjboddie
     31   merged changes to trunk into New_Config_Format branch
     32
     33
     34   Revision 1.39  2000/07/05 21:49:31  sjboddie
     35   Receptionist now caches collection information to avoid making multiple
     36   get_collectinfo calls to collection server
     37
    3038   Revision 1.37.2.2  2000/06/30 00:46:16  nzdl
    3139   caught New_Config_Format-branch up with changes to trunk
    3240
     41   Revision 1.38  2000/05/04 05:18:46  sjboddie
     42   attempting to get end-user collection building to work under windows
     43
    3344   Revision 1.37.2.1  2000/04/09 23:16:46  sjboddie
    3445   Added DocumentColumns stuff to New_Config_Format-branch branch
     46
     47   Revision 1.37  2000/04/07 04:40:44  sjboddie
     48   Reverted back to old DocumentHeader, DocumentTitles, DocumentImages etc.
     49   from DocumentColumns stuff. I'll move the DocumentColumns stuff to a
     50   separate development branch (New_Config_Format-branch) for now. The plan
     51   is to redesign the configuration file format a bit and limit the number of
     52   distributions floating around that take different configuration formats).
    3553
    3654   Revision 1.36  2000/04/03 07:26:28  sjboddie
     
    187205
    188206documentaction::documentaction () {
     207  recpt = NULL;
     208
    189209
    190210  // this action uses cgi variables "a", "d", "cl",
     
    632652  if (collectproto == NULL) return;
    633653 
     654  if (recpt == NULL) {
     655    logout << "ERROR (documentaction::define_external_macros): This action does not contain\n"
     656       << "      information about any receptionists. The method set_receptionist was\n"
     657       << "      probably not called from the module which instantiated this action.\n";
     658    return;
     659  }
     660
    634661  outconvertclass text_t2ascii;
    635662  comerror_t err;
     
    638665  text_tset metadata;
    639666
    640 
    641   // get info on current collection and load up formatinfo
    642   // I'd prefer not to do this here as we're getting
    643   // collection info every time (and probably also getting
    644   // it in other places some of the time) - One day I'll
    645   // fix it ... maybe - Stefan.
    646   ColInfoResponse_t cinfo;
    647   collectproto->get_collectinfo (collection, cinfo, err, logout);
    648   load_formatinfo (cinfo.format, args.getintarg("gt"));
     667  ColInfoResponse_t *cinfo = recpt->get_collectinfo_ptr (collectproto, collection, logout);
     668  if (cinfo == NULL) {
     669    logout << "ERROR (documentaction::define_external_macros): get_collectinfo_ptr returned NULL\n";
     670    return;
     671  }
     672  load_formatinfo (cinfo->format, args.getintarg("gt"));
    649673
    650674  if (formatinfo.DocumentUseHTML) {
     
    658682      disp.setmacro ("gsdltop", "Global", "documenttop");
    659683    }
    660     text_tmap::iterator it = cinfo.format.find ("homepage");
    661     if (it != cinfo.format.end()) {
     684    text_tmap::iterator it = cinfo->format.find ("homepage");
     685    if (it != cinfo->format.end()) {
    662686      text_t httppagehome;
    663687      if (get_link (args, protos, (*it).second, httppagehome, logout))
Note: See TracChangeset for help on using the changeset viewer.