Ignore:
Timestamp:
1999-07-16T20:33:36+12:00 (25 years ago)
Author:
rjmcnab
Message:

Changed the logic for getting the results string slightly

File:
1 edited

Legend:

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

    r398 r400  
    1212/*
    1313   $Log$
     14   Revision 1.15  1999/07/16 08:33:36  rjmcnab
     15   Changed the logic for getting the results string slightly
     16
    1417   Revision 1.14  1999/07/16 03:41:29  sjboddie
    1518   changed isApprox
     
    494497void queryaction::define_query_macros (cgiargsclass &args, displayclass &disp,
    495498                       const FilterResponse_t &response) {
    496 
    497   int numdocs = response.numDocs;
    498   int arg_m = args.getintarg("m");
    499   if (numdocs > arg_m) numdocs = arg_m;
    500 
    501499  // set up _freqmsg_ and _quotedquery_ macros
    502500  text_t freqmsg = "_textfreqmsg1_";
     
    516514  text_t resline;
    517515  int maxdocs = args.getintarg("m");
     516  int numdocs = response.numDocs;
     517  if (response.isApprox == MoreThan && numdocs > maxdocs) numdocs = maxdocs;
    518518
    519519  if (response.isApprox == Approximate) resline = "_textapprox_";
    520   else if ((response.isApprox == MoreThan) || (response.numDocs > maxdocs))
    521     resline = "_textmorethan_";
     520  else if (response.isApprox == MoreThan) resline = "_textmorethan_";
     521 
    522522  if (numdocs == 0) resline = "_textnodocs_";
    523523  else if (numdocs == 1) resline += "_text1doc_";
    524   else
    525     if (response.numDocs > maxdocs)
    526       resline += text_t(maxdocs) + " _textlotsdocs_";
    527     else
    528       resline += text_t(response.numDocs) + " _textlotsdocs_";
     524  else resline += text_t(numdocs) + " _textlotsdocs_";
    529525 
    530526  disp.setmacro("resultline", "query", resline);
Note: See TracChangeset for help on using the changeset viewer.