Changeset 189
- Timestamp:
- 1999-03-05T16:53:56+13:00 (25 years ago)
- Location:
- trunk/gsdl/src/recpt
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/recpt/Makefile
r188 r189 11 11 AR = ar 12 12 CC = gcc 13 CCFLAGS = -g -Wall -Wunused -pedantic -W -Woverloaded-virtual 13 CCFLAGS = -g -Wall -Wunused -pedantic -W -Woverloaded-virtual # -Wshadow 14 14 DEFS = -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DUSE_FASTCGI -DGSDLSERVER 15 15 INCLUDES = -I../../lib -I../../packages/mg-1.3d -I../../packages/mg-1.3d/lib \ -
trunk/gsdl/src/recpt/OIDtools.cpp
r188 r189 12 12 /* 13 13 $Log$ 14 Revision 1.2 1999/03/05 03:53:53 sjboddie 15 16 fixed some bugs 17 14 18 Revision 1.1 1999/03/04 22:38:20 sjboddie 15 19 … … 24 28 // targetdoc. targetdoc will normally be either a document 25 29 // or classification OID so this returns the CLSU, HASH etc. 26 void targetdoc_gethead (const text_t &targetdoc, text_t &head) {30 void get_head (const text_t &targetdoc, text_t &head) { 27 31 28 32 head.clear(); … … 31 35 } 32 36 37 38 // returns (in top) the top level of targetdoc (i.e. everything 39 // up until the first dot) 40 void get_top (const text_t &targetdoc, text_t &top) { 41 42 top.clear(); 43 text_t::const_iterator begin = targetdoc.begin(); 44 text_t::const_iterator end = targetdoc.end(); 45 46 top.appendrange (begin, findchar(begin, end, '.')); 47 } 48 49 50 // checks if targetdoc is top level of a document (i.e. contains no dots) 51 bool is_top (const text_t &targetdoc) { 52 53 text_t::const_iterator here = targetdoc.begin(); 54 text_t::const_iterator end = targetdoc.end(); 55 here = findchar (here, end, '.'); 56 57 if (here == end) return true; 58 return false; 59 } -
trunk/gsdl/src/recpt/OIDtools.h
r188 r189 19 19 // targetdoc. targetdoc will normally be either a document 20 20 // or classification OID so this returns the CLSU, HASH etc. 21 void targetdoc_gethead (const text_t &targetdoc, text_t &head);21 void get_head (const text_t &targetdoc, text_t &head); 22 22 23 // returns (in top) the top level of targetdoc (i.e. everything 24 // up until the first dot) 25 void get_top (const text_t &targetdoc, text_t &top); 26 27 // checks if targetdoc is top level of a document (i.e. contains no dots) 28 bool is_top (const text_t &targetdoc); 23 29 24 30 -
trunk/gsdl/src/recpt/cgiwrapper.cpp
r188 r189 12 12 /* 13 13 $Log$ 14 Revision 1.10 1999/03/05 03:53:54 sjboddie 15 16 fixed some bugs 17 14 18 Revision 1.9 1999/03/04 22:38:21 sjboddie 15 19 … … 323 327 // collection then "collection" should be set, otherwise it 324 328 // should equal "". 325 void cgiwrapper (receptionist &recpt, const text_t &collection) {329 void cgiwrapper (receptionist &recpt, text_t collection) { 326 330 #ifdef USE_FASTCGI 327 331 fcgistreambuf outbuf; -
trunk/gsdl/src/recpt/cgiwrapper.h
r144 r189 21 21 // collection then "collection" should be set, otherwise it 22 22 // should equal "". 23 void cgiwrapper (receptionist &recpt, const text_t &collection);23 void cgiwrapper (receptionist &recpt, text_t collection); 24 24 25 25 -
trunk/gsdl/src/recpt/librarymain.cpp
r166 r189 12 12 /* 13 13 $Log$ 14 Revision 1.2 1999/03/05 03:53:54 sjboddie 15 16 fixed some bugs 17 14 18 Revision 1.1 1999/02/21 22:35:22 rjmcnab 15 19 … … 37 41 recpt.add_protocol (&nproto); 38 42 39 cgiwrapper (recpt, " ");43 cgiwrapper (recpt, "gberg"); 40 44 return 0; 41 45 } -
trunk/gsdl/src/recpt/receptionist.cpp
r173 r189 12 12 /* 13 13 $Log$ 14 Revision 1.10 1999/03/05 03:53:54 sjboddie 15 16 fixed some bugs 17 14 18 Revision 1.9 1999/02/28 20:00:16 rjmcnab 15 19 … … 125 129 // look in $GSDLHOME/collect/collection-name/etc/collect.cfg and 126 130 // then $GSDLHOME/etc/collect.cfg 127 t ext_t thecollectdir = filename_cat (configinfo.gsdlhome, "collect");131 thecollectdir = filename_cat (configinfo.gsdlhome, "collect"); 128 132 thecollectdir = filename_cat (thecollectdir, configinfo.collection); 129 133 text_t filename = filename_cat (thecollectdir, "etc"); … … 339 343 action *a = actions.getaction (args["a"]); 340 344 if (a != NULL) { 341 if (a->uses_display(args)) prepare_page (a, args, collectproto, disp,logout);345 if (a->uses_display(args)) prepare_page (a, args, collectproto, logout); 342 346 if (!a->do_action (args, collectproto, disp, (*outconverter), contentout, logout)) 343 347 return false; … … 553 557 // and opens the page ready for output 554 558 void receptionist::prepare_page (action *a, cgiargsclass &args, recptproto */*collectproto*/, 555 displayclass &disp,ostream &logout) {559 ostream &logout) { 556 560 557 561 // set up page parameters … … 579 583 580 584 // define general macros 581 define_general_macros ( disp,args, logout);585 define_general_macros (args, logout); 582 586 583 587 … … 598 602 } 599 603 600 void receptionist::define_general_macros (displayclass &disp, cgiargsclass &args, 601 ostream &/*logout*/) { 604 void receptionist::define_general_macros (cgiargsclass &args, ostream &/*logout*/) { 602 605 603 606 disp.setmacro ("gwcgi", "Global", configinfo.gwcgi); -
trunk/gsdl/src/recpt/receptionist.h
r173 r189 50 50 // and opens the page ready for output 51 51 void prepare_page (action *a, cgiargsclass &args, recptproto *collectproto, 52 displayclass &disp, ostream &logout); 53 void define_general_macros (displayclass &disp, cgiargsclass &args, 54 ostream &logout); 52 ostream &logout); 53 void define_general_macros (cgiargsclass &args, ostream &logout); 55 54 56 55 public: -
trunk/gsdl/src/recpt/subjectbrowseaction.cpp
r188 r189 12 12 /* 13 13 $Log$ 14 Revision 1.2 1999/03/05 03:53:56 sjboddie 15 16 fixed some bugs 17 14 18 Revision 1.1 1999/03/04 22:38:22 sjboddie 15 19 … … 21 25 #include "subjectbrowseaction.h" 22 26 #include "OIDtools.h" 23 24 27 25 28 subjectbrowseaction::subjectbrowseaction () { … … 88 91 } 89 92 90 bool subjectbrowseaction::do_action (cgiargsclass &args, recptproto * /*collectproto*/,93 bool subjectbrowseaction::do_action (cgiargsclass &args, recptproto *collectproto, 91 94 displayclass &disp, outconvertclass &outconvert, 92 ostream &textout, ostream & /*logout*/) {95 ostream &textout, ostream &logout) { 93 96 94 97 text_t browsebar, locator, output; 98 99 if (collectproto == NULL) return false; 95 100 96 101 // get browse bar unless page has been detached … … 99 104 100 105 // get top locator 101 get_top_locator(args, 0, locator);106 get_top_locator(args, collectproto, 0, locator, logout); 102 107 103 108 // expand and output page … … 122 127 123 128 void subjectbrowseaction::get_browse_bar(const text_t &classification, text_t &return_text) { 124 if (classification.empty()) return_text = "_imagebarstandard_"; 129 130 return_text = "\n\n<!-- imagebar produced by subjectbrowseaction::get_browse_bar -->\n\n"; 131 if (classification.empty()) return_text += "_imagebarstandard_"; 125 132 else { 126 133 text_t head; 127 targetdoc_gethead(classification, head);128 return_text = "_browse:imagebar" + head + "_";134 get_head(classification, head); 135 return_text += "_browse:imagebar" + head + "_"; 129 136 } 130 137 } … … 135 142 // get_top_locator returns (in return_text) the html for the top browsing section 136 143 137 void subjectbrowseaction::get_top_locator(cgiargsclass &args, int oversize, text_t &return_text) { 144 void subjectbrowseaction::get_top_locator(cgiargsclass &args, recptproto *collectproto, 145 int oversize, text_t &return_text, ostream &logout) { 138 146 139 147 text_t alphabet_arrows, doclink; … … 141 149 text_t &arg_cl = args["cl"]; 142 150 143 return_text = "<p><table width=\"100%\" cellpadding=0 cellspacing=0 border=0><tr>\n"; 151 return_text = "\n\n<!-- top_locator produced by subjectbrowseaction::get_top_locator -->\n\n"; 152 return_text += "<p><table width=\"100%\" cellpadding=0 cellspacing=0 border=0><tr>\n"; 144 153 145 154 if (args["x"] == "1") doclink = "<a href=\"_gwcgi_?e=_compressedoptions_&q=_urlsafequerystring_&x=1"; 146 155 else doclink = "<a href=\"_gwcgi_?e=_compressedoptions_&q=_urlsafequerystring_"; 147 156 148 /* // get book cover jpeg and detach/expand/collapse buttons 149 if (!arg_d.empty() && !is_top_level(arg_d)) { 150 text_t book_top, jpeg_file; 151 gdbm_info info; 152 get_book_top(booksection, book_top); 157 // get book cover jpeg and detach/expand/collapse buttons 158 // if (!arg_d.empty() && !is_top (arg_d)) { 159 text_t top, jpeg_file; 160 get_top(arg_d, top); 161 162 comerror_t err; 163 MetadataResponse_t resp; 164 MetadataRequest_t req; 165 req.OIDs.push_back (top); 166 req.fields.push_back ("jobnum"); 167 168 collectproto->get_metadata (args["c"], req, resp, err, logout); 169 170 /* 153 171 gdbm.getinfo(book_top, info); 154 172 -
trunk/gsdl/src/recpt/subjectbrowseaction.h
r188 r189 22 22 protected: 23 23 void get_browse_bar(const text_t &classification, text_t &return_text); 24 void get_top_locator(cgiargsclass &args, int oversize, text_t &return_text); 24 void get_top_locator(cgiargsclass &args, recptproto *collectproto, 25 int oversize, text_t &return_text, ostream &logout); 25 26 26 27 public:
Note:
See TracChangeset
for help on using the changeset viewer.