Changeset 362 for trunk/gsdl/src/recpt/receptionist.cpp
- Timestamp:
- 1999-07-11T10:18:26+12:00 (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/recpt/receptionist.cpp
r297 r362 12 12 /* 13 13 $Log$ 14 Revision 1.17 1999/07/10 22:18:26 rjmcnab 15 Added calls to define_external_cgiargs. 16 14 17 Revision 1.16 1999/06/27 21:49:03 sjboddie 15 18 fixed a couple of version conflicts - tidied up some small things … … 261 264 add_default_args (argsinfo, args, logout); 262 265 266 267 // get the input encoding 268 text_t &arg_w = args["w"]; 269 inconvertclass defaultinconvert; 270 inconvertclass *inconvert = converters.get_inconverter (arg_w); 271 if (inconvert == NULL) inconvert = &defaultinconvert; 272 273 // see if the next page will have a different encoding 274 if (args.getarg("nw") != NULL) arg_w = args["nw"]; 275 276 // convert arguments which aren't in unicode to unicode 277 args_tounicode (args, *inconvert); 278 279 280 // decide on the output conversion class (needed for checking the external 281 // cgi arguments) 282 rzwsoutconvertclass defaultoutconverter; 283 rzwsoutconvertclass *outconverter = converters.get_outconverter (arg_w); 284 if (outconverter == NULL) outconverter = &defaultoutconverter; 285 outconverter->reset(); 286 287 263 288 // check the main cgi arguments 264 289 if (!check_mainargs (args, logout)) return false; … … 275 300 } 276 301 277 // get the input encoding 278 text_t &arg_w = args["w"]; 279 inconvertclass defaultinconvert; 280 inconvertclass *inconvert = converters.get_inconverter (arg_w); 281 if (inconvert == NULL) inconvert = &defaultinconvert; 282 283 // see if the next page will have a different encoding 284 if (args.getarg("nw") != NULL) args["w"] = args["nw"]; 285 286 // convert arguments which aren't in unicode to unicode 287 args_tounicode (args, *inconvert); 302 // check external cgi arguments for each action 303 actionptrmap::iterator actionhere = actions.begin (); 304 actionptrmap::iterator actionend = actions.end (); 305 while (actionhere != actionend) { 306 assert ((*actionhere).second.a != NULL); 307 if ((*actionhere).second.a != NULL) { 308 if (!(*actionhere).second.a->check_external_cgiargs (argsinfo, args, *outconverter, 309 configinfo.saveconf, logout)) 310 return false; 311 } 312 actionhere++; 313 } 314 315 // the action might have changed but we will assume that 316 // the cgiargs were checked properly when the change was made 288 317 289 318 return true; … … 399 428 // returns the compressed argument ("e") corresponding to the argument 400 429 // list. This can be used to save preferences between sessions. 401 text_t receptionist::get_compressed_arg (cgiargsclass &args, outconvertclass &outconvert, 402 ostream &logout) { 403 430 text_t receptionist::get_compressed_arg (cgiargsclass &args, ostream &logout) { 431 // decide on the output conversion class 432 text_t &arg_w = args["w"]; 433 rzwsoutconvertclass defaultoutconverter; 434 rzwsoutconvertclass *outconverter = converters.get_outconverter (arg_w); 435 if (outconverter == NULL) outconverter = &defaultoutconverter; 436 outconverter->reset(); 437 404 438 text_t compressed_args; 405 439 if (compress_save_args (argsinfo, configinfo.saveconf, args, 406 compressed_args, outconvert, logout))440 compressed_args, *outconverter, logout)) 407 441 return compressed_args; 408 else 409 442 443 return ""; 410 444 } 411 445 … … 634 668 } 635 669 636 void receptionist::define_general_macros (cgiargsclass &args, outconvertclass & outconvert,670 void receptionist::define_general_macros (cgiargsclass &args, outconvertclass &/*outconvert*/, 637 671 ostream &logout) { 638 672 disp.setmacro ("gwcgi", "Global", configinfo.gwcgi); 639 673 disp.setmacro ("httpimg", "Global", configinfo.httpimg); 640 674 disp.setmacro ("httpprefix", "Global", configinfo.httpprefix); 641 disp.setmacro("compressedoptions", "Global", get_compressed_arg(args, outconvert,logout));675 disp.setmacro("compressedoptions", "Global", get_compressed_arg(args, logout)); 642 676 643 677 // set _cgiargX_ macros for each cgi argument
Note:
See TracChangeset
for help on using the changeset viewer.