Ignore:
Timestamp:
2011-06-03T22:44:28+12:00 (13 years ago)
Author:
ak19
Message:

Now GS2 works out the earliestDatestamp of the repository in the manner GS3 does it (read each OAI-enabled collection's build.cfg to get the collection's earliestDatestamp field and choose the oldest such date among the OAI collections). Previously GS2 used to always set the earliestDatestamp to the unix epoch of 1970, which, while it would validate, wasn't the right thing to do as it wouldn't help with resumptiontokens and other date based things. Checked that the GS server still validates.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/runtime-src/src/oaiservr/oaiconfig.cpp

    r23233 r24114  
    8383    if (!this->configureCollection(gsdlhome, *here)) {
    8484      this->collectList.erase(here);
    85     }
    86    
     85    }   
    8786  }
    8887  else {
     
    119118  if (!file_exists(cnfgfile)) {
    120119    return false;
    121   }
     120  } 
     121 
    122122  this->collection = gsdlcollect;
    123123  this->read_configfile(cnfgfile);
    124 
     124 
     125  // to work out the earliestDatestamp for the repository, need to
     126  // to read in the build.cfg file of each OAI collection, in order to
     127  // find the oldest earliestDatestamp field of all the OAI collections
     128  text_t buildcnfgfile = filename_cat(gsdlhome, "collect", gsdlcollect, "index", "build.cfg");
     129  if (file_exists(buildcnfgfile)) {
     130    this->read_configfile(buildcnfgfile);
     131  }
     132 
    125133  return true;
    126134}
     
    309317    this->oaiVersion = cfgline[0];
    310318  }
    311  
    312 }
     319}
     320
    313321
    314322text_t oaiconfig::generateBaseServerURL() {
Note: See TracChangeset for help on using the changeset viewer.