Changeset 22833
- Timestamp:
- 2010-09-01T19:38:21+12:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/runtime-src/src/w32server/cgiwrapper.cpp
r22822 r22833 393 393 // the collection appears at this gsdlhome only because it's gdbm 394 394 // file is installed here -- it's real gdbm will therefore be 395 // somewhere else). 396 text_t build_cfg = filename_cat (my_gsdl_collecthome, 397 *colhere, "index", "build.cfg"); 398 399 if (file_exists (build_cfg)) { 395 // somewhere else). 396 397 // commenting out the following build_cfg test since the server won't know to load 398 // collection groups otherwise, as these don't have build_cfg files but ought to be loaded along 399 // with collections (the real test for whether something ought to be loaded--whether an item read 400 // in by read_dir is a collection or collection group--happens at a later time in the GS runtime code). 401 402 //text_t build_cfg = filename_cat (my_gsdl_collecthome,*colhere, "index", "build.cfg"); 403 //if (file_exists (build_cfg)) { 400 404 collections.insert (*colhere); 401 405 … … 408 412 tmp.gsdl_dbhome = my_gsdl_dbhome; 409 413 translated_colinfo[*colhere] = tmp; 410 }414 //} 411 415 } 412 416 ++colhere; … … 474 478 text_tset these_collections; 475 479 476 // First volume gsdlhome's - part 1 477 // if non-standard collecthome under [gsdl] section of site config file (llssite or glisite), 478 // then need to read in all the collections from this collecthome 479 if(gsdl_collecthome != filename_cat(gsdl_gsdlhome,"collect")) { 480 load_collections_from_collectdir(translated_collectinfo, 481 colhere, colend, these_collections, 482 dbhomes, clhomes, collections, 483 gsdl_gsdlhome, gsdl_collecthome, gsdl_dbhome); 484 } 485 486 // first volume gsdlhome's - part 2 480 // First volume gsdlhome's 487 481 // read in all the collections from sections other than [gsdl] in the site config file (llssite/glisite) 488 482 colinfo_tmap::const_iterator this_info = gsdl_collectinfo.begin(); 489 483 colinfo_tmap::const_iterator end_info = gsdl_collectinfo.end(); 490 484 while (this_info != end_info) { 491 492 485 if (dbhomes.find ((*this_info).second.gsdl_dbhome) == dbhomes.end()) { 493 486 load_collections_from_collectdir(translated_collectinfo, … … 500 493 ++this_info; 501 494 } 495 496 // if non-standard collecthome under [gsdl] section of site config file (llssite or glisite), 497 // then need to read in all the collections from this collecthome 498 if(gsdl_collecthome != filename_cat(gsdl_gsdlhome,"collect")) { 499 load_collections_from_collectdir(translated_collectinfo, 500 colhere, colend, these_collections, 501 dbhomes, clhomes, collections, 502 gsdl_gsdlhome, gsdl_collecthome, gsdl_dbhome); 503 } 504 505 // But when the default greenstone collect dir (gsdlhome\collect) is used, the following is used to load the collections: 502 506 503 507 // then if necessary the main dbhome (this should only happen if the 504 508 // gsdl.ini is a little screwed up and no volume dbhomes occurred) 505 509 if (dbhomes.find (gsdl_dbhome) == dbhomes.end()) { 506 507 these_collections.erase (these_collections.begin(), these_collections.end()); 508 read_dir (filename_cat (gsdl_dbhome, "collect"), these_collections); 509 colhere = these_collections.begin(); 510 colend = these_collections.end(); 511 while (colhere != colend) { 512 513 //text_t build_cfg = filename_cat (gsdl_dbhome,"collect", 514 // *colhere, "index", "build.cfg"); 515 //if (file_exists (build_cfg)) { 516 collections.insert (*colhere); 517 518 collectioninfo_t tmp; 519 tmp.gsdl_gsdlhome = gsdl_gsdlhome; 520 tmp.gsdl_collecthome = gsdl_collecthome; 521 tmp.gsdl_dbhome = gsdl_dbhome; 522 translated_collectinfo[*colhere] = tmp; 523 //} 524 ++colhere; 525 } 526 dbhomes.insert (gsdl_dbhome); 527 clhomes.insert (gsdl_collecthome); 528 } 510 load_collections_from_collectdir(translated_collectinfo, 511 colhere, colend, these_collections, 512 dbhomes, clhomes, collections, 513 gsdl_gsdlhome, filename_cat (gsdl_dbhome, "collect"), gsdl_dbhome); 514 } 529 515 } 530 516
Note:
See TracChangeset
for help on using the changeset viewer.