Skip to content

Commit

Permalink
license and module fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pedronasser committed Dec 27, 2012
1 parent 8cae767 commit 49c920a
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 16 deletions.
18 changes: 15 additions & 3 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
Copyright (c) 2012 Pedro Nasser <pedronasser@yept.net>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom
the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
35 changes: 22 additions & 13 deletions source/core/base/wnModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -456,20 +456,29 @@ module.exports = {
return _modules[id];
else if (this.hasComponent('classBuilder'))
{
var config = _modulesConfig[id] || {},
modulePath = config.modulePath || id,
className = config.class;
if (fs.existsSync(modulePath) && className != undefined)
try {

var config = _modulesConfig[id] || {},
modulePath = config.modulePath || id,
className = config.class;
if (fs.existsSync(modulePath) && className != undefined)
{
config.id = id;
config.autoInit = !(config.autoInit == false);
var module = this.createModule(className,modulePath,config)
_modules[id] = module;
this.attachModuleEvents(id);
module.e.ready(modulePath,config);
return _modules[id];
} else
return false;
} catch (e)
{
config.id = id;
config.autoInit = !(config.autoInit == false);
var module = this.createModule(className,modulePath,config)
_modules[id] = module;
this.attachModuleEvents(id);
module.e.ready(modulePath,config);
return _modules[id];
} else
return false;
this.e.log&&
this.e.log('wnModule.getModule: Error at loading `'+id+'`');
this.e.exception&&
this.e.exception(e);
}
}
},

Expand Down

0 comments on commit 49c920a

Please sign in to comment.