Changeset 17938

Show
Ignore:
Timestamp:
27.11.2008 13:29:08 (11 years ago)
Author:
kjdon
Message:

forgot to test on show_links when setting srn, srp in last commit

Files:
1 modified

Legend:

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

    r17936 r17938  
    14721472  // specified search result (from next/prev search result link) 
    14731473  if (args["ifl"] == "1") { 
    1474     args["r"] = args["ifln"]; // the document number we want,  
     1474    args["r"] = args["ifln"]; // the document number we want 
    14751475    args["o"] = "1"; 
    14761476  } 
     
    15291529      ResultDocInfo_tarray::iterator section = response.docInfo.begin(); 
    15301530       
    1531       // We still need to set "srn" and "srp" values (next and prev search result numbers 
    1532       int ifln = args["ifln"].getint(); 
    1533       int srn = ifln + 1; 
    1534       if (srn > response.numDocs) { 
    1535         srn = 0; 
    1536       } 
    1537       int srp = ifln - 1; 
    1538       if (srp < 0) { 
    1539         srp = 0; 
     1531      // We still need to set "srn" and "srp" values (next and prev search result numbers) if we are showing them 
     1532      int srn = 0; 
     1533      int srp = 0; 
     1534      if (show_links) { 
     1535        int ifln = args["ifln"].getint(); 
     1536        srn = ifln + 1; 
     1537        if (srn > response.numDocs) { 
     1538          srn = 0; 
     1539        } 
     1540        srp = ifln - 1; 
     1541        if (srp < 0) { 
     1542          srp = 0; 
     1543        } 
    15401544      } 
    15411545       
    1542        
    1543       textout << outconvert << disp << "Location: _gwcgi_?e=_compressedoptions_&a=d&c=" << collection << "&cl=search&d=" << (*section).OID <<"&srn="<<srn<<"&srp="<<srp<< "\n\n"; 
     1546      textout << outconvert << disp  
     1547          << "Location: _gwcgi_?e=_compressedoptions_&a=d&c="  
     1548          << collection << "&cl=search&d=" << (*section).OID  
     1549          << "&srn=" << srn << "&srp=" << srp << "\n\n"; 
    15441550      textout << flush; 
    15451551       
     
    15751581    } 
    15761582  } 
     1583   
     1584  //Restore the "r" and "o" arg in case they have been changed and we still get here 
     1585  args["r"] = start_results_from_old; 
     1586  args["o"] = hits_per_page_old; 
     1587 
    15771588  define_history_macros (disp, args, protos, logout); 
    15781589