Branch: Tag:

2003-01-15

2003-01-15 13:09:24 by Anders Johansson <anders@roxen.com>

Avoid recursive module dependency.

Rev: lib/modules/Search.pmod/module.pmod:1.17

1:   // This file is part of Roxen Search   // Copyright © 2000,2001 Roxen IS. All rights reserved.   // - // $Id: module.pmod,v 1.16 2001/06/23 00:21:09 js Exp $ + // $Id: module.pmod,v 1.17 2003/01/15 13:09:24 anders Exp $      private mapping filter_mimetypes;   private multiset filter_fields;    -  + program search_filter; +    private void get_filters()   { -  +  if (!search_filter) +  search_filter = master()->resolv("Search.Filter");    filter_mimetypes=([]);    filter_fields=(<>); -  foreach(values(Search.Filter), object filter) +  foreach(values(search_filter), object filter)    {    foreach(filter->contenttypes || ({ }), string mime)    filter_mimetypes[mime]=filter;
20:    }   }    - Search.Filter.Base get_filter(string mime_type) + object get_filter(string mime_type)   {    if(!filter_mimetypes)    get_filters();
28:    return filter_mimetypes[mime_type];   }    - mapping(string:Search.Filter.Base) get_filter_mime_types() + mapping(string:object) get_filter_mime_types()   {    if(!filter_mimetypes)    get_filters();