Changeset 14090
- Timestamp:
- 2007-05-24T09:34:58+12:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/recpt/queryaction.cpp
r13587 r14090 1522 1522 } 1523 1523 1524 // Find the search result specified by the ifln argument 1525 ResultDocInfo_tarray::iterator thissection = response.docInfo.begin(); 1526 int section_number = 1; 1527 int ifln = args["ifln"].getint(); 1524 if (args["ifl"] == 1 || (args["ifl"] == 2 && response.numDocs == 1)) 1525 { 1526 // Find the search result specified by the ifln argument 1527 ResultDocInfo_tarray::iterator thissection = response.docInfo.begin(); 1528 int section_number = 1; 1529 int ifln = args["ifln"].getint(); 1528 1530 1529 1530 thissection++;1531 1532 1533 1534 1535 // Location response (this URL must have "&" and not "&"!)1536 1537 1538 int srp = 0;1539 1540 1541 }1542 1543 1544 }1531 while (section_number != ifln && thissection != response.docInfo.end()) { 1532 thissection++; 1533 section_number++; 1534 } 1535 // If the search result exists, go directly to it 1536 if (section_number == ifln && thissection != response.docInfo.end()) { 1537 // Location response (this URL must have "&" and not "&"!) 1538 int num_docs = response.numDocs; 1539 int srn = 0; 1540 int srp = 0; 1541 if (show_links && section_number < num_docs ) { 1542 srn = section_number + 1; 1543 } 1544 if (show_links && section_number > 1 ) { 1545 srp = section_number - 1; 1546 } 1545 1547 1546 textout << outconvert << disp << "Location: _gwcgi_?e=_compressedoptions_&a=d&c=" << collection << "&cl=search&d=" << (*thissection).OID <<"&srn="<<srn<<"&srp="<<srp<< "\n\n"; 1547 textout << flush; 1548 1549 return true; 1550 } 1548 textout << outconvert << disp << "Location: _gwcgi_?e=_compressedoptions_&a=d&c=" << collection << "&cl=search&d=" << (*thissection).OID <<"&srn="<<srn<<"&srp="<<srp<< "\n\n"; 1549 textout << flush; 1550 1551 return true; 1552 } 1553 } 1551 1554 1552 1555 // There weren't enough (or any) matching documents
Note:
See TracChangeset
for help on using the changeset viewer.