Changeset 7432
- Timestamp:
- 2004-05-25T16:31:41+12:00 (20 years ago)
- Location:
- trunk/gsdl/src/recpt
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/recpt/action.cpp
r7423 r7432 79 79 cgiargsclass &/*args*/, 80 80 outconvertclass &/*outconvert*/, 81 const text_t array&/*saveconf*/,81 const text_t &/*saveconf*/, 82 82 ostream &/*logout*/) { 83 83 return true; -
trunk/gsdl/src/recpt/action.h
r7423 r7432 81 81 cgiargsclass &args, 82 82 outconvertclass &outconvert, 83 const text_t array&saveconf,83 const text_t &saveconf, 84 84 ostream &logout); 85 85 -
trunk/gsdl/src/recpt/authenaction.cpp
r7425 r7432 162 162 cgiargsclass &args, 163 163 outconvertclass &outconvert, 164 const text_t array&saveconf,164 const text_t &saveconf, 165 165 ostream &logout) { 166 166 … … 310 310 311 311 // get a list of saved configuration arguments (if possible) 312 text_t saveconf; 312 313 text_tset saveconfset; 313 314 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); 320 317 } 321 318 -
trunk/gsdl/src/recpt/authenaction.h
r7425 r7432 65 65 cgiargsclass &args, 66 66 outconvertclass &outconvert, 67 const text_t array&saveconf,67 const text_t &saveconf, 68 68 ostream &logout); 69 69 -
trunk/gsdl/src/recpt/browsetools.cpp
r7193 r7432 126 126 parse_formatstring (formatinfo.DocumentHeading, formatlistptr, metadata, getParents); 127 127 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)) 129 129 return; 130 130 … … 159 159 parse_formatstring (formatinfo.RelatedDocuments, formatlistptr, metadata, getParents); 160 160 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)) 162 162 return; 163 163 … … 223 223 224 224 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); 226 226 ResultDocInfo_tarray::iterator thisdoc = tmp.docInfo.begin(); 227 227 ResultDocInfo_tarray::iterator lastdoc = tmp.docInfo.end(); … … 286 286 metadata.insert (classifytype); 287 287 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)) 289 289 return; 290 290 classifytype = response.docInfo[0].metadata[classifytype].values[0]; … … 328 328 329 329 // 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)) 331 331 return; 332 332 … … 474 474 get_top (args["cl"], classification); 475 475 476 bool haschildren = has_children (OID, args["c"], collectproto, logout);476 bool haschildren = has_children (OID, args["c"], args["l"], collectproto, logout); 477 477 478 478 if ((!args["d"].empty()) && fulltoc) … … 486 486 metadata.insert ("childtype"); 487 487 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)) 489 489 return; 490 490 … … 494 494 browsermap, formatinfo, formatlistmap); 495 495 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)) 497 497 return; 498 498 … … 541 541 542 542 if (haschildren) 543 get_children (OID, args["c"], metadata, getParents,543 get_children (OID, args["c"], args["l"], metadata, getParents, 544 544 collectproto, response, logout); 545 545 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, 547 547 collectproto, response, logout); 548 548 haschildren = true; … … 576 576 if (OID.empty()) OID = args["cl"]; 577 577 578 bool haschildren = has_children (OID, args["c"], collectproto, logout);578 bool haschildren = has_children (OID, args["c"], args["l"], collectproto, logout); 579 579 580 580 // get parents list … … 597 597 metadata.insert ("thistype"); 598 598 599 get_info ( topOID, args["c"], metadata, getParents, collectproto, response, logout);599 get_info ( topOID, args["c"], args["l"], metadata, getParents, collectproto, response, logout); 600 600 if (!response.docInfo[0].metadata["thistype"].values.empty()) 601 601 classifytype = response.docInfo[0].metadata["thistype"].values[0]; … … 617 617 metadata.insert ("haschildren"); 618 618 619 get_info (topOID, args["c"], metadata, getParents, collectproto, response, logout);619 get_info (topOID, args["c"], args["l"], metadata, getParents, collectproto, response, logout); 620 620 621 621 // ouput top OID section … … 656 656 657 657 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); 659 659 get_top (OID, classification); 660 660 … … 683 683 684 684 if (haschildren) 685 get_children (OID, args["c"], metadata, getParents,685 get_children (OID, args["c"], args["l"], metadata, getParents, 686 686 collectproto, response, logout); 687 687 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, 689 689 collectproto, response, logout); 690 690 haschildren = true; … … 713 713 if (tabcount) pOID = parents[tabcount-1]; 714 714 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); 716 716 717 717 // get classifytype of this level … … 738 738 use_table = is_table_content (formatlistptr); 739 739 740 get_children (OID, args["c"], metadata, getParents, collectproto, response, logout);740 get_children (OID, args["c"], args["l"], metadata, getParents, collectproto, response, logout); 741 741 742 742 ResultDocInfo_tarray::iterator thissibling = response.docInfo.begin(); -
trunk/gsdl/src/recpt/cgiutils.cpp
r3670 r7432 117 117 args.clear(); 118 118 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(); 121 121 text_t key, value; 122 122 … … 544 544 char *n = name.getcstr(); 545 545 char *v = getenv(n); 546 delete n;546 delete []n; 547 547 if (v != NULL) return v; 548 return "";548 return g_EmptyText; 549 549 550 550 } else return fcgienv[name]; -
trunk/gsdl/src/recpt/documentaction.cpp
r7333 r7432 297 297 // get metadata for parent document 298 298 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)) { 300 300 text_t url = filt_response.docInfo[0].metadata["URL"].values[0]; 301 301 … … 571 571 metadata.insert ("mdtype"); // in case there is a datelist 572 572 bool getParents = false; 573 get_children ("", collection, metadata, getParents, collectproto, response, logout);573 get_children ("", collection, args["l"], metadata, getParents, collectproto, response, logout); 574 574 575 575 bool has_search_button = true; … … 608 608 recptproto *collectproto = protos->getrecptproto (args["c"], logout); 609 609 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)) { 611 611 if (!response.docInfo[0].metadata["section"].values[0].empty()) { 612 612 outlink = "_httpdocument_&d=" + response.docInfo[0].metadata["section"].values[0]; … … 631 631 collectproto = protos->getrecptproto (*col_here, logout); 632 632 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)) { 634 634 if (!response.docInfo[0].metadata["section"].values[0].empty()) { 635 635 outlink = "_httpdocument_&c=" + *col_here + "&d=" + … … 786 786 //related documents in a vertical list. This is the default format. 787 787 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)) 789 789 relation += get_related_docs(collection, collectproto, response.docInfo[0], logout); 790 790 … … 796 796 797 797 // 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, 799 799 true, collectproto, response, logout)) { 800 800 … … 856 856 metadata.insert ("parameters"); 857 857 858 if (get_info (classtop, collection, metadata, false, collectproto, response, logout)) {858 if (get_info (classtop, collection, args["l"], metadata, false, collectproto, response, logout)) { 859 859 860 860 text_t &title = response.docInfo[0].metadata["Title"].values[0]; … … 1127 1127 } 1128 1128 1129 if (get_info (OID, collection, metadata, getParents, collectproto, inforesponse, logout)) {1129 if (get_info (OID, collection, args["l"], metadata, getParents, collectproto, inforesponse, logout)) { 1130 1130 int hastxt = inforesponse.docInfo[0].metadata["hastxt"].values[0].getint(); 1131 1131 int haschildren = inforesponse.docInfo[0].metadata["haschildren"].values[0].getint(); … … 1152 1152 if (args["d"].empty()) is_classify = true; 1153 1153 1154 get_contents (exOID, is_classify, metadata, collection, 1154 get_contents (exOID, is_classify, metadata, collection, args["l"], 1155 1155 collectproto, inforesponse, logout); 1156 1156 … … 1218 1218 // get info on current section 1219 1219 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)) { 1221 1221 logout << "error 1 in documentaction::set_arrow_macros\n"; 1222 1222 return; … … 1229 1229 text_t thisoid = arg_d; 1230 1230 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, 1232 1232 collectproto, response, logout); 1233 1233 ResultDocInfo_tarray::iterator this_sibling = response.docInfo.begin(); … … 1242 1242 // down to the last descendant 1243 1243 while (section_has_children) { 1244 get_children (previous_sibling, args["c"], metadata, false,1244 get_children (previous_sibling, args["c"], args["l"], metadata, false, 1245 1245 collectproto, presponse, logout); 1246 1246 if (!presponse.docInfo.empty()) { -
trunk/gsdl/src/recpt/formattools.cpp
r7389 r7432 405 405 406 406 //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, 408 408 false, collectproto, response, logout)) { 409 409 … … 437 437 438 438 //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, 440 440 false, collectproto, response, logout)) { 441 441 … … 1296 1296 1297 1297 // retrieve metadata 1298 get_info(docinfo.OID, collection, request.fields, request.getParents,1298 get_info(docinfo.OID, collection, "", request.fields, request.getParents, 1299 1299 collectproto, response, logout); 1300 1300 -
trunk/gsdl/src/recpt/gsdl_modules_cfg.h
r7392 r7432 52 52 #define GSDL_USE_AUTHEN_ACTION 53 53 #define GSDL_USE_BROWSE_ACTION 54 #undef GSDL_USE_CL_DISPLAY_ACTION55 54 #define GSDL_USE_COLLECTOR_ACTION 56 #undef GSDL_USE_COURSES_ACTION57 #undef GSDL_USE_DIR_BROWSE_ACTION58 #undef GSDL_USE_EXPORT_ACTION59 55 #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 63 57 #define GSDL_USE_PHIND_ACTION 64 58 #define GSDL_USE_PING_ACTION … … 66 60 #define GSDL_USE_TIP_ACTION 67 61 #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 68 70 69 71 //BROWSER MODULES -
trunk/gsdl/src/recpt/historydb.cpp
r1913 r7432 252 252 FilterResponse_t response; 253 253 254 get_info("collection", collect, metadata, false, collectproto, response, logout);254 get_info("collection", collect, args["l"], metadata, false, collectproto, response, logout); 255 255 text_t index = response.docInfo[0].metadata[argsinfo["h"]].values[0]; 256 256 if (!index.empty()) { -
trunk/gsdl/src/recpt/hlistbrowserclass.cpp
r7392 r7432 75 75 OIDs.push_back (OID + ".fc"); 76 76 77 get_info (OIDs, args["c"], metadata, false, collectproto, response, logout);77 get_info (OIDs, args["c"], args["l"], metadata, false, collectproto, response, logout); 78 78 79 79 OID = response.docInfo[1].OID; … … 99 99 FilterResponse_t response; 100 100 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, 102 102 collectproto, response, logout); 103 103 -
trunk/gsdl/src/recpt/hlistbrowserclass.h
r7392 r7432 29 29 30 30 #include "browserclass.h" 31 #include "receptionist.h" 31 32 32 33 class hlistbrowserclass : public browserclass { … … 36 37 hlistbrowserclass (); 37 38 virtual ~hlistbrowserclass (); 39 40 void set_receptionist(receptionist *therecpt) {recpt=therecpt;} 38 41 39 42 // returns the name that specifies the browserclass type … … 61 64 outconvertclass &outconvert, ostream &textout, ostream &logout); 62 65 66 protected: 67 receptionist *recpt; 63 68 }; 64 69 -
trunk/gsdl/src/recpt/librarymain.cpp
r4122 r7432 24 24 *********************************************************************/ 25 25 26 #include "gsdl_modules_cfg.h" 26 27 #include "receptionist.h" 27 28 #include "cgiwrapper.h" 29 #include "recptconfig.h" 28 30 #include "fileutil.h" 29 31 #include "nullproto.h" … … 53 55 #include "usersaction.h" 54 56 #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 55 86 #include "tipaction.h" 56 87 #include "collectoraction.h" 57 88 #include "browseaction.h" 58 89 #include "phindaction.h" 59 #if defined( USE_LANGACTION)90 #if defined(GSDL_USE_LANG_ACTION) 60 91 #include "langaction.h" 61 92 #endif … … 69 100 #include "htmlbrowserclass.h" 70 101 #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 71 112 72 113 int main () { … … 113 154 #endif 114 155 156 #ifdef GSDL_USE_TIP_ACTION 115 157 // 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); 164 218 #endif 165 219 166 220 // list of browsers 167 221 vlistbrowserclass avlistbrowserclass; 222 avlistbrowserclass.set_receptionist(&recpt); 168 223 recpt.add_browser (&avlistbrowserclass); 169 224 recpt.setdefaultbrowser ("VList"); 170 225 171 226 hlistbrowserclass ahlistbrowserclass; 227 ahlistbrowserclass.set_receptionist(&recpt); 172 228 recpt.add_browser (&ahlistbrowserclass); 173 229 230 #ifdef GSDL_USE_DATELIST_BROWSER 174 231 datelistbrowserclass adatelistbrowserclass; 175 232 recpt.add_browser (&adatelistbrowserclass); 233 #endif 176 234 177 235 invbrowserclass ainvbrowserclass; 178 236 recpt.add_browser (&ainvbrowserclass); 179 237 238 #ifdef GSDL_USE_PAGED_BROWSER 180 239 pagedbrowserclass apagedbrowserclass; 181 240 recpt.add_browser (&apagedbrowserclass); 182 241 #endif 242 243 #ifdef GSDL_USE_HTML_BROWSER 183 244 htmlbrowserclass ahtmlbrowserclass; 184 245 recpt.add_browser (&ahtmlbrowserclass); 185 246 #endif 247 248 #ifdef GSDL_USE_PHIND_BROWSER 186 249 phindbrowserclass aphindbrowserclass; 187 250 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 188 267 189 268 cgiwrapper (recpt, ""); 190 269 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); 191 280 return 0; 192 281 } -
trunk/gsdl/src/recpt/pageaction.cpp
r7149 r7432 220 220 text_t collectionname = *collist_here; 221 221 222 if (get_info ("collection", *collist_here, metadata, false,222 if (get_info ("collection", *collist_here, "", metadata, false, 223 223 (*rprotolist_here).p, response, logout)) { 224 224 if (!lang.empty() && !response.docInfo[0].metadata["collectionname:"+lang].values[0].empty()) { … … 349 349 text_t alt = collectionname; 350 350 351 if (get_info ("collection", *collist_here, metadata, false,351 if (get_info ("collection", *collist_here, "", metadata, false, 352 352 (*rprotolist_here).p, response, logout)) { 353 353 // get the "collectionname" … … 501 501 text_t collectionname = *collist_here; 502 502 503 if (get_info ("collection", *collist_here, metadata, false,503 if (get_info ("collection", *collist_here, "", metadata, false, 504 504 (*rprotolist_here).p, response, logout)) { 505 505 if (!response.docInfo[0].metadata["collectionname"].values[0].empty()) { … … 760 760 cinfo = recpt->get_collectinfo_ptr (collectproto, arg_c, logout); 761 761 762 disp.setmacro ("numdocs", "Global", cinfo->numDocs);762 disp.setmacro ("numdocs", displayclass::defaultpackage, cinfo->numDocs); 763 763 unsigned long current_time = time(NULL); 764 764 unsigned long builddate = (current_time - cinfo->buildDate) / 86400; 765 disp.setmacro ("builddate", "Global", builddate);765 disp.setmacro ("builddate", displayclass::defaultpackage, builddate); 766 766 767 767 text_t numbytes; … … 773 773 numbytes = (text_t)cinfo->numBytes + " bytes"; 774 774 } 775 disp.setmacro("numbytes", "Global", numbytes);775 disp.setmacro("numbytes", displayclass::defaultpackage, numbytes); 776 776 } 777 777 … … 780 780 if (arg_p == "about") { 781 781 if (cinfo == NULL) { 782 disp.setmacro("cvariable", "Global", arg_c);782 disp.setmacro("cvariable", displayclass::defaultpackage, arg_c); 783 783 disp.setmacro("content", arg_p, "<p>_textbadcollection_<p>"); 784 784 return; … … 795 795 check = cinfo->format.find("Usability"); 796 796 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_"); 800 800 } 801 801 } … … 821 821 822 822 if (cinfo == NULL) { 823 disp.setmacro("cvariable", "Global", arg_c);823 disp.setmacro("cvariable", displayclass::defaultpackage, arg_c); 824 824 disp.setmacro("content", arg_p, "<p>_textbadcollection_<p>"); 825 825 return; … … 894 894 //**************** 895 895 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); 897 897 898 898 int numbrowseoptions = response.docInfo.size(); -
trunk/gsdl/src/recpt/pagedbrowserclass.cpp
r7379 r7432 69 69 get_top (arg_d, top); 70 70 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); 72 72 ResultDocInfo_tarray::iterator dochere = response.docInfo.begin(); 73 73 ResultDocInfo_tarray::iterator docend = response.docInfo.end(); … … 82 82 } else if (!arg_d.empty() && is_top(arg_d)) { // if top level doc, check if not invisible 83 83 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)) { 85 85 text_t type = response.docInfo[0].metadata["thistype"].values[0]; 86 86 if (type=="Invisible") { // display first child -
trunk/gsdl/src/recpt/querytools.cpp
r7391 r7432 544 544 545 545 546 void format_field_info(text_t & querystring, text_t &tag) {546 void format_field_info(text_t & querystring, const text_t &tag) { 547 547 548 548 if (tag == "ZZ" || tag == "") { -
trunk/gsdl/src/recpt/vlistbrowserclass.h
r7392 r7432 29 29 30 30 #include "browserclass.h" 31 #include "receptionist.h" 31 32 32 33 class vlistbrowserclass : public browserclass { … … 36 37 vlistbrowserclass (); 37 38 virtual ~vlistbrowserclass (); 39 40 void set_receptionist(receptionist *therecpt) {recpt=therecpt;} 38 41 39 42 text_t get_browser_name (); … … 61 64 virtual void get_link_icon (ResultDocInfo_t §ion, cgiargsclass &args, 62 65 const text_t &collink, text_t &link, text_t &icon); 66 67 receptionist *recpt; 63 68 }; 64 69
Note:
See TracChangeset
for help on using the changeset viewer.