Changeset 24286


Ignore:
Timestamp:
2011-07-18T17:34:42+12:00 (13 years ago)
Author:
ak19
Message:

John Rose and Luigi had identified a bug in the Resource Identifier URLs served upon a GetRecord action (the same metadata field served by a ListRecords action was not faulty). The URL contained the incorrect name for the collection. As it happens, some previous code committed in commented out form with this file did have the necessary fix, however, as it was embedded in a OAI ID test that need not get executed in this stage of the code, the code crucially correcting the URL's collection name was also commented out as a result. Reinstating only the necessary line that adjusts the URL's collection name.

File:
1 edited

Legend:

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

    r24108 r24286  
    174174  text_t gsdlId = params["identifier"];
    175175  text_t gsdlCollect;
    176 
    177   /*
    178     text_t oai_coll_OID_prefix = "oai:"+this->configuration->getRepositoryId()+":"+collection+":"; 
    179     if(gsdlId.replace(oai_coll_OID_prefix, "") <= 0) {
    180         this->errorType = "idDoesNotExist";
    181         // Only throw an error if we're using v2.0.
    182         if (this->configuration->getOAIVersion() >= 200) {
    183             return false;
    184         }
    185     }
    186   */
     176 
     177    // although at this stage, we don't actually need to be testing that the identifier exists
     178    // (this method is not meant to throw an idDoesNotExist error), we do however need to be
     179    // working with the correct identifier, so we need to remove any oai_OID_prefix from the
     180    // gsdlId in order to extract the greenstone OID.
     181    text_t oai_OID_prefix = "oai:"+this->configuration->getRepositoryId()+":";
     182    gsdlId.replace(oai_OID_prefix, "");
    187183 
    188184  // convert record identifier into GSDL format from OAI
Note: See TracChangeset for help on using the changeset viewer.