Provide module instance in humhub module beforeInit.

This commit is contained in:
buddh4 2017-02-05 14:36:33 +01:00
parent 82d9f51784
commit 219139daef

View File

@ -359,9 +359,9 @@ var humhub = humhub || (function ($) {
event.trigger('humhub:beforeInitModule', module);
if (module.init) {
try {
event.trigger(module.id.replace('.', ':') + ':beforeInit');
event.trigger(module.id.replace('.', ':') + ':beforeInit', module);
module.init();
event.trigger(module.id.replace('.', ':') + ':afterInit');
event.trigger(module.id.replace('.', ':') + ':afterInit', module);
} catch (err) {
log.error('Could not initialize module: ' + module.id, err);
}