pike.git / lib / modules / Search.pmod / Utils.pmod

version» Context lines:

pike.git/lib/modules/Search.pmod/Utils.pmod:53:    private mapping(string:mixed) query_values;       private Search.Database.MySQL db;    private Search.RankingProfile ranking;    private array(string) stop_words;       //! @decl void create(int database_profile_id, int query_profile_id,@    //! ProfileCache cache)    //! @param cache    //! The parent cache object. -  void create(int _database_profile_id, +  protected void create(int _database_profile_id,    int _query_profile_id,    ProfileCache _my_cache) {    database_profile_id = _database_profile_id;    query_profile_id = _query_profile_id;    my_cache = _my_cache;    int last_stat = time();       // Prefetch..    get_ranking();    }
pike.git/lib/modules/Search.pmod/Utils.pmod:124:    ADTSet add (string|int|float in) {    vals[in] = 1;    return this;    }       ADTSet sub (string|int|float out) {    m_delete(vals, out);    return this;    }    -  ADTSet `+(mixed in) { +  protected ADTSet `+(mixed in) {    if(stringp(in)||intp(in)||floatp(in))    add(in);    else    map((array)in, add);    return this;    }    -  ADTSet `-(mixed out) { +  protected ADTSet `-(mixed out) {    if(stringp(out)||intp(out)||floatp(out))    sub(out);    else    map((array)out, sub);    return this;    }       protected mixed cast(string to) {    switch(to) {    case "array": return indices(vals);
pike.git/lib/modules/Search.pmod/Utils.pmod:452:    private int next_run;    private mapping(int:int) entry_queue = ([]);    private mapping(int:int) crawl_queue = ([]);    private mapping(int:int) compact_queue = ([]);    private array(int) priority_queue = ({});    private mapping db_profiles;   #if constant(roxen)    private mixed schedule_run;   #endif    -  void create(mapping _db_profiles) { +  protected void create(mapping _db_profiles) {    db_profiles = _db_profiles;    schedule();    }       void check_priority_queue(int profile)    {    if (!has_value(priority_queue, profile))    priority_queue += ({ profile });    }   
pike.git/lib/modules/Search.pmod/Utils.pmod:682:    db = logdb;       // if(!logdb || !logdb->query)    // throw( ({ "Couldn't find any database object.\n", backtrace() }) );       return db;    }       //! @decl void create(Sql.Sql db_object, int profile, int stderr_logging)    //! @decl void create(string db_url, int profile, int stderr_logging) -  void create(string|Sql.Sql _logdb, int _profile, int _stderr_logging) { +  protected void create(string|Sql.Sql _logdb, int _profile, +  int _stderr_logging) {    logdb = _logdb;    profile = _profile;    stderr_logging = _stderr_logging;       // create table eventlog (event int unsigned auto_increment primary key,    // at timestamp not null, code int unsigned not null, extra varchar(255))       Sql.Sql db = get_db();       if(catch(db->query("SELECT code FROM eventlog WHERE event=0")))