Changeset 418 for trunk/gsdl/src/recpt/receptionist.cpp
- Timestamp:
- 1999-07-30T14:13:10+12:00 (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/recpt/receptionist.cpp
r388 r418 12 12 /* 13 13 $Log$ 14 Revision 1.20 1999/07/30 02:13:09 sjboddie 15 -added collectinfo argument to some functions 16 -made some function prototypes virtual 17 14 18 Revision 1.19 1999/07/15 06:02:05 rjmcnab 15 19 Moved the setting of argsinfo into the constructor. Added the configuration … … 264 268 text_t filename = filename_cat (thecollectdir, "etc"); 265 269 filename = filename_cat (filename, "collect.cfg"); 270 266 271 if (!file_exists(filename)) thecollectdir = configinfo.gsdlhome; 267 272 } … … 507 512 if (a != NULL) { 508 513 if (a->uses_display(args)) prepare_page (a, args, collectproto, (*outconverter), logout); 509 if (!a->do_action (args, collectproto, disp, (*outconverter), contentout, logout)) 514 if (!a->do_action (args, collectinfo, collectproto, disp, 515 (*outconverter), contentout, logout)) 510 516 return false; 511 517 … … 643 649 } 644 650 645 // prepare_page sets up page parameters, sets display macros 646 // and opens the page ready for output651 // prepare_page sets up page parameters, sets display macros, 652 // gets format information and opens the page ready for output 647 653 void receptionist::prepare_page (action *a, cgiargsclass &args, recptproto *collectproto, 648 654 outconvertclass &outconvert, ostream &logout) { 649 655 // set up page parameters 650 656 text_t pageparams; 657 text_t &collection = args["c"]; 651 658 652 659 bool first = true; 653 if (! args["c"].empty()) {654 pageparams += "collection=" + args["c"]; first = false;}660 if (!collection.empty()) { 661 pageparams += "collection=" + collection; first = false;} 655 662 if (args.getintarg("u") == 1) 656 663 if (first) {pageparams += "style=htmlonly"; first = false;} … … 666 673 else pageparams += ",language=" + args["l"]; 667 674 675 // get collection information 676 collectinfo.clear(); 677 if (!collection.empty()) { 678 comerror_t err; 679 collectproto->get_collectinfo (collection, collectinfo, err, logout); 680 if (err != noError) collectinfo.clear(); 681 } 682 668 683 // open the page 669 684 disp.openpage(pageparams, MACROPRECEDENCE); … … 681 696 assert ((*actionhere).second.a != NULL); 682 697 if ((*actionhere).second.a != NULL) 683 (*actionhere).second.a->define_external_macros ( disp, args, collectproto, logout);698 (*actionhere).second.a->define_external_macros (collectinfo, disp, args, collectproto, logout); 684 699 actionhere++; 685 700 } 686 701 687 688 702 // define internal macros for the current action 689 a->define_internal_macros ( disp, args, collectproto, logout);703 a->define_internal_macros (collectinfo, disp, args, collectproto, logout); 690 704 } 691 705
Note:
See TracChangeset
for help on using the changeset viewer.