Roxen.git / server / etc / modules / Variable.pmod / module.pmod

version» Context lines:

Roxen.git/server/etc/modules/Variable.pmod/module.pmod:1: - // $Id: module.pmod,v 1.104 2008/12/19 12:17:39 grubba Exp $ + // $Id: module.pmod,v 1.105 2009/10/13 11:43:07 mast Exp $      #include <module.h>   #include <roxen.h>      // Locale macros   //<locale-token project="roxen_config"> LOCALE </locale-token>      #define LOCALE(X,Y) \    ([string](mixed)Locale.translate("roxen_config",roxenp()->locale->get(),X,Y))   
Roxen.git/server/etc/modules/Variable.pmod/module.pmod:1424:    if( get_changed_callback() )    get_changed_callback()( this_object() );    return 1;    }       // NOTE: Will be called with a string at module init!    int set(string|RoxenModule to)    {    if (stringp(to)) {    module_id = to; -  to = transform_from_form(to); +  RoxenModule mod = transform_from_form(to); +  if (!mod && conf->enabled_modules[to]) +  // The module exists but isn't started yet. Don't call set() +  // in this case since that will cause a bogus warning. +  return 0; +  to = mod;    }    return ::set(to);    }       RoxenModule query()    {    RoxenModule res = changed_values[_id];    if (!res) {    if (module_id) {    // The module might have been reloaded.