Ignore:
Timestamp:
2005-05-23T16:36:40+12:00 (19 years ago)
Author:
kjdon
Message:

getting collectionmeta from teh colinforesponse now, not using a get_info via the protocol. this means that collmeta will be read from the config file not from the database - it will not require rebuilding for changes to take effect.

File:
1 edited

Legend:

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

    r9674 r9931  
    13961396  disp.setmacro ("httpprefix", displayclass::defaultpackage, configinfo.httpprefix);
    13971397
    1398   // get relevant info from the collection
    1399   if (!collection.empty()) {
    1400     ColInfoResponse_t cinfo;
    1401     comerror_t err;
    1402     recptproto *collectproto = protocols.getrecptproto (collection, logout);
    1403     if (collectproto != NULL) {
    1404       collectproto->get_collectinfo (collection, cinfo, err, logout);
    1405       text_t httpcollection;
    1406       if (!cinfo.httpdomain.empty()) httpcollection = "http://";
    1407       httpcollection += cinfo.httpdomain + cinfo.httpprefix + "/collect/"
    1408     + collection;
    1409       disp.setmacro ("httpcollection", displayclass::defaultpackage,
    1410              httpcollection);
    1411       // as of gsdl 2.53, collect.cfg can specify macros
    1412       if (cinfo.collection_macros.size() > 0) {
    1413     macros_map::const_iterator this_macro=cinfo.collection_macros.begin();
    1414     macros_map::const_iterator done_macro=cinfo.collection_macros.end();
    1415     while (this_macro != done_macro) {
    1416 
    1417       disp.setcollectionmacro("Global",           // package
    1418                   this_macro->first,          // macro name
    1419                   this_macro->second.first,   // params
    1420                   this_macro->second.second); // value
    1421       ++this_macro;
    1422     }
    1423       } // col macros
    1424     } // collectproto != NULL
    1425   }
    14261398
    14271399  text_t compressedoptions = get_compressed_arg(args, logout);
     
    14981470        if (!lang.empty()) {
    14991471          if (args["l"]==lang) {
    1500         disp.setmacro (name, displayclass::defaultpackage, (*here).second.values[0]);
     1472        disp.setcollectionmacro(displayclass::defaultpackage, name, "", (*here).second.values[0]);
    15011473          }
    15021474        }
    15031475        else { // the default one
    1504           disp.setmacro ((*here).first, displayclass::defaultpackage, (*here).second.values[0]);
     1476          disp.setcollectionmacro(displayclass::defaultpackage, (*here).first,  "", (*here).second.values[0]);
    15051477        }
    15061478      }
     
    15251497    }
    15261498  }
     1499
     1500  if (!collection.empty()) {
     1501    ColInfoResponse_t cinfo;
     1502    comerror_t err;
     1503    recptproto *collectproto = protocols.getrecptproto (collection, logout);
     1504    if (collectproto != NULL) {
     1505      collectproto->get_collectinfo (collection, cinfo, err, logout);
     1506      text_t httpcollection;
     1507      if (!cinfo.httpdomain.empty()) httpcollection = "http://";
     1508      httpcollection += cinfo.httpdomain + cinfo.httpprefix + "/collect/"
     1509    + collection;
     1510      disp.setmacro ("httpcollection", displayclass::defaultpackage,
     1511             httpcollection);
     1512      // as of gsdl 2.53, collect.cfg can specify macros
     1513      if (cinfo.collection_macros.size() > 0) {
     1514    macros_map::const_iterator this_macro=cinfo.collection_macros.begin();
     1515    macros_map::const_iterator done_macro=cinfo.collection_macros.end();
     1516    while (this_macro != done_macro) {
     1517
     1518      disp.setcollectionmacro("Global",           // package
     1519                  this_macro->first,          // macro name
     1520                  this_macro->second.first,   // params
     1521                  this_macro->second.second); // value
     1522      ++this_macro;
     1523    }
     1524      } // col macros
     1525    } // collectproto != NULL
     1526  }
     1527
    15271528}
    15281529
Note: See TracChangeset for help on using the changeset viewer.