Changeset 7432


Ignore:
Timestamp:
2004-05-25T16:31:41+12:00 (20 years ago)
Author:
mdewsnip
Message:

(Human Info) Added language parameter to all calls of get_info, get_children, has_children, and get_contents. Also, removed some of the modifications so it compiles again.

Location:
trunk/gsdl/src/recpt
Files:
17 edited

Legend:

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

    r7423 r7432  
    7979                     cgiargsclass &/*args*/,
    8080                     outconvertclass &/*outconvert*/,
    81                      const text_tarray &/*saveconf*/,
     81                     const text_t &/*saveconf*/,
    8282                     ostream &/*logout*/) {
    8383  return true;
  • trunk/gsdl/src/recpt/action.h

    r7423 r7432  
    8181                       cgiargsclass &args,
    8282                       outconvertclass &outconvert,
    83                        const text_tarray &saveconf,
     83                       const text_t &saveconf,
    8484                       ostream &logout);
    8585
  • trunk/gsdl/src/recpt/authenaction.cpp

    r7425 r7432  
    162162                       cgiargsclass &args,
    163163                       outconvertclass &outconvert,
    164                        const text_tarray &saveconf,
     164                       const text_t &saveconf,
    165165                       ostream &logout) {
    166166
     
    310310
    311311  // get a list of saved configuration arguments (if possible)
     312  text_t saveconf;
    312313  text_tset saveconfset;
    313314  if (recpt != NULL) {
    314     text_tarray::const_iterator thisSaveConf = recpt->get_configinfo().saveconf.begin();
    315     text_tarray::const_iterator endSaveConf = recpt->get_configinfo().saveconf.end();
    316     while (thisSaveConf != endSaveConf) {
    317       saveconfset.insert(*thisSaveConf);
    318       ++thisSaveConf;
    319     }
     315    saveconf = recpt->get_configinfo().saveconf;
     316    splitchar (saveconf.begin(), saveconf.end(), '-', saveconfset);
    320317  }
    321318 
  • trunk/gsdl/src/recpt/authenaction.h

    r7425 r7432  
    6565                   cgiargsclass &args,
    6666                   outconvertclass &outconvert,
    67                    const text_tarray &saveconf,
     67                   const text_t &saveconf,
    6868                   ostream &logout);
    6969
  • trunk/gsdl/src/recpt/browsetools.cpp

    r7193 r7432  
    126126  parse_formatstring (formatinfo.DocumentHeading, formatlistptr, metadata, getParents);
    127127
    128   if (!get_info (args["d"], args["c"], metadata, getParents, collectproto, response, logout))
     128  if (!get_info (args["d"], args["c"], args["l"], metadata, getParents, collectproto, response, logout))
    129129    return;
    130130
     
    159159  parse_formatstring (formatinfo.RelatedDocuments, formatlistptr, metadata, getParents);
    160160
    161   if (!get_info (args["d"], args["c"], metadata, getParents, collectproto, response, logout))
     161  if (!get_info (args["d"], args["c"], args["l"], metadata, getParents, collectproto, response, logout))
    162162    return;
    163163 
     
    223223
    224224    FilterResponse_t tmp;
    225     get_children (section.OID, args["c"], metadata, getParents, collectproto, tmp, logout);
     225    get_children (section.OID, args["c"], args["l"], metadata, getParents, collectproto, tmp, logout);
    226226    ResultDocInfo_tarray::iterator thisdoc = tmp.docInfo.begin();
    227227    ResultDocInfo_tarray::iterator lastdoc = tmp.docInfo.end();
     
    286286  metadata.insert (classifytype);
    287287
    288   if (!get_info (tOID, args["c"], metadata, getParents, collectproto, response, logout))
     288  if (!get_info (tOID, args["c"], args["l"], metadata, getParents, collectproto, response, logout))
    289289    return;
    290290  classifytype = response.docInfo[0].metadata[classifytype].values[0];
     
    328328
    329329  // protocol call
    330   if (!get_info (OID, args["c"], metadata, getParents, collectproto, response, logout))
     330  if (!get_info (OID, args["c"], args["l"], metadata, getParents, collectproto, response, logout))
    331331    return;
    332332
     
    474474    get_top (args["cl"], classification);   
    475475
    476   bool haschildren = has_children (OID, args["c"], collectproto, logout);
     476  bool haschildren = has_children (OID, args["c"], args["l"], collectproto, logout);
    477477
    478478  if ((!args["d"].empty()) && fulltoc)
     
    486486    metadata.insert ("childtype");
    487487   
    488     if (!get_info (parents, args["c"], metadata, getParents, collectproto, response, logout))
     488    if (!get_info (parents, args["c"], args["l"], metadata, getParents, collectproto, response, logout))
    489489      return;
    490490   
     
    494494            browsermap, formatinfo, formatlistmap);
    495495
    496     if (!get_info (parents, args["c"], metadata, getParents, collectproto, response, logout))
     496    if (!get_info (parents, args["c"], args["l"], metadata, getParents, collectproto, response, logout))
    497497      return;
    498498   
     
    541541
    542542  if (haschildren)
    543     get_children (OID, args["c"], metadata, getParents,
     543    get_children (OID, args["c"], args["l"], metadata, getParents,
    544544          collectproto, response, logout);
    545545  else if (!is_top(OID)) {
    546     get_children (OID + ".pr", args["c"], metadata, getParents,
     546    get_children (OID + ".pr", args["c"], args["l"], metadata, getParents,
    547547          collectproto, response, logout);
    548548    haschildren = true;
     
    576576    if (OID.empty()) OID = args["cl"];
    577577
    578     bool haschildren = has_children (OID, args["c"], collectproto, logout);
     578    bool haschildren = has_children (OID, args["c"], args["l"], collectproto, logout);
    579579
    580580    // get parents list
     
    597597        metadata.insert ("thistype");
    598598
    599         get_info ( topOID, args["c"], metadata, getParents, collectproto, response, logout);
     599        get_info ( topOID, args["c"], args["l"], metadata, getParents, collectproto, response, logout);
    600600        if (!response.docInfo[0].metadata["thistype"].values.empty())
    601601            classifytype = response.docInfo[0].metadata["thistype"].values[0];
     
    617617        metadata.insert ("haschildren");
    618618
    619         get_info (topOID, args["c"], metadata, getParents, collectproto, response, logout);
     619        get_info (topOID, args["c"], args["l"], metadata, getParents, collectproto, response, logout);
    620620
    621621        // ouput top OID section
     
    656656
    657657        OID = parents[tabcount];
    658         get_info (OID, args["c"], metadata, getParents, collectproto, response, logout);
     658        get_info (OID, args["c"], args["l"], metadata, getParents, collectproto, response, logout);
    659659        get_top (OID, classification);
    660660
     
    683683
    684684        if (haschildren)
    685             get_children (OID, args["c"], metadata, getParents,
     685            get_children (OID, args["c"], args["l"], metadata, getParents,
    686686                collectproto, response, logout);
    687687        else if (!is_top(OID)) {
    688             get_children (OID + ".pr", args["c"], metadata, getParents,
     688            get_children (OID + ".pr", args["c"], args["l"], metadata, getParents,
    689689            collectproto, response, logout);
    690690            haschildren = true;
     
    713713        if (tabcount) pOID = parents[tabcount-1];
    714714        else pOID = OID;
    715         get_info (pOID, args["c"], metadata, getParents, collectproto, response, logout);
     715        get_info (pOID, args["c"], args["l"], metadata, getParents, collectproto, response, logout);
    716716
    717717        // get classifytype of this level
     
    738738        use_table = is_table_content (formatlistptr);
    739739
    740         get_children (OID, args["c"], metadata, getParents, collectproto, response, logout);
     740        get_children (OID, args["c"], args["l"], metadata, getParents, collectproto, response, logout);
    741741
    742742        ResultDocInfo_tarray::iterator thissibling = response.docInfo.begin();
  • trunk/gsdl/src/recpt/cgiutils.cpp

    r3670 r7432  
    117117  args.clear();
    118118 
    119   text_t::iterator here = argstr.begin();
    120   text_t::iterator end = argstr.end();
     119  text_t::const_iterator here = argstr.begin();
     120  text_t::const_iterator end = argstr.end();
    121121  text_t key, value;
    122122 
     
    544544    char *n = name.getcstr();
    545545    char *v = getenv(n);
    546     delete n;
     546    delete []n;
    547547    if (v != NULL) return v;
    548     return "";
     548    return g_EmptyText;
    549549
    550550  } else return fcgienv[name];
  • trunk/gsdl/src/recpt/documentaction.cpp

    r7333 r7432  
    297297      // get metadata for parent document
    298298      get_top (args["d"], top);
    299       if (get_info (top, args["c"], metadata, false, collectproto, filt_response, logout)) {
     299      if (get_info (top, args["c"], args["l"], metadata, false, collectproto, filt_response, logout)) {
    300300    text_t url = filt_response.docInfo[0].metadata["URL"].values[0];
    301301   
     
    571571    metadata.insert ("mdtype"); // in case there is a datelist
    572572    bool getParents = false;
    573     get_children ("", collection, metadata, getParents, collectproto, response, logout);
     573    get_children ("", collection, args["l"], metadata, getParents, collectproto, response, logout);
    574574   
    575575    bool has_search_button = true;
     
    608608  recptproto *collectproto = protos->getrecptproto (args["c"], logout);
    609609
    610   if (get_info (inlink, args["c"], metadata, false, collectproto, response, logout)) {
     610  if (get_info (inlink, args["c"], args["l"], metadata, false, collectproto, response, logout)) {
    611611    if (!response.docInfo[0].metadata["section"].values[0].empty()) {
    612612      outlink = "_httpdocument_&d=" + response.docInfo[0].metadata["section"].values[0];
     
    631631      collectproto = protos->getrecptproto (*col_here, logout);
    632632     
    633       if (get_info (inlink, *col_here, metadata, false, collectproto, response, logout)) {
     633      if (get_info (inlink, *col_here, args["l"], metadata, false, collectproto, response, logout)) {
    634634    if (!response.docInfo[0].metadata["section"].values[0].empty()) {
    635635      outlink = "_httpdocument_&c=" + *col_here + "&d=" +
     
    786786       //related documents in a vertical list. This is the default format.
    787787
    788        if (get_info (arg_d, collection, metadata, options, false, collectproto, response, logout))
     788       if (get_info (arg_d, collection, args["l"], metadata, options, false, collectproto, response, logout))
    789789     relation += get_related_docs(collection, collectproto, response.docInfo[0], logout);
    790790       
     
    796796 
    797797    // get metadata for this document and it's parents
    798     if (get_info (arg_d, collection, metadata, options,
     798    if (get_info (arg_d, collection, args["l"], metadata, options,
    799799          true, collectproto, response, logout)) {
    800800
     
    856856      metadata.insert ("parameters");
    857857
    858       if (get_info (classtop, collection, metadata, false, collectproto, response, logout)) {
     858      if (get_info (classtop, collection, args["l"], metadata, false, collectproto, response, logout)) {
    859859     
    860860    text_t &title = response.docInfo[0].metadata["Title"].values[0];
     
    11271127  }
    11281128   
    1129   if (get_info (OID, collection, metadata, getParents, collectproto, inforesponse, logout)) {
     1129  if (get_info (OID, collection, args["l"], metadata, getParents, collectproto, inforesponse, logout)) {
    11301130    int hastxt = inforesponse.docInfo[0].metadata["hastxt"].values[0].getint();
    11311131    int haschildren = inforesponse.docInfo[0].metadata["haschildren"].values[0].getint();
     
    11521152      if (args["d"].empty()) is_classify = true;
    11531153
    1154       get_contents (exOID, is_classify, metadata, collection,
     1154      get_contents (exOID, is_classify, metadata, collection, args["l"],
    11551155            collectproto, inforesponse, logout);
    11561156   
     
    12181218  // get info on current section
    12191219  metadata.insert("haschildren");
    1220   if (!get_info(arg_d, args["c"], metadata, false, collectproto, response, logout)) {
     1220  if (!get_info(arg_d, args["c"], args["l"], metadata, false, collectproto, response, logout)) {
    12211221    logout << "error 1 in documentaction::set_arrow_macros\n";
    12221222    return;
     
    12291229  text_t thisoid = arg_d;
    12301230  while (parentcount > 0) {
    1231     get_children (get_parent(thisoid), args["c"], metadata, false,
     1231    get_children (get_parent(thisoid), args["c"], args["l"], metadata, false,
    12321232          collectproto, response, logout);
    12331233    ResultDocInfo_tarray::iterator this_sibling = response.docInfo.begin();
     
    12421242      // down to the last descendant
    12431243      while (section_has_children) {
    1244         get_children (previous_sibling, args["c"], metadata, false,
     1244        get_children (previous_sibling, args["c"], args["l"], metadata, false,
    12451245              collectproto, presponse, logout);
    12461246        if (!presponse.docInfo.empty()) {
  • trunk/gsdl/src/recpt/formattools.cpp

    r7389 r7432  
    405405
    406406  //get the information associated with the metadata for current doc
    407   if (get_info (docinfo.OID, collection, metadata,
     407  if (get_info (docinfo.OID, collection, "", metadata,
    408408        false, collectproto, response, logout)) {
    409409   
     
    437437       
    438438    //get the information associated with the metadata for related doc
    439     if (get_info (document_OID, document_collection, metadata,
     439    if (get_info (document_OID, document_collection, "", metadata,
    440440              false, collectproto, response, logout)) {
    441441     
     
    12961296     
    12971297     // retrieve metadata
    1298      get_info(docinfo.OID, collection, request.fields, request.getParents,
     1298     get_info(docinfo.OID, collection, "", request.fields, request.getParents,
    12991299          collectproto, response, logout);
    13001300     
  • trunk/gsdl/src/recpt/gsdl_modules_cfg.h

    r7392 r7432  
    5252#define GSDL_USE_AUTHEN_ACTION
    5353#define GSDL_USE_BROWSE_ACTION
    54 #undef  GSDL_USE_CL_DISPLAY_ACTION
    5554#define GSDL_USE_COLLECTOR_ACTION
    56 #undef  GSDL_USE_COURSES_ACTION
    57 #undef  GSDL_USE_DIR_BROWSE_ACTION
    58 #undef  GSDL_USE_EXPORT_ACTION
    5955#define GSDL_USE_EXTLINK_ACTION
    60 #undef  GSDL_USE_GENERATOR_ACTION
    61 #undef  GSDL_USE_INDEX_BROWSE_ACTION
    62 #define GSDL_USE_LANG_ACTION
     56#undef  GSDL_USE_LANG_ACTION
    6357#define GSDL_USE_PHIND_ACTION
    6458#define GSDL_USE_PING_ACTION
     
    6660#define GSDL_USE_TIP_ACTION
    6761#define GSDL_USE_USERS_ACTION
     62
     63#undef  GSDL_USE_CL_DISPLAY_ACTION
     64#undef  GSDL_USE_COURSES_ACTION
     65#undef  GSDL_USE_DIR_BROWSE_ACTION
     66#undef  GSDL_USE_EXPORT_ACTION
     67#undef  GSDL_USE_GENERATOR_ACTION
     68#undef  GSDL_USE_INDEX_BROWSE_ACTION
     69
    6870
    6971//BROWSER MODULES
  • trunk/gsdl/src/recpt/historydb.cpp

    r1913 r7432  
    252252    FilterResponse_t response;
    253253   
    254     get_info("collection", collect, metadata, false, collectproto, response, logout);
     254    get_info("collection", collect, args["l"], metadata, false, collectproto, response, logout);
    255255    text_t index = response.docInfo[0].metadata[argsinfo["h"]].values[0];
    256256    if (!index.empty()) {
  • trunk/gsdl/src/recpt/hlistbrowserclass.cpp

    r7392 r7432  
    7575    OIDs.push_back (OID + ".fc");
    7676
    77     get_info (OIDs, args["c"], metadata, false, collectproto, response, logout);
     77    get_info (OIDs, args["c"], args["l"], metadata, false, collectproto, response, logout);
    7878
    7979    OID = response.docInfo[1].OID;
     
    9999  FilterResponse_t response;
    100100  text_t &arg_cl = args["cl"];
    101   get_children (section.OID + ".pr", args["c"], metadata, getParents,
     101  get_children (section.OID + ".pr", args["c"], args["l"], metadata, getParents,
    102102        collectproto, response, logout);
    103103
  • trunk/gsdl/src/recpt/hlistbrowserclass.h

    r7392 r7432  
    2929
    3030#include "browserclass.h"
     31#include "receptionist.h"
    3132
    3233class hlistbrowserclass : public browserclass {
     
    3637  hlistbrowserclass ();
    3738  virtual ~hlistbrowserclass ();
     39
     40  void set_receptionist(receptionist *therecpt) {recpt=therecpt;}
    3841
    3942  // returns the name that specifies the browserclass type
     
    6164                    outconvertclass &outconvert, ostream &textout, ostream &logout);
    6265
     66protected:
     67  receptionist *recpt;
    6368};
    6469
  • trunk/gsdl/src/recpt/librarymain.cpp

    r4122 r7432  
    2424 *********************************************************************/
    2525
     26#include "gsdl_modules_cfg.h"
    2627#include "receptionist.h"
    2728#include "cgiwrapper.h"
     29#include "recptconfig.h"
    2830#include "fileutil.h"
    2931#include "nullproto.h"
     
    5355#include "usersaction.h"
    5456#include "extlinkaction.h"
     57
     58#ifdef GSDL_USE_EXPORT_ACTION
     59#include "exportaction.h"
     60#endif
     61
     62#ifdef GSDL_USE_CL_DISPLAY_ACTION
     63#include "cldisplayaction.h"
     64#endif
     65
     66#ifdef GSDL_USE_COURSES_ACTION
     67#include "coursesaction.h"
     68#endif
     69
     70#ifdef GSDL_USE_COMPOSITION_ACTION
     71#include "compositionaction.h"
     72#endif
     73
     74#ifdef GSDL_USE_INDEX_BROWSE_ACTION
     75#include "indexbrowseaction.h"
     76#endif
     77
     78#ifdef GSDL_USE_DIR_BROWSE_ACTION
     79#include "dirbrowseaction.h"
     80#endif
     81
     82#ifdef GSDL_USE_GENERATOR_ACTION
     83#include "generatoraction.h"
     84#endif
     85
    5586#include "tipaction.h"
    5687#include "collectoraction.h"
    5788#include "browseaction.h"
    5889#include "phindaction.h"
    59 #if defined(USE_LANGACTION)
     90#if defined(GSDL_USE_LANG_ACTION)
    6091#include "langaction.h"
    6192#endif
     
    69100#include "htmlbrowserclass.h"
    70101#include "phindbrowserclass.h"
     102
     103#ifdef GSDL_USE_CLASSIFIER_BROWSER
     104//classifier browsers
     105
     106#include "treeclassifierbrowserclass.h"
     107#ifdef GSDL_USE_TREE_EX_CLASSIFIER_BROWSER
     108#include "treeexclassifierbrowserclass.h"
     109#endif
     110
     111#endif //GSDL_USE_CLASSIFIER_BROWSER
    71112
    72113int main () {
     
    113154#endif
    114155
     156#ifdef GSDL_USE_TIP_ACTION
    115157  // the list of actions. Note: these actions will become invalid
    116   // at the end of this function.
    117   tipaction atipaction;
    118   recpt.add_action (&atipaction);
    119 
    120   statusaction astatusaction;
    121   astatusaction.set_receptionist (&recpt);
    122   recpt.add_action (&astatusaction);
    123 
    124   pageaction apageaction;
    125   apageaction.set_receptionist (&recpt);
    126   recpt.add_action (&apageaction);
    127 
    128   pingaction apingaction;
    129   recpt.add_action (&apingaction);
    130 
    131   queryaction aqueryaction;
    132   aqueryaction.set_receptionist (&recpt);
    133   recpt.add_action (&aqueryaction);
    134 
    135   documentaction adocumentaction;
    136   adocumentaction.set_receptionist (&recpt);
    137   recpt.add_action (&adocumentaction);
    138 
    139   usersaction ausersaction;
    140   recpt.add_action (&ausersaction);
    141 
    142   extlinkaction anextlinkaction;
    143   recpt.add_action (&anextlinkaction);
    144 
    145   authenaction aauthenaction;
    146   aauthenaction.set_receptionist(&recpt);
    147   recpt.add_action (&aauthenaction);
    148 
    149   collectoraction acollectoraction;
    150   acollectoraction.set_receptionist (&recpt);
    151   recpt.add_action(&acollectoraction);
    152 
    153   browseaction abrowseaction;
    154   abrowseaction.set_receptionist (&recpt);
    155   recpt.add_action(&abrowseaction);
    156 
    157   phindaction aphindaction;
    158   recpt.add_action(&aphindaction);
    159 
    160 #if defined(USE_LANGACTION)
    161   langaction alangaction;
    162   alangaction.set_receptionist(&recpt);
    163   recpt.add_action(&alangaction);
     158  // at the end of this function. We will clean them.
     159  recpt.add_action (new tipaction());
     160#endif
     161
     162#ifdef GSDL_USE_STATUS_ACTION
     163  statusaction *astatusaction = new statusaction();
     164  astatusaction->set_receptionist (&recpt);
     165  recpt.add_action (astatusaction);
     166#endif
     167
     168  pageaction *apageaction = new pageaction();
     169  apageaction->set_receptionist (&recpt);
     170  recpt.add_action (apageaction);
     171
     172#ifdef GSDL_USE_PING_ACTION
     173  recpt.add_action (new pingaction());
     174#endif
     175
     176  queryaction *aqueryaction = new queryaction();
     177  aqueryaction->set_receptionist (&recpt);
     178  recpt.add_action (aqueryaction);
     179       
     180  documentaction *adocumentaction = new documentaction();
     181  adocumentaction->set_receptionist (&recpt);
     182  recpt.add_action (adocumentaction);
     183
     184#ifdef GSDL_USE_USERS_ACTION
     185  recpt.add_action (new usersaction());
     186#endif
     187
     188#ifdef GSDL_USE_EXTLINK_ACTION
     189  recpt.add_action (new extlinkaction());
     190#endif
     191       
     192#ifdef GSDL_USE_AUTHEN_ACTION
     193  authenaction *aauthenaction = new authenaction();
     194  aauthenaction->set_receptionist(&recpt);
     195  recpt.add_action (aauthenaction);
     196#endif
     197
     198#ifdef GSDL_USE_COLLECTOR_ACTION
     199  collectoraction *acollectoraction = new collectoraction();
     200  acollectoraction->set_receptionist (&recpt);
     201  recpt.add_action(acollectoraction);
     202#endif
     203
     204#ifdef GSDL_USE_BROWSE_ACTION
     205  browseaction *abrowseaction = new browseaction();
     206  abrowseaction->set_receptionist (&recpt);
     207  recpt.add_action(abrowseaction);
     208#endif
     209
     210#ifdef GSDL_USE_PHIND_ACTION
     211  recpt.add_action(new phindaction());
     212#endif
     213
     214#ifdef GSDL_USE_LANG_ACTION
     215  langaction *alangaction = new langaction();
     216  alangaction->set_receptionist(&recpt);
     217  recpt.add_action(alangaction);
    164218#endif
    165219
    166220  // list of browsers
    167221  vlistbrowserclass avlistbrowserclass;
     222  avlistbrowserclass.set_receptionist(&recpt);
    168223  recpt.add_browser (&avlistbrowserclass);
    169224  recpt.setdefaultbrowser ("VList");
    170225
    171226  hlistbrowserclass ahlistbrowserclass;
     227  ahlistbrowserclass.set_receptionist(&recpt);
    172228  recpt.add_browser (&ahlistbrowserclass);
    173229
     230#ifdef GSDL_USE_DATELIST_BROWSER
    174231  datelistbrowserclass adatelistbrowserclass;
    175232  recpt.add_browser (&adatelistbrowserclass);
     233#endif
    176234
    177235  invbrowserclass ainvbrowserclass;
    178236  recpt.add_browser (&ainvbrowserclass);
    179237
     238#ifdef GSDL_USE_PAGED_BROWSER
    180239  pagedbrowserclass apagedbrowserclass;
    181240  recpt.add_browser (&apagedbrowserclass);
    182 
     241#endif
     242
     243#ifdef GSDL_USE_HTML_BROWSER
    183244  htmlbrowserclass ahtmlbrowserclass;
    184245  recpt.add_browser (&ahtmlbrowserclass);
    185 
     246#endif
     247
     248#ifdef GSDL_USE_PHIND_BROWSER
    186249  phindbrowserclass aphindbrowserclass;
    187250  recpt.add_browser (&aphindbrowserclass);
     251#endif
     252
     253#ifdef GSDL_USE_CLASSIFIER_BROWSER
     254  //list of classifier browsers
     255  CTreeClassifierBrowserClass *pTreeClassifierBrowser = new CTreeClassifierBrowserClass();
     256  if (pTreeClassifierBrowser != NULL) {
     257    recpt.GetClassifierBrowsers().AddBrowser(pTreeClassifierBrowser);
     258    recpt.GetClassifierBrowsers().SetDefaultBrowser(pTreeClassifierBrowser->GetBrowserName());
     259  }
     260#ifdef GSDL_USE_TREE_EX_CLASSIFIER_BROWSER
     261  CTreeExClassifierBrowserClass *pTreeExClassifierBrowser = new CTreeExClassifierBrowserClass();
     262  if (pTreeExClassifierBrowser != NULL) {
     263    recpt.GetClassifierBrowsers().AddBrowser(pTreeExClassifierBrowser);
     264  }
     265#endif //GSDL_USE_TREE_EX_CLASSIFIER_BROWSER
     266#endif //GSDL_USE_CLASSIFIER_BROWSER
    188267
    189268  cgiwrapper (recpt, "");
    190269  delete cservers;
     270
     271  // clean up the actions
     272  actionmapclass::iterator thisAction = recpt.get_actionmap_ptr()->begin();
     273  actionmapclass::iterator endAction = recpt.get_actionmap_ptr()->begin();
     274  while (thisAction != endAction) {
     275    delete thisAction->second.a; thisAction->second.a = NULL;
     276    ++thisAction;
     277  }
     278  thisAction = recpt.get_actionmap_ptr()->begin();
     279  recpt.get_actionmap_ptr()->erase(thisAction, endAction);
    191280  return 0;
    192281}
  • trunk/gsdl/src/recpt/pageaction.cpp

    r7149 r7432  
    220220          text_t collectionname = *collist_here;
    221221         
    222           if (get_info ("collection", *collist_here, metadata, false,
     222          if (get_info ("collection", *collist_here, "", metadata, false,
    223223                (*rprotolist_here).p, response, logout)) {
    224224        if (!lang.empty() && !response.docInfo[0].metadata["collectionname:"+lang].values[0].empty()) {
     
    349349          text_t alt = collectionname;
    350350
    351           if (get_info ("collection", *collist_here, metadata, false,
     351          if (get_info ("collection", *collist_here, "", metadata, false,
    352352                (*rprotolist_here).p, response, logout)) {
    353353        // get the "collectionname"
     
    501501          text_t collectionname = *collist_here;
    502502
    503           if (get_info ("collection", *collist_here, metadata, false,
     503          if (get_info ("collection", *collist_here, "", metadata, false,
    504504                (*rprotolist_here).p, response, logout)) {
    505505        if (!response.docInfo[0].metadata["collectionname"].values[0].empty()) {
     
    760760    cinfo = recpt->get_collectinfo_ptr (collectproto, arg_c, logout);
    761761   
    762     disp.setmacro ("numdocs", "Global", cinfo->numDocs);
     762    disp.setmacro ("numdocs", displayclass::defaultpackage, cinfo->numDocs);
    763763    unsigned long current_time = time(NULL);
    764764    unsigned long builddate = (current_time - cinfo->buildDate) / 86400;
    765     disp.setmacro ("builddate", "Global", builddate);
     765    disp.setmacro ("builddate", displayclass::defaultpackage, builddate);
    766766   
    767767    text_t numbytes;
     
    773773      numbytes = (text_t)cinfo->numBytes + " bytes";
    774774    }
    775     disp.setmacro("numbytes", "Global", numbytes);
     775    disp.setmacro("numbytes", displayclass::defaultpackage, numbytes);
    776776  }
    777777
     
    780780  if (arg_p == "about") {
    781781    if (cinfo == NULL) {
    782       disp.setmacro("cvariable", "Global", arg_c);
     782      disp.setmacro("cvariable", displayclass::defaultpackage, arg_c);
    783783      disp.setmacro("content", arg_p, "<p>_textbadcollection_<p>");
    784784      return;
     
    795795      check = cinfo->format.find("Usability");
    796796      if(check != cinfo->format.end()){
    797     disp.setmacro("usability","Global","_imageusab_");
    798     disp.setmacro("usabinterface","Global",("_usab"+(*check).second+"_"));
    799     disp.setmacro("usabilityscript", "Global", "_usabshowscript_");
     797    disp.setmacro("usability", displayclass::defaultpackage, "_imageusab_");
     798    disp.setmacro("usabinterface", displayclass::defaultpackage, ("_usab"+(*check).second+"_"));
     799    disp.setmacro("usabilityscript", displayclass::defaultpackage, "_usabshowscript_");
    800800      }
    801801    }
     
    821821 
    822822    if (cinfo == NULL) {
    823       disp.setmacro("cvariable", "Global", arg_c);
     823      disp.setmacro("cvariable", displayclass::defaultpackage, arg_c);
    824824      disp.setmacro("content", arg_p, "<p>_textbadcollection_<p>");
    825825      return;
     
    894894    //****************
    895895    bool getParents = false;
    896     get_children ("", args["c"], metadata, getParents, collectproto, response, logout);
     896    get_children ("", args["c"], args["l"], metadata, getParents, collectproto, response, logout);
    897897
    898898    int numbrowseoptions = response.docInfo.size();
  • trunk/gsdl/src/recpt/pagedbrowserclass.cpp

    r7379 r7432  
    6969    get_top (arg_d, top);
    7070    metadata.insert ("Title");
    71     get_children (top, args["c"], metadata, getParents, collectproto, response, logout);
     71    get_children (top, args["c"], args["l"], metadata, getParents, collectproto, response, logout);
    7272    ResultDocInfo_tarray::iterator dochere = response.docInfo.begin();
    7373    ResultDocInfo_tarray::iterator docend = response.docInfo.end();
     
    8282  } else if (!arg_d.empty() && is_top(arg_d)) { // if top level doc, check if not invisible
    8383    metadata.insert("thistype");
    84     if (get_info(arg_d, args["c"], metadata, getParents, collectproto, response, logout)) {
     84    if (get_info(arg_d, args["c"], args["l"], metadata, getParents, collectproto, response, logout)) {
    8585      text_t type = response.docInfo[0].metadata["thistype"].values[0];
    8686      if (type=="Invisible") { // display first child
  • trunk/gsdl/src/recpt/querytools.cpp

    r7391 r7432  
    544544
    545545
    546 void format_field_info(text_t & querystring, text_t &tag) {
     546void format_field_info(text_t & querystring, const text_t &tag) {
    547547
    548548  if (tag == "ZZ" || tag == "") {
  • trunk/gsdl/src/recpt/vlistbrowserclass.h

    r7392 r7432  
    2929
    3030#include "browserclass.h"
     31#include "receptionist.h"
    3132
    3233class vlistbrowserclass : public browserclass {
     
    3637  vlistbrowserclass ();
    3738  virtual ~vlistbrowserclass ();
     39
     40  void set_receptionist(receptionist *therecpt) {recpt=therecpt;}
    3841
    3942  text_t get_browser_name ();
     
    6164  virtual void get_link_icon (ResultDocInfo_t &section, cgiargsclass &args,
    6265                  const text_t &collink, text_t &link, text_t &icon);
     66
     67  receptionist *recpt;
    6368};
    6469
Note: See TracChangeset for help on using the changeset viewer.