mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-07 06:25:50 +01:00
moving the db require to where it is actually needed
This commit is contained in:
@@ -8,7 +8,6 @@ var async = require('async'),
|
|||||||
winston = require('winston'),
|
winston = require('winston'),
|
||||||
nconf = require('nconf'),
|
nconf = require('nconf'),
|
||||||
utils = require('../public/src/utils.js'),
|
utils = require('../public/src/utils.js'),
|
||||||
db = require('./database.js'),
|
|
||||||
|
|
||||||
install = {
|
install = {
|
||||||
questions: [{
|
questions: [{
|
||||||
@@ -329,7 +328,8 @@ var async = require('async'),
|
|||||||
},
|
},
|
||||||
function (next) {
|
function (next) {
|
||||||
// Default plugins
|
// Default plugins
|
||||||
var Plugins = require('./plugins');
|
var Plugins = require('./plugins'),
|
||||||
|
db = require('./database.js');
|
||||||
|
|
||||||
winston.info('Enabling default plugins');
|
winston.info('Enabling default plugins');
|
||||||
|
|
||||||
@@ -350,7 +350,11 @@ var async = require('async'),
|
|||||||
}, next);
|
}, next);
|
||||||
},
|
},
|
||||||
function (next) {
|
function (next) {
|
||||||
|
var db = require('./src/database').init(function(err) {
|
||||||
|
if (!err) {
|
||||||
db.setObjectField('widgets:global', 'footer', "[{\"widget\":\"html\",\"data\":{\"html\":\"<footer id=\\\"footer\\\" class=\\\"container footer\\\">\\r\\n\\t<div class=\\\"copyright\\\">\\r\\n\\t\\tCopyright © 2014 <a target=\\\"_blank\\\" href=\\\"https://www.nodebb.com\\\">NodeBB Forums</a> | <a target=\\\"_blank\\\" href=\\\"//github.com/designcreateplay/NodeBB/graphs/contributors\\\">Contributors</a>\\r\\n\\t</div>\\r\\n</footer>\",\"title\":\"\",\"container\":\"\"}}]", next);
|
db.setObjectField('widgets:global', 'footer', "[{\"widget\":\"html\",\"data\":{\"html\":\"<footer id=\\\"footer\\\" class=\\\"container footer\\\">\\r\\n\\t<div class=\\\"copyright\\\">\\r\\n\\t\\tCopyright © 2014 <a target=\\\"_blank\\\" href=\\\"https://www.nodebb.com\\\">NodeBB Forums</a> | <a target=\\\"_blank\\\" href=\\\"//github.com/designcreateplay/NodeBB/graphs/contributors\\\">Contributors</a>\\r\\n\\t</div>\\r\\n</footer>\",\"title\":\"\",\"container\":\"\"}}]", next);
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
function (next) {
|
function (next) {
|
||||||
require('./upgrade').upgrade(next);
|
require('./upgrade').upgrade(next);
|
||||||
|
|||||||
Reference in New Issue
Block a user