Changeset 608
- Timestamp:
- 1999-09-21T23:34:42+12:00 (25 years ago)
- Location:
- trunk/gsdl/src/recpt
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/recpt/queryaction.cpp
r543 r608 28 28 /* 29 29 $Log$ 30 Revision 1.23 1999/09/21 11:34:42 sjboddie 31 added Maxdocs queryfilter option which may be -1 for 'all' 32 30 33 Revision 1.22 1999/09/07 23:08:51 rjmcnab 31 34 removed some compiler warnings … … 309 312 // check m argument 310 313 int arg_m = args.getintarg("m"); 311 if (arg_m < 0) {312 logout << "Warning: \"m\" argument less than 0(" << arg_m << ")\n";314 if (arg_m < -1) { 315 logout << "Warning: \"m\" argument less than -1 (" << arg_m << ")\n"; 313 316 cgiarginfo *minfo = argsinfo.getarginfo ("m"); 314 317 if (minfo != NULL) args["m"] = minfo->argdefault; … … 579 582 int maxdocs = args.getintarg("m"); 580 583 int numdocs = response.numDocs; 584 if (maxdocs == -1) maxdocs = response.numDocs; 581 585 isapprox isApprox = response.isApprox; 582 586 … … 595 599 } 596 600 597 // if (isApprox == MoreThan && numdocs > maxdocs) numdocs = maxdocs;598 if (numdocs > maxdocs) {numdocs = maxdocs; isApprox = MoreThan;}599 600 601 if (isApprox == Approximate) resline = "_textapprox_"; 601 602 else if (isApprox == MoreThan) resline = "_textmorethan_"; -
trunk/gsdl/src/recpt/querytools.cpp
r533 r608 28 28 /* 29 29 $Log$ 30 Revision 1.7 1999/09/21 11:32:42 sjboddie 31 added Maxdocs queryfilter option which may be -1 for 'all' 32 30 33 Revision 1.6 1999/09/07 04:56:58 sjboddie 31 34 added GPL notice … … 146 149 } 147 150 } 151 152 int arg_m = args.getintarg("m"); 153 154 option.name = "Maxdocs"; 155 option.value = arg_m; 156 request.filterOptions.push_back (option); 148 157 149 158 option.name = "StartResults"; … … 152 161 153 162 option.name = "EndResults"; 154 int arg_m = args.getintarg("m");155 163 int endresults = args.getintarg("o") + (args.getintarg("r") - 1); 156 if ( endresults > arg_m) endresults = arg_m;164 if ((endresults > arg_m) && (arg_m != -1)) endresults = arg_m; 157 165 option.value = endresults; 158 166 request.filterOptions.push_back (option);
Note:
See TracChangeset
for help on using the changeset viewer.