Baris Usakli 11 years ago
commit d70c688b65

@ -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,7 +105,8 @@ var ajaxify = {};
app.processPage();
jQuery('#content, #footer').stop(true, true).fadeIn(200, function () {
jQuery('#content, #footer').stop(true, true).removeClass('ajaxifying');
if (window.location.hash) {
hash = window.location.hash;
}
@ -115,7 +116,6 @@ var ajaxify = {};
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;
}

Loading…
Cancel
Save