diff options
author | Torsten Paul <Torsten.Paul@gmx.de> | 2014-01-02 21:41:21 (GMT) |
---|---|---|
committer | Torsten Paul <Torsten.Paul@gmx.de> | 2014-01-02 22:28:02 (GMT) |
commit | 7f3659907358f57e912f76291f8c9500b3032fbd (patch) | |
tree | aba281f10d0ef87ae55feaaf8cb6246b1fdc5102 /src/modcontext.cc | |
parent | 72865e17dae7f51c60e0db54c1aa070f8125f273 (diff) |
Integrate feature registry with modules.
In case a module is attached to a disabled feature, the module lookup
will give a warning message and ignore that (builtin) module.
Diffstat (limited to 'src/modcontext.cc')
-rw-r--r-- | src/modcontext.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/modcontext.cc b/src/modcontext.cc index 7941cf5..7b8cb07 100644 --- a/src/modcontext.cc +++ b/src/modcontext.cc @@ -104,6 +104,10 @@ const AbstractModule *ModuleContext::findLocalModule(const std::string &name) co { if (this->modules_p && this->modules_p->find(name) != this->modules_p->end()) { AbstractModule *m = this->modules_p->find(name)->second; + if (!m->is_enabled()) { + PRINTB("WARNING: Experimental builtin module '%s' is not enabled.", name); + return NULL; + } std::string replacement = Builtins::instance()->isDeprecated(name); if (!replacement.empty()) { PRINTB("DEPRECATED: The %s() module will be removed in future releases. Use %s() instead.", name % replacement); |