Changeset 7199


Ignore:
Timestamp:
2004-04-07T16:36:31+12:00 (20 years ago)
Author:
kjdon
Message:

put some stuff back from the previous commit that was not required

File:
1 edited

Legend:

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

    r7197 r7199  
    13551355    add_dates(formattedstring, args.getintarg("ds"), args.getintarg("de"),
    13561356          args.getintarg("dsbc"), args.getintarg("debc"));
     1357    args["q"] = formattedstring;
    13571358  }
    13581359  else if (args["qt"]=="1" || args["qto"]=="2"){ // form search
     
    13681369    parse_adv_query_form(formattedstring, args);
    13691370      }
     1371      args["q"] = formattedstring;
     1372     
    13701373      // reset the cgiargfqv macro - need to escape any quotes in it
    13711374      disp.setmacro("cgiargfqv", "query", escape_quotes(args["fqv"]));
    1372     }
    1373   } else {
     1375
     1376      // also reset the _cgiargq_ macro as it has changed now
     1377      disp.setmacro("cgiargq", "Global", html_safe(args["q"]));
     1378     
     1379      // reset the compressed options to include the q arg
     1380      text_t compressedoptions = recpt->get_compressed_arg(args, logout);
     1381      if (!compressedoptions.empty()) {
     1382    disp.setmacro ("compressedoptions", "Global", dm_safe(compressedoptions));
     1383    // need a decoded version of compressedoptions for use within forms
     1384    // as browsers encode values from forms before sending to server
     1385    // (e.g. %25 becomes %2525)
     1386    decode_cgi_arg (compressedoptions);
     1387    disp.setmacro ("decodedcompressedoptions", "Global", dm_safe(compressedoptions));
     1388      }
     1389    } // form search
     1390  } // args["qt"]=1
     1391  else {
    13741392    logout << "ERROR (query_action::get_formatted_query_string): querytype not defined\n";
    1375     return;
    1376   }
    1377  
    1378   // reset the query arg in case it has changed
    1379   args["q"] = formattedstring;
    1380  
    1381   // also reset the _cgiargq_ macro as it has changed now
    1382   disp.setmacro("cgiargq", "Global", html_safe(args["q"]));
    1383  
    1384   // reset the compressed options to include the q arg
    1385   text_t compressedoptions = recpt->get_compressed_arg(args, logout);
    1386   if (!compressedoptions.empty()) {
    1387     disp.setmacro ("compressedoptions", "Global", dm_safe(compressedoptions));
    1388     // need a decoded version of compressedoptions for use within forms
    1389     // as browsers encode values from forms before sending to server
    1390     // (e.g. %25 becomes %2525)
    1391     decode_cgi_arg (compressedoptions);
    1392     disp.setmacro ("decodedcompressedoptions", "Global", dm_safe(compressedoptions));
    13931393  }
    13941394}
Note: See TracChangeset for help on using the changeset viewer.