mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-07-08 15:41:33 +02:00
Merge branch 'master' of https://github.com/designcreateplay/NodeBB
This commit is contained in:
4
app.js
4
app.js
@@ -55,7 +55,7 @@
|
||||
winston.info('');
|
||||
|
||||
|
||||
if (!nconf.get('help') && !nconf.get('setup') && !nconf.get('upgrade') && fs.existsSync(__dirname + '/config.json')) {
|
||||
if (!nconf.get('help') && !nconf.get('setup') && !nconf.get('install') && !nconf.get('upgrade') && fs.existsSync(__dirname + '/config.json')) {
|
||||
// Load server-side configs
|
||||
nconf.file({
|
||||
file: __dirname + '/config.json'
|
||||
@@ -127,7 +127,7 @@
|
||||
}
|
||||
});
|
||||
});
|
||||
} else if (nconf.get('setup') || !fs.existsSync(__dirname + '/config.json')) {
|
||||
} else if (nconf.get('setup') || nconf.get('install') || !fs.existsSync(__dirname + '/config.json')) {
|
||||
// New install, ask setup questions
|
||||
if (nconf.get('setup')) {
|
||||
winston.info('NodeBB Setup Triggered via Command Line');
|
||||
|
||||
@@ -88,7 +88,7 @@ var ajaxify = {};
|
||||
|
||||
translator.load(tpl_url);
|
||||
|
||||
jQuery('#footer, #content').fadeOut(100);
|
||||
jQuery('#footer, #content').addClass('ajaxifying');
|
||||
|
||||
templates.flush();
|
||||
templates.load_template(function () {
|
||||
@@ -105,17 +105,17 @@ var ajaxify = {};
|
||||
|
||||
app.processPage();
|
||||
|
||||
jQuery('#content, #footer').stop(true, true).fadeIn(200, function () {
|
||||
if (window.location.hash) {
|
||||
hash = window.location.hash;
|
||||
}
|
||||
jQuery('#content, #footer').stop(true, true).removeClass('ajaxifying');
|
||||
|
||||
if (hash) {
|
||||
require(['forum/topic'], function(topic) {
|
||||
topic.scrollToPost(hash.substr(1));
|
||||
});
|
||||
}
|
||||
});
|
||||
if (window.location.hash) {
|
||||
hash = window.location.hash;
|
||||
}
|
||||
|
||||
if (hash) {
|
||||
require(['forum/topic'], function(topic) {
|
||||
topic.scrollToPost(hash.substr(1));
|
||||
});
|
||||
}
|
||||
|
||||
utils.refreshTitle(url);
|
||||
|
||||
|
||||
@@ -248,9 +248,12 @@
|
||||
|
||||
if (self.blocks && block !== undefined) self.blocks[block] = data[0];
|
||||
|
||||
var begin = new RegExp("(\r\n)*<!-- BEGIN " + block + " -->(\r\n)*", "g"),
|
||||
end = new RegExp("(\r\n)*<!-- END " + block + " -->(\r\n)*", "g"),
|
||||
|
||||
data = data[0]
|
||||
.replace("<!--[\\s]*BEGIN " + block + "[\\s]*-->", "")
|
||||
.replace("<!--[\\s]*END " + block + "[\\s]*-->", "");
|
||||
.replace(begin, "")
|
||||
.replace(end, "");
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user