removed legacy plugin path unshift

This commit is contained in:
Ritchie Martori
2011-12-08 16:43:02 -08:00
parent f767387b92
commit 870dfe6dfe
2 changed files with 2 additions and 5 deletions

View File

@@ -11,14 +11,11 @@ var config = require('./config').load()
, path
;
// expose current directory to plugins
require.paths.unshift('.');
// load plugins
plugins.forEach(function(fd) {
path = __dirname + '/plugins/' + fd;
if(fs.statSync(path).isDirectory()) {
lib[fd] = require(path);
lib[fd] = require(path);
}
});

View File

@@ -17,7 +17,7 @@ module.exports = Model.spawn({
refresh: function(changes) {
if(!changes.errors) {
if(changes.plugin === 'models') models.refresh();
else if(changes.collection) Model.refreshSettings(json.collection);
else if(changes.collection) Model.refreshSettings(changes.collection);
}
Model.refresh.apply(this, arguments);