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)) { |
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 |
| 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: |
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 | } |