Changeset 2785 for trunk/gsdl/src
- Timestamp:
- 2001-10-09T17:21:29+13:00 (23 years ago)
- Location:
- trunk/gsdl/src/recpt
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/recpt/collectoraction.cpp
r2774 r2785 1030 1030 // _faillog_ - set to last 6 lines of .bld file if build failed 1031 1031 // _gsdlhome_ - the gsdlhome path (dm_safe) 1032 1033 1032 // _sourcelist_ -- "input source" text boxes 1034 1033 // _badsources_ -- will be set to "1" if we've come from the … … 1154 1153 collectorbar += get_button (collector_page, "grey", "view", false); 1155 1154 } 1155 1156 collectorbar += "</tr></table>\n"; 1157 disp.setmacro ("collectorbar", "collector", collectorbar); 1156 1158 1157 1159 if (collector_page == "bildfail") { … … 1175 1177 disp.setmacro ("faillog", "collector", dm_safe(faillog)); 1176 1178 } 1177 1178 collectorbar += "</tr></table>\n";1179 disp.setmacro ("collectorbar", "collector", collectorbar);1180 1179 1181 1180 if (collector_page == "srce" || collector_page == "existing") … … 1659 1658 } 1660 1659 1660 text_t collectdir = get_collectdir (args); 1661 1661 1662 // set up build options 1662 1663 text_t options = "-make_writable -remove_import -out \""; 1663 1664 options += filename_cat (tmpdir, collection + ".bld"); 1664 options += "\" -collectdir \"" + get_collectdir (args) + "\""; 1665 options += "\" -collectdir \"" + collectdir + "\" -statsfile \""; 1666 options += filename_cat(collectdir, collection, "etc", "import.log") + "\""; 1665 1667 1666 1668 if (args["bc1esrce"] == 1) { -
trunk/gsdl/src/recpt/pageaction.cpp
r2782 r2785 28 28 #include "receptionist.h" 29 29 #include "fileutil.h" 30 #include "gsdltools.h" 30 31 #include <time.h> 31 32 … … 327 328 } 328 329 330 void pageaction::set_macro_to_file_contents (displayclass &disp, const text_t ¯oname, 331 const text_t &packagename, const text_t &filename) { 332 333 text_t filecontent; 334 char *filenamec = filename.getcstr(); 335 ifstream file_in (filenamec); 336 delete filenamec; 337 if (file_in) { 338 char c; 339 file_in.get(c); 340 while (!file_in.eof ()) { 341 if (c == '\n') filecontent += "<br>"; 342 filecontent.push_back(c); 343 file_in.get(c); 344 } 345 file_in.close(); 346 } 347 disp.setmacro (macroname, packagename, dm_safe(filecontent)); 348 } 349 329 350 void pageaction::define_internal_macros (displayclass &disp, cgiargsclass &args, 330 351 recptprotolistclass *protos, ostream &logout) { … … 383 404 // if page is "docs" 384 405 // _documentation_ links to PDF documents if they're available 406 407 408 // if page is "bsummary" 409 // _importlog_ set to contents of collections import.log file 410 // _faillog_ set to contents of collections fail.log file 385 411 386 412 … … 418 444 //setting _queryformcontent_ so that the query interface is consistent. 419 445 if(arg_p == "about"){ 420 text_t collection = args["c"]; 421 //check that the protocol is alive 422 recptproto* colproto = protos->getrecptproto (collection, logout); 423 if(colproto == NULL) { 424 logout << "ERROR: Null collection protocol trying to query" 425 << collection.getcstr() << "\n"; 426 return; 427 } 428 429 //check the collection is responding/in place 430 ColInfoResponse_t *colinfo = recpt->get_collectinfo_ptr(colproto, collection, 431 logout); 432 if(colinfo == NULL){ 433 logout << "ERROR: Null returned for get_collectinfo_ptr on " 434 << collection.getcstr() << "in queryaction::define_query_interface\n"; 435 return; 436 } 437 438 439 text_tmap::iterator check = colinfo->format.find("QueryInterface"); 440 if(check != colinfo->format.end()){ 441 if((*check).second=="DateSearch"){ 442 text_t current = "_basicqueryform_ _datesearch_"; 446 if (cinfo != NULL) { 447 text_tmap::iterator check = cinfo->format.find("QueryInterface"); 448 if(check != cinfo->format.end()){ 449 if((*check).second=="DateSearch"){ 450 text_t current = "_basicqueryform_ _datesearch_"; 443 451 444 disp.setmacro("queryformcontent","query",current); 445 } 446 } 447 } 448 449 452 disp.setmacro("queryformcontent","query",current); 453 } 454 } 455 } 456 } 450 457 451 458 if (arg_p == "home") { … … 454 461 if (collector_disabled) disp.setmacro ("textgocollector", "home", ""); 455 462 } 456 457 458 459 463 460 464 else if (arg_p == "preferences") { … … 462 466 // _collectionoption_ 463 467 464 if ( args["ccs"] == "1" && collectproto != NULL&& (cinfo->ccsCols.size() > 1)) {468 if ((args["ccs"] == "1") && (cinfo->ccsCols.size() > 1)) { 465 469 text_t collectionoption = "_textcollectionoption_"; 466 470 text_tarray::const_iterator col_here = cinfo->ccsCols.begin(); … … 675 679 set_documentation_macro (disp); 676 680 681 } else if (arg_p == "bsummary" && !arg_c.empty()) { 682 683 set_macro_to_file_contents (disp, "importlog", "bsummary", 684 filename_cat(gsdlhome, "collect", arg_c, "etc", "import.log")); 685 set_macro_to_file_contents (disp, "faillog", "bsummary", 686 filename_cat(gsdlhome, "collect", arg_c, "etc", "fail.log")); 677 687 } 678 688 } -
trunk/gsdl/src/recpt/pageaction.h
r2767 r2785 75 75 void set_documentation_macro (displayclass &disp); 76 76 77 void set_macro_to_file_contents (displayclass &disp, const text_t ¯oname, 78 const text_t &packagename, const text_t &filename); 79 77 80 bool status_disabled; 78 81 bool collector_disabled;
Note:
See TracChangeset
for help on using the changeset viewer.