Branch: Tag:

2000-11-30

2000-11-30 16:19:15 by Johan Schön <js@opera.com>

More changes.

Rev: lib/modules/Search.pmod/Database.pmod/MySQL.pike:1.2
Rev: lib/modules/Search.pmod/Filter.pmod/HTML.pike:1.2
Rev: lib/modules/Search.pmod/Filter.pmod/PlainText.pike:1.2
Rev: lib/modules/Search.pmod/Grammar.pmod/GoogleStyle.pike:1.2
Rev: lib/modules/Search.pmod/filters/text_html.pike:1.6(DEAD)
Rev: lib/modules/Search.pmod/filters/text_plain.pike:1.4(DEAD)
Rev: lib/modules/Search.pmod/module.pmod:1.8

6:      class Document   { +  string _sprintf() +  { +  return sprintf("Search.Document(\"http://%s\")", uri); +  }    //! The placeholder for document metadata. -  +  string uri;    string title;    string description;    int last_changed;
19:      void create()   { -  werror("Loading filters\n"); -  foreach(values(Search.Filter), Search.Filter filter) -  foreach(filter->contenttypes || ({ }), string mime) -  filters[mime]=filter; + // werror("Loading filters\n"); +  foreach(values(Search.Filter), program filter) +  { +  Search.Filter.Base tmp=filter(); +  foreach(tmp->contenttypes || ({ }), string mime) +  filters[mime]=tmp; +  }    -  if(!sizeof(filters)) -  werror("No filters loaded\n"); -  else -  werror("Loaded %d filters\n", sizeof(filters)); + // if(!sizeof(filters)) + // werror("No filters loaded\n"); + // else + // werror("Loaded %d filters\n", sizeof(filters));   }    - Filter get_filter(string mime_type) + Search.Filter.Base get_filter(string mime_type)   {    if(!filters[mime_type]) return 0; -  return filters[mime_type]->Filter(); +  return filters[mime_type];   }      array(string) get_filter_mime_types()