Changeset 20730 for gsdl/trunk


Ignore:
Timestamp:
2009-09-28T16:10:57+13:00 (15 years ago)
Author:
kjdon
Message:

now we are using gs2:docOID to find the right section in a document xml file, instead of gs2:id. gs2:id was stored as docnum in the database. when getting the section, gs2:docOID will be the same as the greenstone OID.

Location:
gsdl/trunk/runtime-src/src/colservr
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/runtime-src/src/colservr/expat_document.cpp

    r12427 r20730  
    3535  text_t element_name = (char*)name;
    3636  if (element_name == *(rpack_ptr->section_level)) {
    37     text_t id_att = (char *)get_attribute(attributes,"gs2:id");
     37    text_t id_att = (char *)get_attribute(attributes,"gs2:docOID");
    3838    if (id_att == *(rpack_ptr->section_num)) {
    3939      rpack_ptr->store_text = true;
  • gsdl/trunk/runtime-src/src/colservr/lucenesource.cpp

    r15594 r20730  
    7474    return false; // true??
    7575  }
    76   int docnum = info["docnum"].getint();
    7776
    7877  // get the parent id
     
    9089  doc.clear();
    9190  db_ptr->closedatabase();  // Important that local library doesn't leave any files open
    92   expat_document(full_path_to_doc, ((lucenesearchclass*)textsearchptr)->textlevel, text_t(docnum), doc);
     91  expat_document(full_path_to_doc, ((lucenesearchclass*)textsearchptr)->textlevel, tOID, doc);
    9392  return true;
    9493}
Note: See TracChangeset for help on using the changeset viewer.