Ignore:
Timestamp:
2001-01-31T17:30:31+13:00 (23 years ago)
Author:
dmm9
Message:

bringing date search up to date with mgpp's new search string format

File:
1 edited

Legend:

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

    r1774 r1889  
    189189}
    190190
    191 void add_ands(text_t& querystring, int querytype)
    192 {
    193 
    194   if(querytype==0)
    195     {
    196       text_t formattedstring;
    197      
    198       bool spacelast = false;
    199      
    200       text_t::const_iterator here = querystring.begin();
    201       text_t::const_iterator end = querystring.end();
    202      
    203 
    204       querystring = formattedstring;
    205 
    206       while(here!=end && isspace((*here)))
    207     here++;
    208      
    209       if(here==end)
    210     return;
    211 
    212       while(here!=end)
    213     {
    214       if(isspace((*here)))
    215       {
    216         while(here!=end && isspace((*here)))
    217           here++;
    218         if(here!=end)
    219           formattedstring.appendcstr(" AND ");
    220       }
    221       if(!isspace((*here)))
    222         {
    223           formattedstring.push_back((*here));
    224         }
    225       here++;
    226     }
    227       querystring = formattedstring;
    228     }
    229 }
    230 
    231  
     191
    232192   
    233193void add_dates(text_t &querystring, int startdate, int enddate,
     
    274234       else
    275235         querystring.appendint(startdate);
    276        querystring.appendcstr("]:Coverage");
     236       querystring.appendcstr("]:CO");
    277237     }
    278238       else{
Note: See TracChangeset for help on using the changeset viewer.