rem: where += "and AV_SITE.SITE_ISONLINE > 0 "; 
add: where += "and AV_SITE.mode = 'online' "; 
context: Root.prototype.searchSites  = function(query, sid) {   // result array   var result = new Array();   // break up search string   var unquote = new RegExp("\\\\", "g");   query = query.replace(unquote, "\\\\");   unquote = new RegExp("\'", "g");   query = query.replace(unquote, "\'\'");   var qarr = query.split(" ");   // construct query   var where = "select AV_TEXT.TEXT_ID, AV_SITE.SITE_ALIAS from AV_TEXT, AV_SITE where "+               "AV_TEXT.TEXT_F_SITE = AV_SITE.SITE_ID and "+               "AV_TEXT.TEXT_ISONLINE > 0 and ";   for (var i in qarr) {      where += "(AV_TEXT.TEXT_RAWCONTENT like '%"+qarr[i].toLowerCase()+"%') "      if (i < qarr.length-1)         where += "and ";   }   // search only in the specified site   if (sid)      where += "and AV_SITE.SITE_ID = "+sid+" ";   else      where += "and AV_SITE.SITE_ISONLINE > 0 ";   where += "order by AV_TEXT.TEXT_CREATETIME desc";   var dbcon = getDBConnection ("antville");   var dbres = dbcon.executeRetrieval(where);   if (dbres) {      while (dbres.next()) {         var item = new Object();         item.sid = dbres.getColumnItem (1).toString();         item.sitealias = dbres.getColumnItem (2);         result[result.length] = item;      }   }   dbres.release();   return result;};
meta: 993	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/993/d274db390adc9b141e241911b7f449881ce0a0c5/Root.js/clean/code/Root/Root.js