Changeset 296 for trunk/gsdl/src/recpt


Ignore:
Timestamp:
1999-06-26T13:14:32+12:00 (25 years ago)
Author:
rjmcnab
Message:

Made a couple of changes to handle different encodings.

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

Legend:

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

    r263 r296  
    1212/*
    1313   $Log$
     14   Revision 1.15  1999/06/26 01:14:32  rjmcnab
     15   Made a couple of changes to handle different encodings.
     16
    1417   Revision 1.14  1999/06/09 00:08:36  sjboddie
    1518   query string macro (_cgiargq_) is now made html safe before being set
     
    362365  action *a = actions.getaction (args["a"]);
    363366  if (a != NULL) {
    364     if (a->uses_display(args)) prepare_page (a, args, collectproto, logout);
     367    if (a->uses_display(args)) prepare_page (a, args, collectproto, (*outconverter), logout);
    365368    if (!a->do_action (args, collectproto, disp, (*outconverter), contentout, logout))
    366369      return false;
     
    392395// returns the compressed argument ("e") corresponding to the argument
    393396// list. This can be used to save preferences between sessions.
    394 text_t receptionist::get_compressed_arg (cgiargsclass &args, ostream &logout) {
    395 
     397text_t receptionist::get_compressed_arg (cgiargsclass &args, outconvertclass &outconvert,
     398                     ostream &logout) {
     399 
    396400  text_t compressed_args;
    397401  if (compress_save_args (argsinfo, configinfo.saveconf, args,
    398               compressed_args, logout))
     402              compressed_args, outconvert, logout))
    399403    return compressed_args;
    400404  else
     
    581585// prepare_page sets up page parameters, sets display macros
    582586// and opens the page ready for output
    583 void receptionist::prepare_page (action *a, cgiargsclass &args, recptproto *collectproto,
    584                  ostream &logout) {
    585  
     587void receptionist::prepare_page (action *a, cgiargsclass &args, recptproto *collectproto,
     588                 outconvertclass &outconvert, ostream &logout) {
    586589  // set up page parameters
    587590  text_t pageparams;
     
    608611
    609612  // define general macros
    610   define_general_macros (args, logout);
     613  define_general_macros (args, outconvert, logout);
    611614
    612615 
     
    627630}
    628631
    629 void receptionist::define_general_macros (cgiargsclass &args, ostream &logout) {
    630 
     632void receptionist::define_general_macros (cgiargsclass &args, outconvertclass &outconvert,
     633                      ostream &logout) {
    631634  disp.setmacro ("gwcgi", "Global", configinfo.gwcgi);
    632635  disp.setmacro ("httpimg", "Global", configinfo.httpimg);
    633   disp.setmacro("compressedoptions", "Global", get_compressed_arg(args, logout));
     636  disp.setmacro("compressedoptions", "Global", get_compressed_arg(args, outconvert, logout));
    634637
    635638  // set _cgiargX_ macros for each cgi argument
     
    639642    if ((*argshere).first == "q")
    640643      // need to escape special characters from query string
    641       disp.setmacro ("cgiargq", "Global", html_safe((*argshere).second));     
     644      disp.setmacro ("cgiargq", "Global", html_safe((*argshere).second));
    642645    else
    643646      disp.setmacro ("cgiarg" + (*argshere).first, "Global", (*argshere).second);
  • trunk/gsdl/src/recpt/receptionist.h

    r248 r296  
    4747  displayclass disp;
    4848  convertinfoclass converters;
     49 
    4950  // prepare_page sets up page parameters, sets display macros
    5051  // and opens the page ready for output
    51   void prepare_page (action *a, cgiargsclass &args, recptproto *collectproto,
    52              ostream &logout);
    53   void define_general_macros (cgiargsclass &args, ostream &logout);
     52  void prepare_page (action *a, cgiargsclass &args, recptproto *collectproto,
     53             outconvertclass &outconvert, ostream &logout);
     54  void define_general_macros (cgiargsclass &args, outconvertclass &outconvert,
     55                  ostream &logout);
    5456
    5557public:
     
    130132  // returns the compressed argument ("e") corresponding to the argument
    131133  // list. This can be used to save preferences between sessions.
    132   text_t get_compressed_arg (cgiargsclass &args, ostream &logout);
     134  text_t get_compressed_arg (cgiargsclass &args, outconvertclass &outconvert,
     135                 ostream &logout);
    133136
    134137protected:
Note: See TracChangeset for help on using the changeset viewer.