Changeset 20805


Ignore:
Timestamp:
2009-10-12T13:31:46+13:00 (13 years ago)
Author:
davidb
Message:

Extra checks added to summarise_keywords() to ensure that the htmlstr and query are non-trivial (i.e. not empty)

File:
1 edited

Legend:

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

    r9620 r20805  
    101101text_t summarise_keywords(text_t &htmlstr, text_t &query, int summaryLength) {
    102102
     103  if ((query.size()==0) || (htmlstr.size()==0)) {
     104      return "";
     105  }
     106
    103107  text_tarray allterms, terms;
    104108  splitchar(query.begin(),query.end(),' ',allterms);
     
    109113    if(!(*term).empty())
    110114      terms.push_back(*term);
     115  }
     116
     117  if (terms.size()==0) {
     118      return "";
    111119  }
    112120
Note: See TracChangeset for help on using the changeset viewer.