Changeset 20601


Ignore:
Timestamp:
2009-09-14T15:15:42+12:00 (13 years ago)
Author:
kjdon
Message:

use fqv instead of q arg to get the plain query terms when appropriate

File:
1 edited

Legend:

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

    r20481 r20601  
    812812
    813813    // add a queryterms macro for plain version of search terms
    814     if (!args["q"].empty()) {
    815       disp.setmacro ("queryterms", displayclass::defaultpackage, get_plain_query_terms(args["q"]));
    816     }
     814    if (!args["q"].empty()|| !args["fqv"].empty()) {
     815      text_t query_arg = "";
     816      if (args["qt"]=="0" && args["qto"] != "2") { // normal text search
     817    query_arg = args["q"];
     818      }
     819      else if (args["qt"]=="1" || args["qto"]=="2"){ // form search
     820
     821    if (args["b"]=="1" && args["fqa"]=="1") { // explicit query
     822      query_arg = args["q"];
     823    }
     824    else { // form search
     825      query_arg = args["fqv"];
     826    }
     827      }
     828      disp.setmacro ("queryterms", displayclass::defaultpackage, get_plain_query_terms(query_arg, args["ct"]));
     829    }
     830   
    817831  }
    818832} // define external macros
Note: See TracChangeset for help on using the changeset viewer.