Ignore:
Timestamp:
2003-06-23T14:21:26+12:00 (21 years ago)
Author:
kjdon
Message:

in the coll lists on home and home help pages, we are now adding in a qto arg for mgpp collections - this indicates what search options should be available to the end user - plain (qto=1), form (qto=2) or both (qto=3)

File:
1 edited

Legend:

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

    r4740 r4756  
    131131          text_t coll_type = "&ct=";
    132132          if (cinfo->buildType == "mgpp") {
    133         coll_type += "1";
     133        coll_type += "1&qto=";
     134
     135        // now we also want to check search types to set the qto arg
     136        if (cinfo->searchTypes.size() == 0) {
     137          coll_type += "3"; // default to 3 (= both)
     138        } else {
     139          unsigned int search_types = 0;
     140          cout << "search_types = "<<search_types <<endl;
     141          text_tarray::const_iterator type_here = cinfo->searchTypes.begin();
     142          text_tarray::const_iterator type_end = cinfo->searchTypes.end();
     143         
     144          while (type_here != type_end) {
     145            if (*type_here == "form") {
     146              search_types |= 2;
     147            } else if (*type_here == "plain") {
     148              search_types |= 1;
     149            }
     150            type_here ++;
     151          }
     152          coll_type += search_types;
     153          cout << "new search_types = "<<search_types <<endl;
     154 
     155        }
    134156          }
    135157          else {
    136158        coll_type += "0";
    137159          }
     160
    138161          found_valid_col = true;
    139162          FilterResponse_t response;
     
    252275          text_t coll_type = "&ct=";
    253276          if (cinfo->buildType == "mgpp") {
    254         coll_type += "1";
     277        coll_type += "1&qto=";
     278
     279        // now we also want to check search types to set the qto arg
     280        if (cinfo->searchTypes.size() == 0) {
     281          coll_type += "3"; // default to 2 (= both)
     282        } else {
     283          int search_types = 0;
     284          cout << "search_types = "<<search_types <<endl;
     285          text_tarray::const_iterator type_here = cinfo->searchTypes.begin();
     286          text_tarray::const_iterator type_end = cinfo->searchTypes.end();
     287         
     288          while (type_here != type_end) {
     289            if (*type_here == "form") {
     290              search_types |= 0x10;
     291            } else if (*type_here == "plain") {
     292              search_types |= 0x01;
     293            }
     294            type_here ++;
     295          }
     296          coll_type += search_types;
     297          cout << "new search_types = "<<search_types <<endl;
     298 
     299        }
    255300          }
    256301          else {
Note: See TracChangeset for help on using the changeset viewer.