Changeset 3152


Ignore:
Timestamp:
2002-06-17T15:46:09+12:00 (22 years ago)
Author:
jrm21
Message:

Don't set _quotedquery_ (used to display post-processing information) if we aren't using mg. Eg mgpp shouldn't display this.

File:
1 edited

Legend:

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

    r3145 r3152  
    554554  // _thislast_
    555555
    556 
    557   // get the quoted bits of the query string and set _quotedquery_
    558   text_tarray phrases;
    559   get_phrases (args["q"], phrases);
    560   num_phrases = phrases.size();
    561   text_tarray::const_iterator phere = phrases.begin();
    562   text_tarray::const_iterator pend = phrases.end();
    563   bool first = true;
    564   text_t quotedquery;
    565   while (phere != pend) {
    566     if (!first)
    567       if ((phere +1) == pend) quotedquery += " and ";
    568       else quotedquery += ", ";
    569    
    570     quotedquery += "\"" + *phere + "\"";
    571     first = false;
    572     phere ++;
    573   }
    574   if (args.getintarg("s") && !quotedquery.empty()) quotedquery += "_textstemon_";
    575   disp.setmacro ("quotedquery", "query", quotedquery);
     556  if (args["ct"]==0) { // mg queries only, not mgpp
     557    // get the quoted bits of the query string and set _quotedquery_
     558    text_tarray phrases;
     559    get_phrases (args["q"], phrases);
     560    num_phrases = phrases.size();
     561    text_tarray::const_iterator phere = phrases.begin();
     562    text_tarray::const_iterator pend = phrases.end();
     563    bool first = true;
     564    text_t quotedquery;
     565    while (phere != pend) {
     566      if (!first)
     567    if ((phere +1) == pend) quotedquery += " and ";
     568    else quotedquery += ", ";
     569     
     570      quotedquery += "\"" + *phere + "\"";
     571      first = false;
     572      phere ++;
     573    }
     574    if (args.getintarg("s") && !quotedquery.empty()) quotedquery += "_textstemon_";
     575    disp.setmacro ("quotedquery", "query", quotedquery);
     576  }
    576577
    577578  define_form_macros(disp, args, protos, logout);
    578 
    579579 
    580580  define_query_interface(disp, args, protos, logout);
    581 
    582  
    583 
    584  
    585 
    586581
    587582}
     
    995990
    996991
     992
    997993  if (args["ccs"] == "1") {
    998994    if (!args["cc"].empty()) {
     
    13351331
    13361332  if (!formattedstring.empty()) { // do the query
     1333    // note! formattedstring is in unicode! mg and mgpp must convert!
    13371334    set_queryfilter_options (request, formattedstring, args);
    13381335    collectproto->filter (collection, request, response, err, logout);
Note: See TracChangeset for help on using the changeset viewer.