Ignore:
Timestamp:
1999-07-09T14:44:35+12:00 (25 years ago)
Author:
sjboddie
Message:

fixed parent(All) function so it only outputs parents and not current
level meta

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/recpt/formattools.cpp

    r354 r359  
    1212/*
    1313   $Log$
     14   Revision 1.3  1999/07/09 02:44:35  sjboddie
     15   fixed parent(All) function so it only outputs parents and not current
     16   level meta
     17
    1418   Revision 1.2  1999/07/08 20:48:33  rjmcnab
    1519   Added ability to print the result number
     
    364368    bool first = true;
    365369    text_t tmp;
    366     text_tarray::const_iterator here = docinfo.metadata[mindex].values.begin();
    367     text_tarray::const_iterator end = docinfo.metadata[mindex].values.end();
    368     while (here != end) {
    369       if (!first) tmp += meta.parentoptions;
    370       tmp += *here;
    371       first = false;
    372       here ++;
     370    if (valuesize > 1) {
     371      text_tarray::const_iterator here = docinfo.metadata[mindex].values.begin();
     372      // don't want last value as that's the value of the current level (i.e. it's
     373      // not a parent
     374      text_tarray::const_iterator end = docinfo.metadata[mindex].values.end() - 1;
     375      while (here != end) {
     376    if (!first) tmp += meta.parentoptions;
     377    tmp += *here;
     378    first = false;
     379    here ++;
     380      }
    373381    }
    374382    return tmp;
Note: See TracChangeset for help on using the changeset viewer.