Changeset 12019
- Timestamp:
- 2006-07-05T16:32:09+12:00 (18 years ago)
- Location:
- trunk/gsdl/src/recpt
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/recpt/depositoraction.cpp
r12008 r12019 318 318 319 319 320 /* TO BE DELETED WHEN I'M SURE ITS NOT NEEDED320 /* ***** TO BE DELETED WHEN I'M SURE ITS NOT NEEDED 321 321 //obtain fields from form 322 322 // Iterate through the vector, and store in args … … 336 336 args["di1lastpage"] = "0"; 337 337 338 // assign (and create) a temporary directory 339 // This will create a new tbuild directory every time 340 // the user goes back to select a new collection. 341 // It causes no problems except wasted space. 342 // Should be addressed in the future 338 // assign (and create) a temporary directory This will create a new 339 // tbuild directory every time the user goes back to select a new 340 // collection. It causes no problems except wasted space. Should be 341 // addressed in the future 343 342 if (assign_tmpname (args, logout)==false) { 344 343 // there was an error creating the tmp dir … … 506 505 } 507 506 508 if (depositor_page == "bildcancel"){507 if ((depositor_page == "bildcancel") || (depositor_page == "bildfail")) { 509 508 510 509 … … 558 557 } 559 558 disp.setmacro ("depositorbar", "depositor", depositorbar); 559 560 if (depositor_page == "bildfail") { 561 text_t textfailmsg = "_textfailmsg"; 562 textfailmsg.push_back(failcode); 563 textfailmsg.push_back('_'); 564 disp.setmacro("textfailmsg", "depositor", textfailmsg); 565 566 text_t bldlog = filename_cat(gsdlhome, "tmp", args["di1tmp"], args["di1dirname"] + ".bld"); 567 text_t rawlog = file_tail (bldlog, 6, 0); 568 // we'll shove in some <br> tags where \n's occur 569 text_t faillog; 570 text_t::const_iterator here = rawlog.begin(); 571 text_t::const_iterator end = rawlog.end(); 572 while (here != end) { 573 if (*here == '\n') faillog += "<br>"; 574 faillog.push_back (*here); 575 ++here; 576 } 577 disp.setmacro ("faillog", "depositor", dm_safe(faillog)); 578 } 579 580 581 560 582 } 561 583 … … 610 632 text_t stepstring = substr(here,here+4); 611 633 612 if ( depositor_page == "select" || stepstring == "step") {634 if ((depositor_page == "select") || (stepstring == "step")) { 613 635 textout << outconvert << disp << ("_depositor:header_\n") 614 636 << ("_depositor:" + depositor_page + "content_\n") … … 655 677 656 678 679 cerr << "*** filename = " << filename_textt << endl; 680 657 681 //write the metadata file 658 682 write_metadata_file(args, filename_textt, timestamp_str); … … 674 698 } 675 699 676 677 700 if (message.empty()) { 701 678 702 if (depositor_page != "bild" && stepstring != "step" && depositor_page != "select") { 679 703 // output page ("bild" page was already output above) … … 708 732 metadata_file += " <FileName>"; 709 733 710 //split the filename 711 char* filename_front = strtok(filename_str.getcstr(),"."); 712 char* filename_end = strtok(NULL, "."); 713 714 metadata_file += filename_front; 715 metadata_file += "\\."; 716 metadata_file += filename_end; 734 // Generate 'regular expression' save version of filename 735 // for now that means escaping any '.' characters 736 // consider generalising as function in gsdltools.h/cpp? 737 738 text_t filename_re; 739 text_t::const_iterator here = filename_str.begin(); 740 text_t::const_iterator end = filename_str.end(); 741 while (here != end) { 742 if (*here == '.') { 743 filename_re.push_back('\\'); 744 } 745 746 filename_re.push_back(*here); 747 ++here; 748 } 749 750 metadata_file += filename_re; 751 717 752 metadata_file += "</FileName>\n"; 718 753 metadata_file += " <Description>\n"; -
trunk/gsdl/src/recpt/wizardaction.cpp
r11998 r12019 342 342 if (!mk_dir (fulltmpdir)) { 343 343 outconvertclass text_t2ascii; 344 logout << text_t2ascii << " collectoraction::assign_tmpname unable to create directory ("344 logout << text_t2ascii << "wizardaction::assign_tmpname unable to create directory (" 345 345 << fulltmpdir << ")\n"; 346 346 return false;
Note:
See TracChangeset
for help on using the changeset viewer.