Ignore:
Timestamp:
1999-06-28T10:02:11+12:00 (25 years ago)
Author:
sjboddie
Message:

author is added to queryresults if there is one

File:
1 edited

Legend:

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

    r295 r298  
    1212/*
    1313   $Log$
     14   Revision 1.8  1999/06/27 22:02:11  sjboddie
     15   author is added  to queryresults if there is one
     16
    1417   Revision 1.7  1999/06/26 01:10:18  rjmcnab
    1518   Made h, i, and n arguments saved in the compressed arguments.
     
    324327    request.filterResultOptions = FROID | FRmetadata | FRtermFreq;
    325328    request.fields.push_back ("Title");
     329    request.fields.push_back ("Creator");
    326330    request.getParents = true;
    327331    if (!do_query (request, args, collectproto, quotedstring, response, logout))
     
    354358      }
    355359     
     360      text_t creator;
     361      bool first = true;
     362      text_tarray::const_iterator this_creator = (*this_doc).metadata[1].values.begin();
     363      text_tarray::const_iterator end_creator = (*this_doc).metadata[1].values.end();
     364      while (this_creator != end_creator) {
     365    if ((*this_creator).empty()) {this_creator ++; continue;}
     366    if (first) creator += " by " + *this_creator;
     367    else creator += " and " + *this_creator;
     368    first = false;
     369    this_creator ++;
     370      }
     371
    356372      textout << outconvert << disp << "<tr><td valign=top nowrap>" << link
    357           << "_icontext_</a></td><td>" << title << "</td></tr>\n";
     373          << "_icontext_</a></td><td>" << title << creator << "</td></tr>\n";
    358374     
    359375      this_doc ++;
     
    367383}
    368384 
    369 // set_query_macros sets the macros that couldn't be set until the
     385// define_query_macros sets the macros that couldn't be set until the
    370386// query had been done. Those macros are _freqmsg_, _quotedquery_,
    371387// _resultline_, _nextfirst_, _nextlast_, _prevfirst_, _prevlast_,
Note: See TracChangeset for help on using the changeset viewer.