Changeset 10567
- Timestamp:
- 2005-08-25T17:02:29+12:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/recpt/browsetools.cpp
r10553 r10567 384 384 while (thisdoc != lastdoc) { 385 385 386 if (is_top ((*thisdoc).OID)) 386 if (is_top ((*thisdoc).OID)) { 387 387 load_formatstring ((*thisdoc).metadata["thistype"].values[0], metadata, 388 388 getParents, classification, browsermap, formatinfo, 389 389 formatlistmap); 390 391 text_t &childtype = (*thisdoc).metadata["childtype"].values[0]; 392 text_tset::const_iterator it = cache.find (childtype); 393 if (it == cache.end()) { 394 load_formatstring (childtype, metadata, getParents, classification, 395 browsermap, formatinfo, formatlistmap); 396 cache.insert (childtype); 390 } 391 392 // sometimes childtype is not set - why?? 393 if ((*thisdoc).metadata.find("childtype") != (*thisdoc).metadata.end()) { 394 text_t &childtype = (*thisdoc).metadata["childtype"].values[0]; 395 396 text_tset::const_iterator it = cache.find (childtype); 397 if (it == cache.end()) { 398 load_formatstring (childtype, metadata, getParents, classification, 399 browsermap, formatinfo, formatlistmap); 400 cache.insert (childtype); 401 } 397 402 } 398 403 ++thisdoc; … … 417 422 // get classifytype of this level 418 423 if (is_top ((*thisparent).OID)) classifytype = (*thisparent).metadata["thistype"].values[0]; 419 else if (!first ) classifytype = (*(thisparent-1)).metadata["childtype"].values[0];424 else if (!first && (*(thisparent-1)).metadata.find("childtype") != (*(thisparent-1)).metadata.end()) classifytype = (*(thisparent-1)).metadata["childtype"].values[0]; 420 425 421 426 // if we still don't have a classifytype we'll use the default … … 516 521 text_t classifytype; 517 522 int numparents = response.docInfo.size(); 518 if (!parents.empty() )523 if (!parents.empty() && (response.docInfo[numparents-1].metadata.find("childtype") != response.docInfo[numparents-1].metadata.end())) 519 524 classifytype = response.docInfo[numparents-1].metadata["childtype"].values[0]; 520 525 else {
Note:
See TracChangeset
for help on using the changeset viewer.