Changeset 11717


Ignore:
Timestamp:
2006-04-27T11:43:46+12:00 (18 years ago)
Author:
kjdon
Message:

made the history work again after John broke it by change & separator to & where its saved but not where its read in

Location:
branches/gsdl-2_70-distribution-branch/gsdl/src/recpt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/gsdl-2_70-distribution-branch/gsdl/src/recpt/historydb.cpp

    r9620 r11717  
    3131
    3232#define MAX_RECORDS 20
     33#define HIST_SEP ';'
    3334
    3435// returns true on success (in which case historyinfo will contain
     
    151152      if (entry==key) {
    152153    here=it+1;
    153         it=findchar(here, end, '&');
     154        it=findchar(here, end, HIST_SEP);
    154155    value = substr(here, it);
    155156    return;
     
    168169  text_tarray values;
    169170
    170   splitchar(here, end, '&', values);
     171  splitchar(here, end, HIST_SEP, values);
    171172 
    172173  text_tarray::iterator start = values.begin();
     
    231232  infodbclass argsinfo;
    232233  parse_saved_args(historyargs, argsinfo);
    233  
    234234  text_t collect = argsinfo["c"];
    235235  if (collect=="") {
     
    237237    return;
    238238  }
    239 
     239 
    240240  if (collect != args["c"]) {
    241241    userinfo += collect+", ";
     
    260260
    261261  if (argsinfo["b"] != args["b"] || argsinfo["t"] != args["t"]) {
    262     text_t mode;
    263262    if (argsinfo["b"]=="0") { // simple mode
    264263      if (argsinfo["t"]=="0") {
    265     mode = " _texthallwords_";
    266       }
    267       else { // t=1
    268     mode = " _texthsomewords_";
     264    userinfo += " _texthallwords_, ";
     265      }
     266      else if (argsinfo["t"]=="1"){
     267    userinfo += " _texthsomewords_, ";
    269268      }
    270269     
    271270    }
    272     else { // advanced mode
     271    else if (argsinfo["b"] == "1") { // advanced mode
    273272      if (argsinfo["t"]=="0") {
    274     mode = " _texthboolean_";
    275       }
    276       else {
    277     mode = " _texthranked_";
    278       }
    279     }
    280     userinfo += mode+", ";
    281   }
    282  
    283   if (argsinfo["k"] != args["k"]) {
     273    userinfo += " _texthboolean_, ";
     274      }
     275      else if (argsinfo["t"]=="1") {
     276    userinfo += " _texthranked_, ";
     277      }
     278    }
     279  }
     280 
     281  if (argsinfo["k"] != "" && argsinfo["k"] != args["k"]) {
    284282    text_t options;
    285     if (argsinfo["k"]=="0") {
    286       options = " _texthcaseoff_";
    287     }
    288     else {
    289       options = " _texthcaseon_";
    290     }
    291     userinfo += options+", ";
    292   }
    293 
    294   if (argsinfo["s"] != args["s"]) {
    295     text_t stem;
     283    // the text translations are the wrong way round
     284    if (argsinfo["k"]=="1") {
     285      userinfo += " _texthcaseoff_, ";
     286    }
     287    else if (argsinfo["k"]=="0") {
     288      userinfo += " _texthcaseon_, ";
     289    }
     290  }
     291
     292  if (argsinfo["s"] != "" && argsinfo["s"] != args["s"]) {
    296293    if (argsinfo["s"]=="0") {
    297       stem = " _texthstemoff_";
    298     }
    299     else {
    300       stem = " _texthstemon_";
    301     }
    302     userinfo += stem+", ";
    303   }
    304 
    305 }
     294      userinfo += " _texthstemoff_, ";
     295    }
     296    else if (argsinfo["s"]=="1") {
     297      userinfo += " _texthstemon_, ";
     298    }
     299  }
     300
     301}
  • branches/gsdl-2_70-distribution-branch/gsdl/src/recpt/queryaction.cpp

    r11005 r11717  
    817817
    818818  // defines the following macros
    819 
    820819  // _searchhistorylist_
    821820
     
    16011600  }
    16021601  query += "c="+args["c"];
    1603   query += "&h="+args["h"];
    1604   query += "&t="+args["t"];
    1605   query += "&b="+args["b"];
    1606   query += "&j="+args["j"];
    1607   query += "&n="+args["n"];
    1608   query += "&s="+args["s"];
    1609   query += "&k="+args["k"];
    1610   query += "&g="+args["g"];
     1602  query += ";h="+args["h"];
     1603  query += ";t="+args["t"];
     1604  query += ";b="+args["b"];
     1605  query += ";j="+args["j"];
     1606  query += ";n="+args["n"];
     1607  query += ";s="+args["s"];
     1608  query += ";k="+args["k"];
     1609  query += ";g="+args["g"];
    16111610 
    16121611  text_t qstring = args["q"];
    16131612  //text_t formattedquery =cgi_safe(qstring);
    16141613  //query += "&q="+formattedquery;
    1615   query += "&q="+qstring;
     1614  query += ";q="+qstring;
    16161615  bool display=false;
    16171616  int hd = args.getintarg("hd");
Note: See TracChangeset for help on using the changeset viewer.