fix extract and checkPad

This commit is contained in:
John McLear 2013-02-18 08:29:25 -08:00
parent 26699618ac
commit 4cfac2f624
2 changed files with 9 additions and 5 deletions

View File

@ -36,16 +36,18 @@ async.series([
settings = require('../src/node/utils/Settings'); settings = require('../src/node/utils/Settings');
db = require('../src/node/db/DB'); db = require('../src/node/db/DB');
dirty = require("../src/node_modules/ueberDB/node_modules/dirty")(padId + ".db"); dirty = require("../src/node_modules/ueberDB/node_modules/dirty")(padId + ".db");
callback();
}, },
//intallize the database //intallize the database
function (callback) function (callback)
{ {
console.log("dbe init");
db.init(callback); db.init(callback);
}, },
//get the pad //get the pad
function (callback) function (callback)
{ {
padManager = require('../node/db/PadManager'); padManager = require('../src/node/db/PadManager');
padManager.getPad(padId, function(err, _pad) padManager.getPad(padId, function(err, _pad)
{ {

View File

@ -70,10 +70,12 @@ exports.flatten = function (lst) {
exports.callAll = function (hook_name, args) { exports.callAll = function (hook_name, args) {
if (!args) args = {}; if (!args) args = {};
if (exports.plugins.hooks[hook_name] === undefined) return []; if (exports.plugins){
return _.flatten(_.map(exports.plugins.hooks[hook_name], function (hook) { if (exports.plugins.hooks[hook_name] === undefined) return [];
return hookCallWrapper(hook, hook_name, args); return _.flatten(_.map(exports.plugins.hooks[hook_name], function (hook) {
}), true); return hookCallWrapper(hook, hook_name, args);
}), true);
}
} }
exports.aCallAll = function (hook_name, args, cb) { exports.aCallAll = function (hook_name, args, cb) {